Connect without Activesync

Last post 05-22-2008 10:28 by XAlliedYouthX. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 05-22-2008 9:21

    Connect without Activesync

     So what I found out through testing was that we needed ActiveSync installed on the workstations that I'm trying to run my program on.  The problem with this is that it's going to be used by many people and no way of knowing if they have it installed or not.  Is there any possible way that I could have it run without installing ActiveSync?  Possibly packaging some other dlls with it or something like that?  What are the dlls that the OpenNetCF dll is looking for?

  • 05-22-2008 9:27 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,136

    Re: Connect without Activesync

    You have to install ActiveSync and there is no getting around that. The DLL that Desktop Communication is looking for is rapi.dll, but you cannot simply distribute rapi.dll with your application. The EULA for ActiveSync prohibits this and it is not available as a separate DLL from Microsoft. 

  • 05-22-2008 9:41 In reply to

    Re: Connect without Activesync

    Figures.  So I'm assuming since it uses the RAPI.dll I wouldn't be able to manually right the calls since I would still need RAPI.dll?
  • 05-22-2008 9:45 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,136

    Re: Connect without Activesync

    That's right. And since you would need RAPI.dll, you would need to install ActiveSync... or implement your own, interface-compatible version of RAPI (not a task to be taken lightly).

  • 05-22-2008 9:48 In reply to

    Re: Connect without Activesync

    Is there any way to at least get my app to load even though the RAPI.dll isn't found?  The PDA downloading is only part of the program and if they don't have ActiveSync installed I'd like for them to at least be able to get the program to load up.
  • 05-22-2008 9:57 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,136

    Re: Connect without Activesync

    Yeah, there is a way. There's a number of ways. The easiest is to check that rapi.dll exists in %WINDIR%\System32\ before you  instantiate any classes from Desktop Communication library.

  • 05-22-2008 10:07 In reply to

    Re: Connect without Activesync

     Since I'm doing "Imports OpenNETCF.Desktop.Communication" in VB.net I wasn't aware that that was possible.  It's throwing an InvalidOperationException as soon as the program tries to load up.

  • 05-22-2008 10:14 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,136

    Re: Connect without Activesync

    The Desktop Communication library will not attempt to load rapi.dll until you create an instance of the OpenNETCF.Desktop.Communication.RAPI class.

    The Imports directive is just a way of telling the compiler that you're going to use types defined in a particular namespace so that you don't have to explicitly qualify each type reference with its full namespace.

  • 05-22-2008 10:17 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 1,890

    Re: Connect without Activesync

    You likely have an instance of a RAPI class being created in a constructor or during class initialization of something created at startup.  You need to move that instantiation into code where you can wrap it with a try/catch.

     

  • 05-22-2008 10:28 In reply to

    Re: Connect without Activesync

     Wow I'm dumb.  I was declaring a new RAPI variable before the form loaded.  I just moved it down into the form load section and now I can check for the dll.  Thanks.

     

    EDIT:  @ ctacke.  Yeah you hit it right on the head.

Page 1 of 1 (10 items)