IExchangeManageStore::EntryIDFromSourceKey
The EntryIDFromSourceKey method obtains the entry identifier for either a folder or message from its PR_SOURCE_KEY property.
HRESULT EntryIDFromSourceKey(
ULONG cFolderKeySize,
BYTE FAR * pFolderSourceKey,
ULONG cMessageKeySize,
BYTE FAR * pMessageSourceKey,
ULONG FAR * lpcbEntryID,
LPENTRYID FAR * lppEntryID
);
Parameters
-
cFolderKeySize
-
Input parameter. The length, in bytes, of the key in pFolderSourceKey.
-
pFolderSourceKey
-
Input parameter. Points to a folder source key, identified by a PR_SOURCE_KEY property, for which you either want an entry identifier or want an entry identifier for a message within this folder.
-
cMessageKeySize
-
Input parameter. The length, in bytes, of the message source key in pMessageSourceKey. If you want to get the entry identifier for a folder, set this parameter to zero.
-
pMessageSourceKey
-
Input parameter. Points to a message source key, identified by a PR_SOURCE_KEY property, for which you want an entry identifier. If you want to get the entry identifier for a folder, set this parameter to NULL.
-
lpcbEntryID
-
Output parameter. The length, in bytes, of the entry identifier returned in lppEntryID.
-
lppEntryID
-
Output parameter. Points to the address of a MAPI ENTRYID structure, which contains the entry identifier for the folder or message.
Return Values
See Return Values.
In addition, EntryIDFromSourceKey can return one of the following values:
-
SUCCESS_SUCCESS
-
The method completed successfully.
-
MAPI_E_CALL_FAILED
-
An unknown error occurred.
-
MAPI_E_INVALID_PARAMETER
-
One of the parameters was not valid.
-
MAPI_E_NOT_ENOUGH_MEMORY
-
There wasn't enough memory to complete the operation.
Remarks
The EntryIDFromSourceKey method retrieves the entry identifier for a folder from its PR_SOURCE_KEY property or for a message from its PR_SOURCE_KEY property and its folder's PR_SOURCE_KEY property.
See Also
IExchangeManageStore