Platform SDK: Files and I/O

IDiskQuotaControl::Initialize

Initializes a new QuotaControl object by opening the NTFS volume with the requested access rights. The return value indicates whether the volume supports NTFS disk quotas and whether the caller has sufficient access rights.

HRESULT Initialize(
  LPCWSTR pszPath, 
  BOOL bReadWrite
);

Parameters

pszPath
Specifies the path to the volume root.
bReadWrite
If this value is TRUE, the volume is opened in read/write mode. If this value is FALSE, the volume is opened in read-only mode.

Return Values

This method returns one of the following values.

Value Meaning
NOERROR Success.
ERROR_ACCESS_DENIED The caller has insufficient access rights.
ERROR_BAD_PATHNAME The requested path name is invalid.
ERROR_FILE_NOT_FOUND The requested file or object was not found.
ERROR_INITIALIZED The controller object has already been initialized. Multiple initialization is not allowed.
ERROR_INVALID_NAME The requested file path is invalid.
ERROR_NOTSUPPORTED The file system does not support quotas.
ERROR_PATH_NOT_FOUND The requested file path was not found.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Dskquota.h.

See Also

File Systems Overview, File System Interfaces, IDiskQuotaControl