Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpiCore)  1.26.2
User Management functions
Collaboration diagram for User Management functions:

Functions

MLPIRESULT mlpiAccessControlGetUserPolicies (const MLPIHANDLE connection, MlpiUserPolicies *userPolicies)
 
MLPIRESULT mlpiAccessControlGetPasswordPolicies (const MLPIHANDLE connection, MlpiPasswordPolicies *passwordPolicies)
 
MLPIRESULT mlpiAccessControlGetAllUserInfos (const MLPIHANDLE connection, MlpiUserInfo *userInfos, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiAccessControlAddUser (const MLPIHANDLE connection, MlpiUserDetails userDetails, const WCHAR16 *tmpPassword)
 
MLPIRESULT mlpiAccessControlGetUser (const MLPIHANDLE connection, const WCHAR16 *username, MlpiUserDetails *userDetails)
 
MLPIRESULT mlpiAccessControlSetUser (const MLPIHANDLE connection, MlpiUserDetails userDetails)
 
MLPIRESULT mlpiAccessControlDeleteUser (const MLPIHANDLE connection, const WCHAR16 *username)
 
MLPIRESULT mlpiAccessControlChangePassword (const MLPIHANDLE connection, const WCHAR16 *username, const WCHAR16 *oldPassword, const WCHAR16 *newPassword)
 
MLPIRESULT mlpiAccessControlGetAllGroupInfos (const MLPIHANDLE connection, MlpiGroupInfo *groupInfos, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiAccessControlGetAllGroupsOfUser (const MLPIHANDLE connection, const WCHAR16 *username, WCHAR16 *groupNames, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiAccessControlGetAllUsersOfGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, WCHAR16 *usernames, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiAccessControlAddUserToGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, const WCHAR16 *username)
 
MLPIRESULT mlpiAccessControlRemoveUserFromGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, const WCHAR16 *username)
 
MLPIRESULT mlpiAccessControlSetUsersOfGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, const WCHAR16 *usernames)
 
MLPIRESULT mlpiAccessControlSetGroupsOfUser (const MLPIHANDLE connection, const WCHAR16 *username, const WCHAR16 *groupNames)
 
MLPIRESULT mlpiAccessControlGetGroupPolicies (const MLPIHANDLE connection, MlpiGroupPolicies *groupPolicies)
 
MLPIRESULT mlpiAccessControlResetPassword (const MLPIHANDLE connection, const WCHAR16 *username, const WCHAR16 *newPassword)
 
MLPIRESULT mlpiAccessControlAddGroup (const MLPIHANDLE connection, MlpiGroupDetails groupDetails)
 
MLPIRESULT mlpiAccessControlGetGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, MlpiGroupDetails *groupDetails)
 
MLPIRESULT mlpiAccessControlSetGroup (const MLPIHANDLE connection, MlpiGroupDetails groupDetails)
 
MLPIRESULT mlpiAccessControlDeleteGroup (const MLPIHANDLE connection, const WCHAR16 *groupName)
 
MLPIRESULT mlpiAccessControlSetPermissionsOfGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, const WCHAR16 *permissions)
 
