IMSLogon::OpenEntry

The IMSLogon::OpenEntry method opens a folder or message object and returns a pointer to the object to provide further access.

Quick Info

See IMSLogon : IUnknown44MX9W.

 

HRESULT OpenEntry(

    ULONG cbEntryID,

 

    LPENTRYID lpEntryID,

 

    LPCIID lpInterface,

 

    ULONG ulOpenFlags,

 

    ULONG FAR * lpulObjType,

 

    LPUNKNOWN FAR * lppUnk

 

   )

 

 

Parameters

cbEntryID

[in] Size, in bytes, of the entry identifier pointed to by the lpEntryID parameter.

lpEntryID

[in] Pointer to the address of the entry identifier of the folder or message object to open.

lpInterface

[in] Pointer to the interface identifier (IID) for the object. Passing NULL indicates the object is cast to the standard interface for such an object. The lpInterface parameter can also be set to an identifier for an appropriate interface for the object.

ulOpenFlags

[in] Bitmask of flags that controls how the object is opened. The following flags can be set:

MAPI_BEST_ACCESS

The object should be opened with the maximum network permissions allowed for the user and the maximum client application access. For example, if the client has read/write access, the object is opened with read/write access; if the client has read-only access, the object is opened with read-only access. The client can retrieve the access level by getting the PR_ACCESS_LEVELLM5V4S property.

MAPI_DEFERRED_ERRORS

The call is allowed to succeed even if the underlying object is not accessible to the calling application. If the object is not accessible, some subsequent call to the object might return an error.

MAPI_MODIFY

Requests read/write access. By default, objects are created with read-only access, and clients should not work on the assumption that read/write access has been granted.

lpulObjType

[out] Pointer to the type of the opened object.

lppUnk

[out] Pointer to the pointer to the opened object.

 

Return Value

S_OK

The call succeeded and has returned the expected value or values.

 

Remarks

MAPI calls the IMSLogon::OpenEntry method to open a folder or a message in a message store. MAPI passes in the entry identifier of the object to open; the message store provider should return a pointer providing further access to the object in the lppUnk parameter.

Before MAPI calls IMSLogon::OpenEntry, it first determines that the given message or folder entry identifier matches one registered by this message store provider. For more information on how store providers register entry identifiers, see IMAPISupport::SetProviderUID1O.AZ2O.

IMSLogon::OpenEntry is identical to the IMsgStore::OpenEntry6KWF09 method of the message store object but is called by MAPI when processing an IMAPISession::OpenEntry method call instead of being called by a client. Objects opened using IMSLogon::OpenEntry should be treated exactly the same as objects opened with the message store object; in particular, objects opened using this call should be invalidated when the message store object is released.

See Also

IMAPISupport::SetProviderUID, IMsgStore::OpenEntry