IFsrmQuotaManager::CreateAutoApplyQuota 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 an automatic quota for the specified directory.
Syntax
HRESULT CreateAutoApplyQuota(
[in] BSTR quotaTemplateName,
[in] BSTR path,
[out] IFsrmAutoApplyQuota **quota
);
Parameters
[in] quotaTemplateName
The name of a template from which to derive the quota; automatic quotas must derive from a template. The string is limited to 4,000 characters.
[in] path
The local directory path to which the quota applies. The string is limited to 260 characters.
[out] quota
An IFsrmAutoApplyQuota interface to the newly created quota object. The specified template is used to initialize the quota. Use this interface to change the quota and to exclude specific subdirectories from the quota. To add the quota to FSRM, call IFsrmAutoApplyQuota::Commit method.
Return value
The method returns the following return values.
Remarks
When you save the automatic quota, FSRM creates quotas for all existing subdirectories under the specified directory that do not already contain a quota. When a new subdirectory is created under the specified directory, FSRM uses the properties of the automatic quota to create a quota for the new subdirectory.
If you are creating both the automatic quota and the subdirectories at the same time, you should first create the subdirectories and then create the automatic quota because it provides better performance.
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 |