Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IFsrmQuotaManager::CreateQuota method

[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

path [in]

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

quota [out]

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.

Return codeDescription
S_OK

Success

FSRM_E_ALREADY_EXISTS

A quota already exists for the specified directory.

E_INVALIDARG

None of the parameters can be NULL.

 

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2008

Header

FsrmQuota.h (include FsrmQuota.h or FsrmTlb.h)

DLL

SrmSvc.dll

CLSID

CLSID_FsrmQuotaManager is defined as 90dcab7f-347c-4bfc-b543-540326305fbe

IID

IID_IFsrmQuotaManager is defined as 8bb68c7d-19d8-4ffb-809e-be4fc1734014

IID_IFsrmQuotaManagerEx is defined as 4846cb01-d430-494f-abb4-b1054999fb09

See also

IFsrmQuotaManager
IFsrmQuotaManagerEx
FsrmQuotaManager
MSFT_FSRMQuota

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.