IAcctMgmt::GetNameFromSid Method
Gets the account name using a security identifier.
IDL Definition
HRESULT GetNameFromSid (
[in] BSTR bstrDomain,
[in] VARIANT varSid,
[out] VARIANT* varDomainName,
[out] VARIANT* varUserLogin
);
Visual Basic Definition
Public Sub GetNameFromSid(
bstrDomain as String,
varSid as Variant,
ByRef varDomainName as Variant,
ByRef varUserLogin as Variant
)
Parameters
- bstrDomain
- The domain in which the account resides. If the string is empty, the local system domain is assumed.
- varSid
- The security identifier (SID) to package in the form of a VT_ARRAY | VT_UI1 (VARIANT SAFEARRAY of unsigned chars).
- varDomainName
- On return, a VT_BSTR containing the domain name in which the account resides.
- varUserLogin
- On return, a VT_BSTR containing the account name.
Example
See the class example.