IBackgroundCopyJob::GetState method

Retrieves the state of the job.

Syntax

HRESULT GetState(
  BG_JOB_STATE *pVal
);

Parameters

pVal

The state of the job. For example, the state reflects whether the job is in error, transferring data, or suspended. For a list of job states, see the BG_JOB_STATE enumeration.

Return Value

This method returns the following HRESULT values, as well as others.

Return code Description
S_OK
The state of the job was successfully retrieved.
E_INVALIDARG
The parameter, pJobState, cannot be NULL.

Remarks

If you want to know when a job is in error or has transferred all the files in the job, you can use this method to poll for the state of the job or you can register to receive notification when events occur. For details on registering to receive event notification, see the IBackgroundCopyCallback interface.

Examples

See the example code for the IBackgroundCopyManager::GetJob method.

Requirements

   
Minimum supported client Windows XP
Minimum supported server Windows Server 2003
Target Platform Windows
Header bits.h
Library Bits.lib
DLL QmgrPrxy.dll

See Also

BG_JOB_STATE, Determining the status of a job, IBackgroundCopyCallback