IDiskQuotaControl::FindUserName method (dskquota.h)
Locates a specific entry in the volume quota information. The user's account logon name is used as the search key.
Syntax
HRESULT FindUserName(
[in] LPCWSTR pszLogonName,
[out] PDISKQUOTA_USER *ppUser
);
Parameters
[in] pszLogonName
A pointer to the user's account logon name.
[out] ppUser
A pointer to the IDiskQuotaUser interface pointer to the quota user object.
Return value
This method returns a file system error or one of the following values.
Return code | Description |
---|---|
|
Success. |
|
The caller has insufficient access rights. |
|
The SID for the user is invalid. |
|
There is no mapping available for the SID. |
|
The DiskQuotaControl object is not initialized. |
|
The pUserSid or ppUser parameter is NULL. |
|
Insufficient memory. |
|
An unexpected file system error occurred. |
|
An unexpected exception occurred. |
Remarks
This method will return a user object even if there is no quota record for the user in the quota file. This is consistent with the idea of automatic user addition and default quota settings. If there is currently no quota entry for the requested user, and the user would be added to the quota file if he were to request disk space, the returned user object will have warning threshold and hard quota limits equal to the volume default settings.
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 |