IDiskQuotaUser::GetName method (dskquota.h)

Retrieves the name strings associated with a disk quota user.

Syntax

HRESULT GetName(
  [out] LPWSTR pszAccountContainer,
  [in]  DWORD  cchAccountContainer,
  [out] LPWSTR pszLogonName,
  [in]  DWORD  cchLogonName,
  [out] LPWSTR pszDisplayName,
  [in]  DWORD  cchDisplayName
);

Parameters

[out] pszAccountContainer

The name of the user's account container. This value can be NULL. For accounts without directory service information, this string is simply the domain name. For accounts with directory service information available, this string is a canonical name with the terminating object name removed.

[in] cchAccountContainer

The size of the account container buffer, in characters. Ignored if pszAccountContainer is NULL.

[out] pszLogonName

A pointer to the buffer to receive the name the user specified to log on the computer. This value can be NULL. The format of the name returned depends on whether directory service information is available.

[in] cchLogonName

The size of the logon name buffer, in characters. Ignored if pszLogonName is NULL.

[out] pszDisplayName

A pointer to the buffer to receive the display name for the quota user. This value can be NULL. If the information is not available, the string returned is of zero length.

[in] cchDisplayName

The size of the display-name buffer, in characters. Ignored if pszDisplayName is NULL.

Return value

This method returns one of the following values.

Return code Description
S_OK
Success.
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