UserIsAdmin  

ITcUserManager::UserIsAdmin  

ITcUserManager

Checks whether the invoking thread belongs to the administrators’ group.

HRESULT UserIsAdmin(
VARIANT varUserName,
  VARIANT_BOOL* pbResult
);

Parameters

varUserName

[in]

Optional: Name of a user, provided as a BSTR. At the present time this option is not supported. The user status of the invoking thread is checked.

pbResult

[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.