IFsrmQuotaManager::CreateQuota method (fsrmquota.h)

[This method is supported for compatibility but it's recommended to use the FSRM WMI Classes to manage FSRM. Please see the MSFT_FSRMQuota class.]

Creates a quota for the specified directory.

Syntax

HRESULT CreateQuota(
  [in]  BSTR       path,
  [out] IFsrmQuota **quota
);

Parameters

[in] path

The local directory path to which the quota applies. The string is limited to 260 characters.

[out] quota

An IFsrmQuota interface to the newly created quota object. Use this interface to define the quota. To add the quota to FSRM, call IFsrmQuota::Commit method.

Return value

The method returns the following return values.

Remarks

The quota applies to the directory and all its subdirectories (recursively). Quotas specified on directories higher in the directory tree further restrict the quota specified on this directory.

If the quota specifies the FsrmQuotaFlags_Enforce quota flag, the file IO is blocked when the quota is exceeded, but there are no actions taken, such as a command being run or a report generated. To perform actions when the quota is exceeded, create a threshold and specify an action to run. To perform the action when the quota is exceeded, set the threshold to 100 (percent).

Examples

For an example, see Defining a Quota.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008
Target Platform Windows
Header fsrmquota.h (include FsrmQuota.h, FsrmTlb.h)
DLL SrmSvc.dll

See also

FsrmQuotaManager

IFsrmQuotaManager

IFsrmQuotaManagerEx

MSFT_FSRMQuota