ISyncChange::GetRootItemId
Gets the ID of the changed item.
HRESULT GetRootItemId(
BYTE * pbRootItemId,
DWORD * pcbIdSize);
Parameters
- pbRootItemId
[in, out, unique, size_is(*pcbIdSize)] Returns the ID of the item.
- pcbIdSize
[in, out] Specifies the number of bytes in pbRootItemId. Returns the number of bytes required to retrieve the ID when pbRootItemId is too small, or returns the number of bytes written.
Return Value
S_OK
E_POINTER
HRESULT_FROM_WIN32(ERROR_MORE_DATA) when pbRootItemId is too small. In this case, the required number of bytes is returned in pcbIdSize.
Example
The following example shows how to obtain the root item ID when IDs are stored by using the SYNC_GID structure.
SYNC_GID gidItem;
DWORD cbID = sizeof(gidItem);
hr = pChange->GetRootItemId((BYTE*)&gidItem, &cbID);