The ZwSetQuotaInformationFile routine changes quota entries for the volume associated with the FileHandle parameter. All of the quota entries in the specified buffer are applied to the volume.
NTSTATUS ZwSetQuotaInformationFile( _In_ HANDLE FileHandle, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ PVOID Buffer, _In_ ULONG Length );
A handle for the file object that represents the file or volume for which the quota information is to be modified.
The address of the caller's I/O status block.
A buffer containing the new quota entries that should be applied to the volume. The quota information must be formatted as one or more FILE_QUOTA_INFORMATION structures. The NextEntryOffset field in the FILE_QUOTA_INFORMATION structure contains the offset, in bytes, of the next quota entry in the list. If there are no more entries after the current one, this member is zero.
The length in bytes of the buffer.
The ZwSetQuotaInformationFile routine returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:
||There were insufficient resources to complete the operation. This is an error code.|
||Quotas are not enabled on the volume. This is an error code.|
||The volume is read only. This is an error code.|
The ZwSetQuotaInformationFile routine applies all of the quota entries in the specified Buffer parameter to the volume.
The IoCheckQuotaBufferValidity function can check whether the specified quota buffer passed as the Buffer parameter is valid.
A call to ZwSetQuotaInformationFile will result in an IRP_MJ_SET_QUOTA request being sent to the device object that is associated with the file object whose handle is stored in the FileHandle parameter.
If the underlying file system does not support quota information (FAT and CDFS file systems, for example), ZwSetQuotaInformationFile will fail returning STATUS_INVALID_DEVICE_REQUEST.
|Windows version||Available in Windows 7 and later versions of Windows operating systems.|
|Header||ntifs.h (include Ntifs.h, FltKernel.h)|
|DDI compliance rules||PowerIrpDDis, HwStorPortProhibitedDDIs|