3.2.4.2.22.4 ExportTemplates (Opnum 10)

The ExportTemplates method exports an XML string representation of FSRM directory quota templates from the List of Persisted Directory Quota Templates (section 3.2.1.2).

 [id(FSRM_DISPID_QUOTA_TEMPLATE_MANAGER | 0x04)] HRESULT ExportTemplates(
   [in, defaultvalue(NULL)] VARIANT* quotaTemplateNamesArray,
   [out, retval] BSTR* serializedQuotaTemplates
 );

quotaTemplateNamesArray: Pointer to a SAFEARRAY that contains the names of quota templates to export.

serializedQuotaTemplates: Pointer to a variable that upon completion contains the XML string representation of all the specified quotas.

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 template could not be found.

0x80070057

E_INVALIDARG

This code is returned for the following reasons:

  • The serializedQuotaTemplates parameter is NULL.

  • The quotaTemplateNamesArray does not contain strings.

Upon receiving this message, the server MUST validate parameters:

  • Verify that serializedQuotaTemplates 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 one of the following actions.

  • If quotaTemplateNamesArray is NULL, the server MUST return the XML string representation of all Persisted Directory Quota Templates (section 3.2.1.2.3.1).

  • If quotaTemplateNamesArray is not NULL, the server MUST return the XML string representation of only those Persisted Directory Quota Templates that are specified in quotaTemplateNamesArray.