5/13/2011

This method is used by the device imaging component to set an image deployment status for a single device.

Syntax

HRESULT SetDeviceStatus(
  const BSTR DeploymentJobID,
  const BSTR DeviceID,
  const ImageDeploymentStatus NewStatus,
  const BSTR optionalMessage
);

Parameters

DeploymentJobID

[in] ID of the device imaging deployment.

DeviceID

[in] ID of the device.

NewStatus

[in] New status of the device. For more information on status, see Deployment Status and Device Status.

optionalMessage

[out] Message that can be included to provide more information.

Return Value

The following table shows the possible return values.

Value

Description

S_OK

Success.

E_INVALIDARG

Invalid parameter passed to the method.

E_OUTOFMEMORY

OUT parameter contains insufficient buffer.

E_FAIL

OUT parameter is invalid (access violation).

Remarks

Calls to this method are converted to a Configuration Manager status message. An optional input string can be associated with every status update per device. Note that if the device imaging component does not update device status for all devices after a long period of time and a device imaging deployment is not terminated and not expired, IImageDeploymentHandler::BeginImageDeploymentcan be called again for the same device imaging deployment.

If a device imaging deployment is suspended and then terminated, the device imaging component should use this method to update the ImageDeploymentStatusenumeration to ImageDeploymentTerminated.

See Also