Hi, Glyn
Sorry for mentioned wcescomm.exe without the usage... *^_^*
You don't have to check every possible directories in the PC.
Even ActiveSync was installed but if wcescomm.exe is not running,
that would cause the same problem, I believe...
Instead, you can check the process list in the PC.
You can search MSDN for Process.GetProcessesByName() to check
if wcescomm.exe is running.
If you find it, that means ActiveSync will be triggered when cradled.
This gonna work because I did before with VB6 code.
However, if you feel registry way is easier, that would be fine,
bacause wcescomm.exe seldom get shutdown...
--
Best Regards,
Jan Yeh
MVP - Windows CE.NET, MCSD.NET, .NETcf consultant
http://blog.mvpcn.net/janyeh
"Darren Shaffer" <(E-Mail Removed)> 撰寫於郵件新聞:(E-Mail Removed)...
> Chapter 15 of Doug Boling's Programming Windows CE.Net explains how to use
> the CeUtil DLL to access the ActiveSync registry entries. Under
> HKEY_LOCAL_MACHINE
> the ActiveSync root key is CESVC_ROOT_MACHINE. If that is missing,
> ActiveSync
> is not installed. CeSvcOpen is the key fuction from the CeUtil DLL that
> you should
> investigate in solving your issue.
>
> -Darren Shaffer
>
> "Glyn Meek" <(E-Mail Removed)> wrote in message
> news:CPssd.1366$(E-Mail Removed)...
>>I posted something about this a few days ago, but we have been banging our
>>head against a brick wall for the last 5 days, almost none stop trying to
>>figure this out. We are trying to use RAPI to develop a routine to talk to
>>the Pocket PC. While it works perfectly when ActiveSync is up and
>>connected, and fails perfectly when ActiveSync is taken down or the device
>>pulled from the cradle, it gives us HUGE problems on PCs where ActiveSync
>>is NOT EVEN INSTALLED.
>>
>> If one of our customers just happens to stumble into the PC<-> PPC
>> interface by accident, and they do not have ActiveSync installed on their
>> PC, RAPI does not like this AT ALL, and bad things happen. Now, we can
>> fix this by not allowing the user to even get to the RAPI failing stuff
>> if we can detect whether Activesync is even installed on the user's PC.
>> If not, we don't go to the RAPI stuff, and if it is, then RAPI handles
>> everything perfectly....So, our question is
>>
>> "What is the DEFINITIVE way of determining if ActiveSync has been
>> installed on a PC?"
>>
>> We have had two suggestions already...
>>
>> 1) Check for the presence of wcescomm.exe ( BUT HOW DO YOU KNOW WHICH
>> DIRECTORY IT IS IN, AS WE DON'T WANT TO SEARCH EVERY DIRECTORY!!)
>>
>> and
>>
>> 2) Check in the registry to see. ( GREAT IDEA, BUT WHAT DO WE HAVE TO
>> LOOK FOR IN THE REGISTRY FOR ACTIVESYNC, AND IS THERE ANY WHITE PAPER OUT
>> THERE THAT TELLS US HOW TO DO THIS?)
>>
>> or
>>
>> is there some other method of determining if ActiveSync is
>> loaded/installed on a PC?
>>
>> Regards and thanks
>>
>> Glyn Meek
>>
>
>