MLPIRESULT mlpiAccessControlGetAllPermissionsOfGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, WCHAR16 *permissions, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiAccessControlGetAllPermissions (const MLPIHANDLE connection, WCHAR16 *permissions, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiAccessControlSetAuthorizedGroupsOfPermission (const MLPIHANDLE connection, const WCHAR16 *permission, const WCHAR16 *groupNames)
 
MLPIRESULT mlpiAccessControlGetAllAuthorizedGroupsOfPermission (const MLPIHANDLE connection, const WCHAR16 *permission, WCHAR16 *groupNames, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiAccessControlAddPermissionToGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, const WCHAR16 *permission)
 
MLPIRESULT mlpiAccessControlRemovePermissionFromGroup (const MLPIHANDLE connection, const WCHAR16 *groupName, const WCHAR16 *permission)
 

Detailed Description

Contains various functions which are handy for the management of users configured on the target control.

Function Documentation

MLPIRESULT mlpiAccessControlGetUserPolicies ( const MLPIHANDLE  connection,
MlpiUserPolicies userPolicies 
)

This function returns information regarding the policies that apply to all users.

Parameters
[in]connectionHandle for multiple connections.
[out]userPoliciesPointer to structure where the user policies will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiUserPolicies userPolicies;
2 MLPIRESULT result = mlpiAccessControlGetUserPolicies(connection, &userPolicies);
MLPIRESULT mlpiAccessControlGetPasswordPolicies ( const MLPIHANDLE  connection,
MlpiPasswordPolicies passwordPolicies 
)

This function returns information regarding the policies that apply to all the user passwords.

Parameters
[in]connectionHandle for multiple connections.
[out]passwordPoliciesPointer to structure where the password policies will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiPasswordPolicies passwordPolicies;
2 MLPIRESULT result = mlpiAccessControlGetPasswordPolicies(connection, &passwordPolicies);
MLPIRESULT mlpiAccessControlGetAllUserInfos ( const MLPIHANDLE  connection,
MlpiUserInfo userInfos,
const ULONG  numElements,
ULONG numElementsRet 
)

This function returns information regarding all the users currently found within the user manager located on the target device.

Parameters
[in]connectionHandle for multiple connections.
[out]userInfosArray that will store all the available user information..
[in]numElementsSize of the given userInfos array.
[out]numElementsRetReturn count representing the total amount of user information available on the target device.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiUserInfo *userInfos = new MlpiUserInfo[10];
2 ULONG numElementsRet = 0;
3 MLPIRESULT result = mlpiAccessControlGetAllUserInfos(connection, userInfos, 10, &numElementsRet);
MLPIRESULT mlpiAccessControlAddUser ( const MLPIHANDLE  connection,
MlpiUserDetails  userDetails,
const WCHAR16 tmpPassword 
)

This function adds a new user in the target that can be used for authentication. Once the user is added the password shall be changed immediately by logging in using the temporary password.

Parameters
[in]connectionHandle for multiple connections.
[in]userDetailsStructure to be written containing the information of the new user (the userId is obsolete, as it is defined automatically by the user manager on the target control).
[in]tmpPasswordTemporary password that is suggested to be modified during first login.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *tmpPassword = L"newTestPassword";
2 MlpiUserDetails userDetails;
3 wcscpy16(userDetails.username, L"testUsername");
4 wcscpy16(userDetails.description, L"testDescription");
5 userDetails.lifetimeType = MLPI_ACCESSCONTROL_USER_PERMANENT;
6 userDetails.disabled = false;
7 
8 MLPIRESULT result = mlpiAccessControlAddUser(connection, userDetails, tmpPassword);
MLPIRESULT mlpiAccessControlGetUser ( const MLPIHANDLE  connection,
const WCHAR16 username,
MlpiUserDetails userDetails 
)

This function obtains the user details of a specific user.

Parameters
[in]connectionHandle for multiple connections.
[in]usernameUsername that identifies the user, whose information will be retrieved.
[out]userDetailsPointer to structure to be written containing the information of the indicated user.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiUserDetails userDetails;
2 WCHAR16 *username = L"testUsername";
3 
4 MLPIRESULT result = mlpiAccessControlGetUser(connection, username, &userDetails);
MLPIRESULT mlpiAccessControlSetUser ( const MLPIHANDLE  connection,
MlpiUserDetails  userDetails 
)

This function allows to modify the information of a user. Within the userDetails argument, the correct Id of the user (if known) or username must be given.

Parameters
[in]connectionHandle for multiple connections.
[in]userDetailsAllows to modify the information of a specific user.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiUserDetails userDetails;
2 userDetails.userId = 0;
3 wcscpy16(userDetails.username, L"testUsername");
4 wcscpy16(userDetails.description, L"TestDescriptionModified");
5 userDetails.lifetimeType = MLPI_ACCESSCONTROL_USER_TEMPORARY;
6 userDetails.disabled = true;
7 
8 MLPIRESULT result = mlpiAccessControlSetUser(connection, userDetails);
MLPIRESULT mlpiAccessControlDeleteUser ( const MLPIHANDLE  connection,
const WCHAR16 username 
)

This function deletes a user specified by a given username.

Parameters
[in]connectionHandle for multiple connections.
[in]usernameUsername that identifies the user that is to be deleted.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *username = L"testUsername";
2 
3 MLPIRESULT result = mlpiAccessControlDeleteUser(connection, username);
MLPIRESULT mlpiAccessControlChangePassword ( const MLPIHANDLE  connection,
const WCHAR16 username,
const WCHAR16 oldPassword,
const WCHAR16 newPassword 
)

This function changes a user's password.

Parameters
[in]connectionHandle for multiple connections.
[in]usernameUsername that identifies the user, whose password will be changed.
[in]oldPasswordString that identifies the current password of the specified user.
[in]newPasswordString that identifies the new password to be set for the specified user.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *username = L"testUsername";
2 WCHAR16 *oldPassword = L"newTestPassword";
3 WCHAR16 *newPassword = L"testPassword";
4 
5 MLPIRESULT result = mlpiAccessControlChangePassword(connection, username, oldPassword, newPassword);
MLPIRESULT mlpiAccessControlGetAllGroupInfos ( const MLPIHANDLE  connection,
MlpiGroupInfo groupInfos,
const ULONG  numElements,
ULONG numElementsRet 
)

This function provides information regarding all the groups of users currently supported by the user manager located on the target device.

Parameters
[in]connectionHandle for multiple connections.
[out]groupInfosArray that will store all the available group information.
[in]numElementsSize of the given groupInfos array.
[out]numElementsRetReturn count representing the total amount of group information available on the target device.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiGroupInfo *groupInfos = new MlpiGroupInfo[10];
2 ULONG numElementsRet = 0;
3 MLPIRESULT result = mlpiAccessControlGetAllGroupInfos(connection, groupInfos, 10, &numElementsRet);
MLPIRESULT mlpiAccessControlGetAllGroupsOfUser ( const MLPIHANDLE  connection,
const WCHAR16 username,
WCHAR16 groupNames,
const ULONG  numElements,
ULONG numElementsRet 
)

This function provides the general group information of all the groups assigned to the specified user.

Parameters
[in]connectionHandle for multiple connections.
[in]usernameName that identifies the user, whose group information will be retrieved.
[out]groupNamesString where the group names (separated by semicolons) will be stored.
[in]numElementsNumber of WCHAR16 elements available in 'groupNames'.
[out]numElementsRetNumber of WCHAR16 elements in complete 'groupNames'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *username = L"testUsername";
2 WCHAR16 groupNames[128] = L"";
3 ULONG numElementsRet = 0;
4 MLPIRESULT result = mlpiAccessControlGetAllGroupsOfUser(connection, username, groupNames, _countof(groupNames), &numElementsRet);
MLPIRESULT mlpiAccessControlGetAllUsersOfGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
WCHAR16 usernames,
const ULONG  numElements,
ULONG numElementsRet 
)

