问题
I want to make a desktop application trigger an event on a Windows Mobile 6 standard device (smartphone).
How can I make the smartphone and desktop communicate?
Where can I find some code examples of this? I'm using C#...
To clarify:
It will not be docked with USB. I would like to use WLAN.
I want to trigger an event within my application that is already running on the smartphone.
回答1:
One solution is to use RAPI. If you do so, then have a look at RAPI communication library at OpenNETCF. This is a C# wrapper for the SDK functions.
With RAPI you can do the following:
- Copy files from desktop to mobile device and vice versa
- Initiate a process at the mobile device from the desktop
I suppose it would be difficult to have a message exchange mechanism using RAPI. It would be easier to use Bluetooth or Wi-Fi communication for this purpose. A nice example is this article at Code Project.
回答2:
Is the smartphone docked via USB into this desktop? If so, look at RAPI (the 'Windows Mobile Remote API') which lets software on the desktop invoke APIs on the device. RAPI is documented in the Windows Mobile SDK.
回答3:
You can use the RAPI APIs from the desktop. There is no direct "fire this event" type of call, but you can always create your own RAPI extension that would do it and call CeRapiInvoke. There is a free, open-source managed wrapper for the RAPI calls here.
来源:https://stackoverflow.com/questions/542287/desktop-to-windows-mobile-communication