IFsrmFileManagementJob::WaitForCompletion method

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

Waits for the specified period of time or until the job has finished running.

Syntax


HRESULT WaitForCompletion(
  [in]  long         waitSeconds,
  [out] VARIANT_BOOL *completed
);

Parameters

waitSeconds [in]

The number of seconds to wait for the job to complete. The method returns when the period expires or the job complete. To wait indefinitely, set the value to –1.

completed [out]

Is VARIANT_TRUE if the job completed; otherwise, VARIANT_FALSE.

Return value

The method returns the following return values.

S_OK

Success

E_INVALIDARG

The number of seconds to wait is not valid. The value must be in the range from –1 through 2,147,483.

Remarks

To run the job, call the IFsrmFileManagementJob::Run method. Jobs run asynchronously, calling this method blocks your thread until the job completes or the timeout period expires.

After WaitForCompletion returns, access the IFsrmFileManagementJob::LastError property to determine if the reports completed successfully.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2

Header

FsrmReports.h

DLL

SrmSvc.dll

IID

IID_IFsrmFileManagementJob is defined as 0770687e-9f36-4d6f-8778-599d188461c9

See also

IFsrmFileManagementJob
MSFT_FSRMFileManagementJob

 

 

Show: