The ImportFileGroups method imports file groups from the XML string of file groups.

 [id(FSRM_DISPID_FILEGROUP_MANAGER | 0x05)] HRESULT ImportFileGroups(
   [in] BSTR serializedFileGroups,
   [in, defaultvalue(NULL)] VARIANT* fileGroupNamesArray,
   [out, retval] IFsrmCommittableCollection** fileGroups
 );

serializedFileGroups: Contains the XML string representation of a list of file groups. There is no maximum length for this string.

fileGroupNamesArray: Pointer to a SAFEARRAY that contains the names of file groups to import.

fileGroups: Pointer to an IFsrmCommittableCollection interface pointer (section 3.2.4.2.3) that upon completion contains an IFsrmFileGroup interface pointer (section 3.2.4.2.23) for each of the imported file groups. 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

0x80045301

FSRM_E_NOT_FOUND

This specified file group could not be found.

0x8004530B

FSRM_E_INVALID_IMPORT_VERSION

The version of the imported objects is not valid.

0x80070057

E_INVALIDARG

This code is returned for the following reasons:

  • The serializedFileGroups parameter is NULL.

  • The fileGroups parameter is NULL.

  • The fileGroupNamesArray parameter is not a variant array of BSTRs.

Upon receiving this message, the server MUST validate parameters:

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.