CreateQuota (Opnum 9)

The CreateQuota method creates a blank Non-Persisted Directory Quota Instance (section for the specified path.

   [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 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, the caller MUST call Commit (section

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.

Return value/code




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