IDiskQuotaControl::GetQuotaState method (dskquota.h)

Retrieves a set of flags describing the state of the quota system.

Syntax

HRESULT GetQuotaState(
  [out] LPDWORD pdwState
);

Parameters

[out] pdwState

The quota state flags. This parameter can include one or more of the following flags.

Value Meaning
DISKQUOTA_FILESTATE_INCOMPLETE
0x00000100
The volume's quota information is out of date. Quotas are probably disabled.
DISKQUOTA_FILESTATE_REBUILDING
0x00000200
The volume is rebuilding its quota information.
DISKQUOTA_STATE_DISABLED
0x00000000
Quotas are not enabled on the volume.
DISKQUOTA_STATE_ENFORCE
0x00000002
Quotas are enabled and the limit value is enforced. Users cannot exceed their quota limit.
DISKQUOTA_STATE_TRACK
0x00000001
Quotas are enabled but the limit value is not being enforced. Users may exceed their quota limit.

Return value

This method returns a file system error or one of the following values.

Return code Description
S_OK
Success.
ERROR_ACCESS_DENIED
The caller has insufficient access rights.
ERROR_NOT_READY
The DiskQuotaControl object is not initialized.
E_INVALIDARG
The pdwState parameter is incorrect.
E_OUTOFMEMORY
Insufficient memory.
E_FAIL
An unexpected file system error occurred.
E_UNEXPECTED
An unexpected exception occurred.

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

IDiskQuotaControl