Adding a New ACL Member
You can insert a user as a new member of the ACL table and insert a set of access rights for that user with the IExchangeFolderACLs::HrInsert method.
To add a new ACL member
-
Retrieve an interface pointer to the ACL object using HrFolderACLsOpen.
-
Open the address book and get the entry identifier of the user whose access rights you are adding to the ACL. First, open the address book by calling the IMAPISession::OpenAddressBook method. Then, to obtain the user’s entry identifier, call the IAdrBook::ResolveName method.
-
Call the ACL object’s IExchangeFolderACLs::HrInsert method to insert a user as a new member of the ACL table. This call also inserts a set of access rights for that user. In this call, pass the rights requested for the new member in the lRights parameter, and the user’s entry identifier obtained in step 2 in the lpentryid parameter.
For an example of this procedure, see the bDoInsert function in the \BKOFFICE\SAMPLES\EXCHANGE\ACLEDIT\ACLEDIT.CPP source file.