3.2.4.2.22.2 GetTemplate (Opnum 8)

The GetTemplate method returns a pointer to the directory quota template from the List of Persisted Directory Quota Templates (section 3.2.1.2) with the specified Name property value.

 [id(FSRM_DISPID_QUOTA_TEMPLATE_MANAGER | 0x02)] HRESULT GetTemplate(
   [in, defaultvalue(L"")] BSTR name,
   [out, retval] IFsrmQuotaTemplate** quotaTemplate
 );

name: Contains the Name property of the directory quota template to return.

quotaTemplate: Pointer to an IFsrmQuotaTemplate interface pointer (section 3.2.4.2.20) that upon completion points to the directory quota template with the specified Name. The caller MUST release the quota template 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

0x80045301

FSRM_E_NOT_FOUND

The specified quota template could not be found.

0x80045308

FSRM_E_INVALID_NAME

The specified name is not valid.

0x8004530D

FSRM_E_OUT_OF_RANGE

The content of the name parameter exceeds the maximum length of 4,000 characters.

0x80070057

E_INVALIDARG

The quotaTemplate parameter is NULL.

Upon receiving this message, the server MUST validate parameters:

  • Verify that quotaTemplate 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 or return a nonzero error code.

If a Persisted Directory Quota Template with the specified Name does not exist, the server MUST return FSRM_E_NOT_FOUND.