3.2.4.2.18.8 EnumQuotas (Opnum 14)

The EnumQuotas method returns all the directory quotas from the List of Persisted Directory Quotas (section 3.2.1.2) that fall under the specified path.

 [id(FSRM_DISPID_QUOTA_MANAGER | 0x06)] HRESULT EnumQuotas(
   [in, defaultvalue(L"")] BSTR path,
   [in, defaultvalue(FsrmEnumOptions_None)] 
     FsrmEnumOptions options,
   [out, retval] IFsrmCommittableCollection** quotas
 );

path: Contains the path indicating the search location for quota numeration.

options: Contains the FsrmEnumOptions (section 2.2.1.2.5) to use when enumerating the quotas.

quotas: Pointer to an IFsrmCommittableCollection interface pointer (section 3.2.4.2.3) that upon completion contains pointers to directory quotas belonging to the path specified based on the wildcard characters specified in the path. The caller MUST release the collection when it is done with it.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

The quotas parameter is NULL.

0x80045311

FSRM_E_NOT_SUPPORTED

The options parameter contains invalid FsrmEnumOptions (section 2.2.1.2.5) values.

Upon receiving this message, the server MUST validate parameters:

  • If quotas is NULL, the server MUST return E_INVALIDARG.

  • If options contains FsrmEnumOptions_Asynchronous or any value other than specified in section 2.2.1.2.5, the server MUST return FSRM_E_NOT_SUPPORTED.

Upon successful validation of parameters, the server MUST perform all of the following actions or return a nonzero error code:

  • Create a List of Non-Persisted Directory Quota Instances (section 3.2.1.2) and populate it with Non-Persisted Directory Quota Instances (section 3.2.1.2.1.2) copied from the Persisted Directory Quotas (section 3.2.1.2.1.1) in the List of Persisted Directory Quotas, according to the following rules:

    • If path ends with "\*", the server MUST populate the List of Non-Persisted Directory Quota Instances with a copy of every Persisted Directory Quota from the List of Persisted Directory Quotas that belongs to a subdirectory of path.

    • If path ends with "\...", the server MUST populate the List of Non-Persisted Directory Quota Instances with a copy of every Persisted Directory Quota from the List of Persisted Directory Quotas that recursively belongs to a subdirectory of path.

    • If path does not end with "\*" or "\...", the server MUST populate the List of Non-Persisted Directory Quota Instances with a copy of only the Persisted Directory Quota from the List of Persisted Directory Quotas for path.

    • If a Persisted Directory Quota does not exist for path, the server MUST return S_OK and set quotas to an empty IFsrmCommittableCollection.

  • After populating the List of Non-Persisted Directory Quota Instances, the server MUST populate quotas with the IFsrmQuota interface pointer (section 3.2.4.2.16) of every Non-Persisted Directory Quota Instance in the List of Non-Persisted Directory Quota Instances.