[in] A pointer to the MAPIUID structure that identifies the profile section.
[in] A pointer to the interface identifier (IID) that represents the interface to be used to access the profile section. Passing NULL causes the lppProfSect parameter to return a pointer to the profile section’s standard interface, IProfSect.
[in] A bitmask of flags that controls access to the profile section. The following flags can be set:
Allows OpenProfileSection to return successfully, possibly before the profile section is fully available to the calling client. If the profile section is not available, making a subsequent call to it can cause an error.
Allows access to a profile section that does not belong to the provider.
Requests read/write permission. By default, profile sections are opened with read-only permission, and clients should not work on the assumption that read/write permission has been granted.
[out] A pointer to a pointer to the profile section.
The IMAPISession::OpenProfileSection method opens a profile section or object that supports the IProfSect interface. Profile sections are used for reading information from and writing information to the session profile.
You cannot use OpenProfileSection to open profile sections that individual service providers own unless you specify MAPI_FORCE_ACCESS in the ulFlags parameter.
Multiple clients can open a profile section with read-only permission, but only one client can open a profile section with read/write permission. 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. Be sure that 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 will fail with MAPI_E_NOT_FOUND.