views:

540

answers:

3

Is there a way that my .NET CF app running on a Windows CE device can know when the device is docked/synced with the PC?

+6  A: 

I believe this will help http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.status.aspx

nportelli
A: 

See the following: Microsoft.WindowsMobile.Status and ConnectionsDesktopCount. If ConnectionsDesktopCount is > 0 then you are docked to a PC.

See the the SDK sample here http://msdn.microsoft.com/en-us/library/bb158637.aspx for a demo of how to use Microsoft.WindowsMobile.Status.

Thanks, Mike

mjf
A: 

Hello

I don't think this is it. Maybe, with WM 5.0 devices this could work, what about the older devices? They don't support this solution.

Abhijeet Kashnia