IFsrmQuotaTemplateManager::ImportTemplates method

[This method is supported for compatibility but it's recommended to use the FSRM WMI Classes to manage FSRM. Please see the MSFT_FSRMQuota class.]

Imports the specified quota templates from an XML string.

Syntax


HRESULT ImportTemplates(
  [in]  BSTR                       serializedQuotaTemplates,
  [in]  VARIANT                    *quotaTemplateNamesArray,
  [out] IFsrmCommittableCollection **quotaTemplates
);

Parameters

serializedQuotaTemplates [in]

An XML string that represents one or more quota templates.

quotaTemplateNamesArray [in]

A variant that contains the names of the templates to import. If NULL, the method imports all templates.

quotaTemplates [out]

An IFsrmCommittableCollection interface that contains a collection of quota templates.

Each item of the collection is a VARIANT of type VT_DISPATCH. Query the pdispVal member of the variant for the IFsrmQuotaTemplateImported interface.

To add the templates to FSRM, call the IFsrmCommittableCollection::Commit method. To add the templates to FSRM and propagate the changes to objects that were derived from the template, call the IFsrmFileScreenTemplateImported::CommitAndUpdateDerived method on each item in the collection.

Return value

The method returns the following return values.

S_OK

Success

FSRM_E_NOT_FOUND

One of the requested templates was not found in the XML.

FSRM_E_INVALID_IMPORT_VERSION

The version of the XML used is not consistent with the schema defined for FSRM in Windows Server 2008.

E_INVALIDARG

Returned for the following reasons:

  • The quotaTemplates parameter is NULL.
  • The serializedQuotaTemplates parameter is NULL.
  • The variant array does not contain strings.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008

Header

FsrmQuota.h (include FsrmQuota.h or FsrmTlb.h)

DLL

SrmSvc.dll

CLSID

CLSID_FsrmQuotaTemplateManager is defined as 97d3d443-251c-4337-81e7-b32e8f4ee65e

IID

IID_IFsrmQuotaTemplateManager is defined as 4173ac41-172d-4d52-963c-fdc7e415f717

See also

IFsrmQuotaTemplateManager
FsrmQuotaTemplateManager
MSFT_FSRMQuota

 

 

Show: