RAPI Interfaces

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Before you can invoke any RAPI functions, you must initialize the underlying communications layer between the host computer and the Windows® phone, which must be connected to the host computer through a cable or a cradle. There are two versions of the RAPI initialization function you can use: CeRapiInit and CeRapiInitEx. CeRapiInit does not return until the connection is made, an error occurs, or another thread calls CeRapiUninit.

CeRapiInitEx works slightly differently. Instead of blocking the calling thread, it returns an event handle to indicate when initialization is complete. Use CeRapiInitEx to avoid blocking a thread inside a call to CeRapiInit. CeRapiInitEx returns immediately and continues initialization until the connection is made, until an error occurs, or until there is a call to CeRapiUninit. When CeRapiInitEx is complete, it sets the event specified in the heRapiInit member of the RAPIINIT structure. After calling CeRapiInitEx, check the return value to determine whether an error occurred. If the call was initially successful, call the MsgWaitForMultipleObjects function to wait for the event handle passed back in the heRapiInit member of the RAPIINIT structure. When the event is set, check the hrRapiInit member of the RAPIINIT structure to determine whether the connection was successful. To shut down or to stop the connection process, call the CeRapiUnInit function.

The following interfaces are part of the Remote API (RAPI).

Interface Windows Mobile Professional Windows Mobile Standard Description

IDccManSink

X

X

Implemented by a desktop client application that needs to be notified by the Windows Mobile connection manager when a device connects or disconnects.

IDccManSink2

X

X

Extends the IDccManSink interface to provide support for Internet Protocol version 6 (IPv6).

IRAPIStream

X

X

Extends the IStream interface with two methods that allow the setting of time-outs.

See Also

Other Resources

RAPI Reference