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