UserIsMemberOf   

ITcUserManager::UserIsMemberOf   

ITcUserManager

Checks whether the invoking thread is a member of the desired user group.

HRESULT UserIsMemberOf(
  BSTR bstrUserGroup,
  VARIANT varUserName,
  VARIANT_BOOL* pbResult
);

Parameters

bstrUserGroup

[in]

Via the pointer pblsMemberOf.

varUserName

[in]

Optional name of a user provided as a BSTR.

pbResultc

[out, retval]
Pointer to a VARIANT_BOOL, in which the result of the query is to be 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.