This function obtains the user details of all the users assigned to the specified group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group, whose users information will be retrieved.
[out]usernamesString where the user names (separated by semicolons) will be stored.
[in]numElementsNumber of WCHAR16 elements available in 'usernames'.
[out]numElementsRetNumber of WCHAR16 elements in complete 'usernames'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"testGroupName";
2 WCHAR16 usernames[128] = L"";
3 ULONG numElementsRet = 0;
4 MLPIRESULT result = mlpiAccessControlGetAllUsersOfGroup(connection, groupName, usernames, _countof(usernames), &numElementsRet);
MLPIRESULT mlpiAccessControlAddUserToGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
const WCHAR16 username 
)

This function add a user to a specified group. In other words, the user will be identified as a member of the assigned group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group to which the user will be assigned.
[out]usernameName that identifies the user that is to be assigned to the specified group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"testGroup";
2 WCHAR16 *username = L"testUsername";
3 MLPIRESULT result = mlpiAccessControlAddUserToGroup(connection, groupName, username);
MLPIRESULT mlpiAccessControlRemoveUserFromGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
const WCHAR16 username 
)

This function removes a user from specified group. In other words, the user will not be identified as a member of the assigned group and hence, it won't have the group permissions anymore.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group from which the user will be removed.
[out]usernameName that identifies the user that is to be removed from the specified group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"testGroup";
2 WCHAR16 *username = L"testUsername";
3 MLPIRESULT result = mlpiAccessControlRemoveUserFromGroup(connection, groupName, username);
MLPIRESULT mlpiAccessControlSetUsersOfGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
const WCHAR16 usernames 
)

This function sets the Users of a Group. It is capable of adding multiple new users or deleting pre-existing ones in the group. It is recommended to first use the function mlpiAccessControlGetAllUsersOfGroup in order to verify that no unwanted user is added/deleted.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group to which the users will be assigned.
[out]usernamesString that contains the user names separated by semicolons.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"testGroup";
2 WCHAR16 *usernames = L"testUsername1;testUsername2";
3 MLPIRESULT result = mlpiAccessControlSetUsersOfGroup(connection, groupName, usernames);
MLPIRESULT mlpiAccessControlSetGroupsOfUser ( const MLPIHANDLE  connection,
const WCHAR16 username,
const WCHAR16 groupNames 
)

This function sets the Groups of a User. It is capable of adding multiple new groups to a user or deleting pre-existing ones in the user. It is recommended to first use the function mlpiAccessControlGetAllGroupsOfUser in order to verify that no unwanted group is added/deleted.

