Partager via


Sending and Receiving Data with the SyncData Function

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The optional developer-implemented SyncData device function provides an easy and flexible way for the desktop service provider to send and receive data to and from the Windows Mobile device. The following is the prototype for SyncData.

typedef HRESULT (*PSYNCDATA)(PSDREQUEST psd);

The following is the definition of SDREQUEST structure used by the function.

typedef struct SDREQUEST
{
   OBJTYPENAME szObjType;  // object type this data comes from
   BOOL        fSet;       // TRUE if sending   data to   device
                           // FALSE if receiving data from device
   UINT        uCode;      // For receiving data, value must be < 8.
   LPBYTE      lpbData;
   UINT        cbData;
} SDREQUEST, *PSDREQUEST;

The new code QDC_SYNC_DATA is added to IReplNotify::QueryDevice. The desktop service provider can make up a SDREQUEST structure and pass the structure to IReplNotify::QueryDevice. The ActiveSync manager will send the request down and call up the device service provider so it can receive or return the requested data.

See Also

Concepts

Design Guidelines for ActiveSync Synchronization Service Providers