IDiskQuotaUser::GetSid method (dskquota.h)

Retrieves the user's security identifier (SID).

Syntax

HRESULT GetSid(
  [out] LPBYTE pbSidBuffer,
  [in]  DWORD  cbSidBuffer
);

Parameters

[out] pbSidBuffer

The SID.

[in] cbSidBuffer

The size of the buffer, in bytes. Use the IDiskQuotaUser::GetSidLength method to obtain the required size for the buffer.

Return value

This method returns one of the following values.

Return code Description
S_OK
Success.
E_INVALIDARG
The pbSidBuffer parameter is NULL.
ERROR_INVALID_SID
The SID for the user is invalid.
ERROR_INSUFFICIENT_BUFFER
Insufficient destination buffer size.
ERROR_LOCK_FAILED
Failure to obtain an exclusive lock.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header dskquota.h
DLL Dskquota.dll

See also

Disk Management Interfaces

Disk Quotas

IDiskQuotaUser