Get All Groups
GetAllGroups¶
Retrieves all account groups from the system.
int GetAllGroups(std::vector<GroupRecord>* groups);
Parameters¶
- groups — pointer to a
std::vectorof GroupRecord structures where the retrieved groups will be stored.
Return Value¶
RET_OK— groups found and successfully retrieved.RET_NOT_FOUND— no groups found in the system.RET_*— other error codes.- Return Codes
Example¶
std::vector<GroupRecord> allGroups;
if (GetAllGroups(&allGroups) == RET_OK) {
// Process allGroups
}
Warning
- The
groupspointer must point to a validstd::vector<GroupRecord>object. - If no groups are found, the function will return
RET_NOT_FOUNDand leavegroupsunchanged. - Always check the return code before accessing
groups.