Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
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: CeRapiInitand CeRapiInitEx. CeRapiInitdoes not return until the connection is made, an error occurs, or another thread calls CeRapiUninit.

CeRapiInitExworks slightly differently. Instead of blocking the calling thread, it returns an event handle to indicate when initialization is complete. Use CeRapiInitExto avoid blocking a thread inside a call to CeRapiInit. CeRapiInitExreturns immediately and continues initialization until the connection is made, until an error occurs, or until there is a call to CeRapiUninit. When CeRapiInitExis complete, it sets the event specified in the heRapiInitmember of the RAPIINITstructure. After calling CeRapiInitEx, check the return value to determine whether an error occurred. If the call was initially successful, call the MsgWaitForMultipleObjectsfunction to wait for the event handle passed back in the heRapiInitmember of the RAPIINITstructure. When the event is set, check the hrRapiInitmember of the RAPIINITstructure to determine whether the connection was successful. To shut down or to stop the connection process, call the CeRapiUnInitfunction.

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 IDccManSinkinterface to provide support for Internet Protocol version 6 (IPv6).

IRAPIStream

X

X

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

See Also

Other Resources

RAPI Reference