IReplObjHandler::GetPacket (Windows CE 5.0)
This method is a user-implemented method that serializes an object into one or more packets for transmission between the Windows CE–based device and the desktop computer.
HRESULT GetPacket(LPBYTE* lppbData,DWORD* pcbData,DWORD cbRecommend);
Parameters
- lppbData
[in] Long pointer to a pointer of the outgoing packet. - pcbData
[in] Pointer to a DWORD for the packet size. - cbRecommend
[in] Recommended maximum size of the packet.
Return Values
The following table shows the possible returns values for this method.
Value | Description |
---|---|
NOERROR | The operation created one packet. |
RERR_BAD_OBJECT | The operation failed to create one object. If the receiver does receive some of the earlier packets, they should be discarded. |
RERR_TRY_AGAIN | The operation failed to create an object. The server should try again later to replicate the object. |
RERR_VOL_INACTIVE | The volume has become inactive. |
RWRN_LAST_PACKET | A packet was created, and it is the last one for the object. |
Remarks
During deserialization, the ActiveSync manager calls GetPacket repeatedly until RWRN_LAST_OBJECT or an error value is returned. The ActiveSync service provider determines how many packets are to be sent and the sizes of each packet. For efficiency, packet size is recommended to be less than 8KB.
Allocation and deallocation of memory for the packet is the responsibility of the ActiveSync service provider. An ActiveSync service provider sets lppbData to that pointer and sets pcbData with the packet size. Typically, an ActiveSync service provider allocates a piece of memory of a known size in IReplObjHandler::Setup and frees it in IReplObjHandler::Reset.
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Cesync.h.
Link Library: Coredll.lib.
See Also
IReplObjHandler::Reset | IReplObjHandler::SetPacket
Send Feedback on this topic to the authors