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:
|
Upon receiving this message, the server MUST validate parameters:
Verify that serializedFileGroups is not NULL or empty.
Verify that fileGroups 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 fileGroupNamesArray is NULL, the server MUST create new Non-Persisted File Group Instances (section 3.2.1.3.4.2) for each file group in the XML string, and populate fileGroups with the IFsrmFileGroup interface pointers for those Non-Persisted File Group Instances.
If fileGroupNamesArray is not NULL, the server MUST create new Non-Persisted File Group Instances for file groups in the XML string, whose names are included in fileGroupNamesArray, and populate fileGroups with the IFsrmFileGroup interface pointers for those Non-Persisted File Group Instances.