IDiskQuotaUserBatch::Add method (dskquota.h)

Adds an IDiskQuotaUser pointer to the batch list. This method calls AddRef on the pUser interface pointer. Release is automatically called on each contained IDiskQuotaUser interface pointer when the batch object is destroyed.

When setting values on a quota user object in preparation for batch processing, specify FALSE for the fWriteThrough parameter in the IDiskQuotaUser::SetQuotaLimit and IDiskQuotaUser::SetQuotaThreshold methods. This stores the values in memory without writing to disk. To write the changes to disk, call the IDiskQuotaUserBatch::FlushToDisk method.

Syntax

HRESULT Add(
  [in] PDISKQUOTA_USER pUser
);

Parameters

[in] pUser

A pointer to the quota user object's IDiskQuotaUser interface.

Return value

This method returns one of the following values.

Return code Description
S_OK
Success.
E_INVALIDARG
The pUser parameter is NULL.
E_OUTOFMEMORY
Insufficient memory.
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

IDiskQuotaUserBatch