How to allow desktop app to communicate with mobile app?

P

Peter Rilling

Hi,

I would like some suggestions at the best way to accomplish this.

I have a desktop and compact framework application that need to communicate.
The setup that I will require is that they are cradled so there is a direct
connection between the two devices. What is the best way to allow these two
applications to communicate. I was looking at RAPI but that is for
controlling the device and does not allow me to open a connection to a
specific application. I was also thinking about sockets but am not sure if
that would be easy through a cradled device.
 
D

dbgrick

You write a DLL that you can call from RAPI. Then call a method in the dll.
Then your dll, (On the device) will tell your app to perform the
communications. There are a variety of ways to send notifications between
apps. For CF, I like creating a named event that both the dll and app can
use and then use the WindowsCE notification class on the Managed code to
receive the message. You will need to write the RAPI device dll in unmanaged
code. I don't think you can write in managed.

I hope this helps.
Regards,
Rick D.
 
P

Paul G. Tobey [eMVP]

There's no right answer but, since there is a simulated network connection
between the cradled device and the desktop computer, network communications
are easy. You want the server (the program calling Accept() on a socket),
to be on the PC side and the client to be on the device side, usually. The
client can connect to "ppp_peer" as a hostname and that will map to the
desktop PC connected to the cradle.

Paul T.
 
S

Simon Hart [MVP]

Sockets would work a treat and allow you to implement the solution in managed
code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top