Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The ConvertToSid method retrieves the security identifier (SID) associated with the specified identity and identity provider.
Syntax
HRESULT ConvertToSid(
[in] LPCWSTR lpszUniqueID,
[in] REFGUID ProviderGUID,
[in] USHORT cbSid,
[in, out] BYTE *pSid,
[out] USHORT *pcbRequiredSid
);
Parameters
[in] lpszUniqueID
The identity for which to retrieve the SID.
[in] ProviderGUID
The GUID of the identity provider.
[in] cbSid
The size, in bytes, of the buffer pointed to by the pSid parameter.
[in, out] pSid
A pointer to the SID this method retrieves.
[out] pcbRequiredSid
The required length, in bytes, of the pSid buffer.
Return value
If the method succeeds, it returns S_OK.
If the method fails, it returns an error code. For a list of common error codes, see Common HRESULT Values.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | identitystore.h |