IFsrmFileManagementJob::WaitForCompletion method (fsrmreports.h)

[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

[in] waitSeconds

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.

[out] completed

Is VARIANT_TRUE if the job completed; otherwise, VARIANT_FALSE.

Return value

The method returns the following return values.

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

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header fsrmreports.h
DLL SrmSvc.dll

See also

IFsrmFileManagementJob

MSFT_FSRMFileManagementJob