Because no specially declared property holds the entry identifier of an information store Inbox, you must call a function to retrieve its entry identifier.
The following sample code is from the SMBAGENT.C file in the \BKOFFICE\SAMPLES\EXCHANGE\SMBAGENT directory. It opens the Inbox folder in the mailbox of the SMBAGENT sample application.
// Find SMBAGENT's Inbox folder
hr = HrMAPIFindInbox( lpStore, &cbInEntryID, &lpInEntryID);
ASSERTERROR ( lpInEntryID != NULL, "NULL lpInEntryID");
// Open SMBAGENT's Inbox folder
hr = MAPICALL(lpRootFolder)->OpenEntry( lpRootFolder,
cbInEntryID,
lpInEntryID,
NULL,
MAPI_MODIFY|MAPI_DEFERRED_ERRORS,
&ulObjType,
(LPUNKNOWN FAR *) &lpInFolder);
if( ulObjType != MAPI_FOLDER)
{
hr = HR_LOG( E_FAIL);
goto cleanup;
}