The IMsgServiceAdmin::OpenProfileSection method opens a section of the current profile and returns an IProfSect pointer for further access.
See IMsgServiceAdmin : IUnknown.
HRESULT OpenProfileSection(
LPMAPIUID lpUID,
LPCIID lpInterface,
ULONG ulFlags,
LPPROFSECT FAR * lppProfSect
);
The IMsgServiceAdmin::OpenProfileSection method opens a profile section — an object that supports the IProfSect interface. Profile sections are used for reading information from and writing information to the session profile.
OpenProfileSection cannot be used to open profile sections owned by individual service providers.
Multiple clients can open a profile section with read-only access, but only one client can open a profile section with read/write access. If another client has a profile section open that you attempt to open by calling OpenProfileSection with the MAPI_MODIFY flag set, the call will fail, returning MAPI_E_NO_ACCESS.
A read-only open operation fails if the section is open for writing.
You can create a profile section by calling OpenProfileSection with the MAPI_MODIFY flag and a nonexistent MAPIUID structure in the lpUID parameter. Make sure you specify MAPI_MODIFY. If you set lpUID to point to a nonexistent MAPIUID and OpenProfileSection is set to use the default access mode of read-only, the call fails with MAPI_E_NOT_FOUND.
IMAPIProp : IUnknown, IMAPISession::OpenProfileSection, IProfSect : IMAPIProp, MAPIUID