3.2.4.2.50.1 EnumFileManagementJobs (Opnum 7)

The EnumFileManagementJobs method returns all the fileManagementJobs from the List of Persisted File Management Jobs (section 3.2.1.7) on the server.

 [id(FSRM_DISPID_FILE_MANAGEMENT_JOB_MANAGER | 0x1)] HRESULT EnumFileManagementJobs(
   [in, defaultvalue(FsrmEnumOptions_None)] FsrmEnumOptions options,
   [out, retval] IFsrmCollection** fileManagementJobs
 );

options: Contains the FsrmEnumOptions (section 2.2.1.2.5) to use when enumerating the fileManagementJobs.

fileManagementJobs: Pointer to an IFsrmCollection interface pointer (section 3.2.4.2.1) that upon completion contains pointers to every file management job on the server. A caller MUST release the collection received when the caller is done with it.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80070057

E_INVALIDARG

This code is returned for the following reasons:

  • The fileManagementJobs parameter is NULL.

0x80045311

FSRM_E_NOT_SUPPORTED

The options parameter does not contain a valid FsrmEnumOptions (section 2.2.1.2.5) value.

Upon receiving this message, the server MUST validate parameters:

  • If fileManagementJobs is NULL, the server MUST return E_INVALIDARG.

  • If options contains FsrmEnumOptions_Asynchronous or any value other than what is specified in section 2.2.1.2.5, the server MUST return FSRM_E_NOT_SUPPORTED.

Upon successful validation of parameters, the server MUST perform the following actions or return a nonzero error code:

  • Create a new List of Non-Persisted File Management Jobs Instance (section 3.2.1.7).

  • Populate it with Non-Persisted File Management Job Instances (section 3.2.1.7.1.2) copied from the Persisted File Management Jobs (section 3.2.1.7.1.1) in the List of Persisted File Management Jobs.

  • If options does not contain FsrmEnumOptions_IncludeClusterNodes, remove any Non-Persisted File Management Job Instances from this List of Non-Persisted File Management Jobs Instances where the Non-Persisted File Management Job Instances Namespace roots include a path located on a volume not present on this machine, that is, the path is not prefixed by any volume in Volume List.

  • Populate fileManagementJobs with the IFsrmFileManagementJob interface pointer (section 3.2.4.2.48) of every Non-Persisted File Management Job Instance in this List of Non-Persisted File Management Jobs Instance.