126.96.36.199.18.3 CreateQuota (Opnum 9)
The CreateQuota method creates a blank Non-Persisted Directory Quota Instance (section 188.8.131.52.1.2) for the specified path.
[id(FSRM_DISPID_QUOTA_MANAGER | 0x01)] HRESULT CreateQuota( [in] BSTR path, [out, retval] IFsrmQuota** quota );
path: Contains the path of the local directory for the directory quota. The maximum length of this string MUST be 260 characters.
quota: Pointer to an IFsrmQuota interface pointer (section 184.108.40.206.16) that upon completion points to the newly created Non-Persisted Directory Quota Instance. To have the Non-Persisted Directory Quota Instance added to the server's List of Persisted Directory Quota Instances (section 220.127.116.11.16.1), the caller MUST call Commit (section 18.104.22.168.10.5).
The caller MUST release the Non-Persisted Directory Quota Instance when the caller is done with it.
Return Values: The method MUST return zero on success, or a nonzero error code on failure.
The quota for the specified path already exists.
One of the quota parameters is NULL.
Upon receiving this message, the server MUST validate parameters:
Verify that quota is not NULL.
If any validation fails, the server MUST terminate processing and return a nonzero error code.
Upon successful validation of parameters, the server MUST perform the following actions.
Create a new Non-Persisted Directory Quota Instance with the Folder path set to path.
Set FSRM Base Object.Id to a GUID.
Set Directory Quota.Folder path to an empty string.
Set Quota limit to zero.
Set Quota limit mode to Hard quota.
Set Quota enable/disable to enable.
Set Thresholds to empty set.
Set Notifications to Hard quota.
Set Template id to a GUID.
Set Auto apply quota id to a GUID.
Set Notification status to reset.
Set Quota state to complete.
Set Quota usage to zero.
Set Peak quota usage to zero.
Set Peak quota usage time stamp to date in the distant past.
Set quota to the IFsrmQuota interface of the new Non-Persisted Directory Quota Instance.
The new Non-Persisted Directory Quota Instance MUST NOT be associated with an existing Persisted Directory Quota (section 22.214.171.124.1.1).