[in] A pointer to the MAPIUID structure that identifies the profile section to be opened. Passing NULL for the lpUid parameter opens the caller's profile section.
[in] A bitmask of flags that controls how the profile section is opened. The following flags can be set:
Allows OpenProfileSection to return successfully, possibly before the profile section is fully accessible to the caller. If the profile section is not accessible, making a subsequent object call can result in an error.
Requests read/write permission. By default, objects are opened as read-only, and callers should not work on the assumption that read/write permission has been granted.
[out] A pointer to a pointer to the opened profile section.
The IMAPISupport::OpenProfileSection method is implemented for all support objects. Service providers and message services call OpenProfileSection to open a profile section and retrieve a pointer to its IProfSect interface implementation.
OpenProfileSection opens profile sections as read-only, unless you set the MAPI_MODIFY flag in the ulFlags parameter and your permission is sufficient. Setting this flag does not guarantee read/write permission; the permissions that you are granted depend on your access level and the object.
If OpenProfileSection attempts to open a nonexistent profile section as read-only, it returns MAPI_E_NOT_FOUND. If OpenProfileSection attempts to open a nonexistent profile section as read/write, it creates the profile section and returns the IProfSect pointer.