IDiskQuotaControl::Initialize method (dskquota.h)
Initializes a new DiskQuotaControl object by opening the NTFS file system volume with the requested access rights. The return value indicates whether the volume supports NTFS file system disk quotas and whether the caller has sufficient access rights.
Syntax
HRESULT Initialize(
[in] LPCWSTR pszPath,
[in] BOOL bReadWrite
);
Parameters
[in] pszPath
The path to the volume root, such as C:\ or \\yourcomputer.
[in] 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. To write data to the quota file, you must specify TRUE, and the call to this method must return successfully.
Return value
This method returns one of the following values.
Return code | Description |
---|---|
|
Success. |
|
The caller has insufficient access rights. |
|
The requested path name is invalid. |
|
The requested file or object is not found. |
|
The controller object has already been initialized. Multiple initialization is not allowed. |
|
The requested file path is invalid. |
|
The file system does not support quotas. |
|
The requested file path is not found. |
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 |