How to find out if a RAPI dll exists

I have a C # program working with RAPI (communication with PPC or WinCE)

My problem is if the user didn't install ActiveSync - my program crashed !!

How do I download and work with my program without installing ActiveSync?

(maybe something like #if ... #define ..... I really don't know .....)

Thanks in advance

+1


a source to share


2 answers


Here you have two options:

One, the delay in loading the RAPI dll so that you application won't complain if the dll doesn't exist. In this situation, you should only use RAPI calls if ActiveSync was installed (you can determine this by checking the registry).



-or -

Two, dynamically load the RAPI dlls and only reference the RAPI functions if ActiveSync is installed.

+1


a source


I'm not sure if this is what you are thinking, but you put your code behind the interface and in another DLL, and then when you run the program, see if RAPI can be found (look for files or install code).



If it is found, load the DLL and get the interface to the code it uses, if not found, do not load the DLL and disable any interface options it needs.

0


a source







All Articles