I have build C# program that work with RAPI (communication to PPC or WinCE)
My problem is, if the user was not installed the ActiveSync – my program crashed !!
How can I load and work with my program without install ActiveSync ?
(maybe something like #if…#define….. i realy dont know…..)
thank’s in advance
You have two choices here:
One, delay load the RAPI dll so you’re app won’t complain if the DLL is not there. In this situation, you’d only use the RAPI calls if ActiveSync was installed (you can determine this by checking the registry).
-or-
Two, dynamically load the RAPI dll and only reference the RAPI functions if ActiveSync is installed.