UserEnumLocalGroups  

ITcUserManager::UserEnumLocalGroups  

ITcUserManager

Returns the user groups to which a user belongs.

HRESULT UserEnumLocalGroups(
  VARIANT varUserName,
  SAFEARRAY(BSTR)* ppGroups
);

Parameters

varUserName

[in, optional]
There is an option to provide the name of the user as a BSTR. If no name is provided, the user of the invoking thread is queried.

ppGroups

[out, retval]
Pointer to SAFEARRAY of BSTRs, in which the names of the user groups are stored.

Return Values

HRESULT == S_OK

Query executed successfully.

HRESULT != S_OK

If an error occurs an error code generated by Windows NT appears in HRESULT. In order to instigate a COM/OLE error handling sequence, an HRESULT is created from the error code from HRESULT_FROM_NT(nErrror). Here it should be noted that the Windows NT error code is displayed in low-order 16 bit format.