Parameters
[in]connectionHandle for multiple connections.
[in]usernameName that identifies the user to which the groups will be assigned.
[out]groupNamesString that contains the group names separated by semicolons.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *username = L"testUser";
2 WCHAR16 *groupNames = L"testGroup1;testGroup2";
3 MLPIRESULT result = mlpiAccessControlSetGroupsOfUser(connection, username, groupNames);
MLPIRESULT mlpiAccessControlGetGroupPolicies ( const MLPIHANDLE  connection,
MlpiGroupPolicies groupPolicies 
)

This function returns information regarding the policies that apply to all groups.

Parameters
[in]connectionHandle for multiple connections.
[out]groupPoliciesPointer to structure where the group policies will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiGroupPolicies groupPolicies;
2 MLPIRESULT result = mlpiAccessControlGetGroupPolicies(connection, &groupPolicies);
MLPIRESULT mlpiAccessControlResetPassword ( const MLPIHANDLE  connection,
const WCHAR16 username,
const WCHAR16 newPassword 
)

This function sets a new password for a specific user (password reset). It is recommended that only users with high privileges (i.e. acting as administrators) have the permission to use this method. The assignment of these permissions should be carried out by adding a new group to which the privileges will be assigned (i.e. using mlpiAccessControlAddGroup) or using a preexisting one, adding the user(s) to the desired group (i.e. using mlpiAccessControlAddUserToGroup or mlpiAccessControlSetUsersOfGroup) and finally assigning the desired permissions (i.e. using mlpiAccessControlAddPermissionToGroup). Users without these privileges can only change their own password by using mlpiAccessControlChangePassword.

Parameters
[in]connectionHandle for multiple connections.
[in]usernameUsername that identifies the user, whose password will be changed.
[in]newPasswordString that identifies the new password to be set for the specified user.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *username = L"testUsername";
2 WCHAR16 *newPassword = L"testPassword";
3 
4 MLPIRESULT result = mlpiAccessControlResetPassword(connection, username, newPassword);
MLPIRESULT mlpiAccessControlAddGroup ( const MLPIHANDLE  connection,
MlpiGroupDetails  groupDetails 
)

This function adds a new group in the target that can be used for authorization.

Parameters
[in]connectionHandle for multiple connections.
[in]GroupDetailsStructure to be written containing the information of the new group (groupId is obsolete, as it is defined automatically on the target).
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiGroupDetails groupDetails;
2 wcscpy16(groupDetails.groupName, L"testGroupname");
3 wcscpy16(groupDetails.description, L"testDescription");
4 groupDetails.disabled = false;
5 
6 MLPIRESULT result = mlpiAccessControlAddGroup(connection, groupDetails);
MLPIRESULT mlpiAccessControlGetGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
MlpiGroupDetails groupDetails 
)

This function obtains the details of a specific group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group, about which the information will be retrieved.
[out]groupDetailsPointer to structure to be written containing the information of the indicated group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiGroupDetails groupDetails;
2 WCHAR16 *groupName = L"testGroupName";
3 
4 MLPIRESULT result = mlpiAccessControlGetGroup(connection, groupName, &groupDetails);
MLPIRESULT mlpiAccessControlSetGroup ( const MLPIHANDLE  connection,
MlpiGroupDetails  groupDetails 
)

This function allows to modify the information of a group. Within the groupDetails argument, the correct Id of the group (if known) or group name must be given.

Parameters
[in]connectionHandle for multiple connections.
[in]groupDetailsAllows to modify the information of a specific group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MlpiGroupDetails groupDetails;
2 groupDetails.groupId = 0;
3 wcscpy16(groupDetails.groupName, L"testGroupName");
4 wcscpy16(groupDetails.description, L"TestDescriptionModified");
5 groupDetails.disabled = true;
6 
7 MLPIRESULT result = mlpiAccessControlSetGroup(connection, groupDetails);
MLPIRESULT mlpiAccessControlDeleteGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName 
)

This function deletes the group specified by the given group name.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group that is to be deleted.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"testUsername";
2 
3 MLPIRESULT result = mlpiAccessControlDeleteGroup(connection, groupName);
MLPIRESULT mlpiAccessControlSetPermissionsOfGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
const WCHAR16 permissions 
)

This function sets the permissions of the group specified by the given group name.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group that is to be deleted.
[in]permissionsThe permissions to be added to the group (separated by semicolons).
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"myGroupName";
2 WCHAR16 *groupPermissions = L"MLPI_APILIB_PERMISSION_ALL;MLPI_MOTIONLIB_PERMISSION_INFO";
3 
4 MLPIRESULT result = mlpiAccessControlSetPermissionsOfGroup(connection, groupName, groupPermissions);
MLPIRESULT mlpiAccessControlGetAllPermissionsOfGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
WCHAR16 permissions,
const ULONG  numElements,
ULONG numElementsRet 
)

This function obtains the permissions of the specified group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group, whose users information will be retrieved.
[out]permissionsString where the permissions (separated by semicolons) will be stored.
[in]numElementsNumber of WCHAR16 elements available in 'permissions'.
[out]numElementsRetTotal number of WCHAR16 elements returned.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"myGroupName";
2 WCHAR16 permissions[128] = L"";
3 ULONG numElementsRet = 0;
4 MLPIRESULT result = mlpiAccessControlGetAllPermissionsOfGroup(connection, groupName, permissions, _countof(permissions), &numElementsRet);
MLPIRESULT mlpiAccessControlGetAllPermissions ( const MLPIHANDLE  connection,
WCHAR16 permissions,
const ULONG  numElements,
ULONG numElementsRet 
)

This function obtains all permissions that are available (and therefore may be added to a group) on the target system.

Parameters
[in]connectionHandle for multiple connections.
[out]permissionsString where the permissions (separated by semicolons) will be stored.
[in]numElementsNumber of WCHAR16 elements available in 'permissions'.
[out]numElementsRetTotal number of WCHAR16 elements returned.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 permissions[4096] = L"";
2 ULONG numElementsRet = 0;
3 MLPIRESULT result = mlpiAccessControlGetAllPermissions(connection, permissions, _countof(permissions), &numElementsRet);
MLPIRESULT mlpiAccessControlSetAuthorizedGroupsOfPermission ( const MLPIHANDLE  connection,
const WCHAR16 permission,
const WCHAR16 groupNames 
)

This function assigns the specified permission(s) to the specified groups. The purpose of the function is to provide a 'batch' functionality to add permissions to more than one group at a time.

Parameters
[in]connectionHandle for multiple connections.
[in]permissionThe permission to be added to the groups.
[in]groupNamesNames that identify the groups (separated by semicolons) to which the permission is assigned.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *permission = L"MLPI_APILIB_PERMISSION_ALL";
2 WCHAR16 *groupNames = L"myGroupName1;myGroupName2;myGroupName3";
3 
4 MLPIRESULT result = mlpiAccessControlSetAuthorizedGroupsOfPermission(connection, permission, groupNames);
MLPIRESULT mlpiAccessControlGetAllAuthorizedGroupsOfPermission ( const MLPIHANDLE  connection,
const WCHAR16 permission,
WCHAR16 groupNames,
const ULONG  numElements,
ULONG numElementsRet 
)

This function obtains the groups to which a specific permission is assigned.

Parameters
[in]connectionHandle for multiple connections.
[in]permissionName that identifies the permission, to which the information will be retrieved.
[out]groupNamesString where the group names (separated by semicolons) will be stored.
[in]numElementsNumber of WCHAR16 elements available in 'groupNames'.
[out]numElementsRetTotal number of WCHAR16 elements returned.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *permission = L"MLPI_APILIB_PERMISSION_ALL";
2 WCHAR16 *groupNames = L"";
3 ULONG numElementsRet = 0;
4 MLPIRESULT result = mlpiAccessControlGetAllAuthorizedGroupsOfPermission(connection, permission, groupNames, _countof(groupNames), &numElementsRet);
MLPIRESULT mlpiAccessControlAddPermissionToGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
const WCHAR16 permission 
)

This function add a permission to a specified group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group to which the specified permission will be assigned.
[in]permissionName of the permission that will be assigned to the specified group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"myGroup";
2 WCHAR16 *username = L"MLPI_APILIB_PERMISSION_ALL";
3 MLPIRESULT result = mlpiAccessControlAddPermissionToGroup(connection, groupName, permission);
MLPIRESULT mlpiAccessControlRemovePermissionFromGroup ( const MLPIHANDLE  connection,
const WCHAR16 groupName,
const WCHAR16 permission 
)

This function removes a permission from the specified group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupNameName that identifies the group from which the specified permission will be removed.
[in]permissionName of the permission that will be removed from the specified group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 WCHAR16 *groupName = L"myGroup";
2 WCHAR16 *username = L"MLPI_APILIB_PERMISSION_ALL";
3 MLPIRESULT result = mlpiAccessControlRemovePermissionFromGroup(connection, groupName, permission);