CWbemProviderGlue::SetStatusObject method (wbemglue.h)

[The CWbemProviderGlue class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]

The SetStatusObject method sets the parameters of a status object used to supply more information when an error occurs. This status object is derived from the Win32_PrivilegesStatus class.

Syntax

bool SetStatusObject(
  MethodContext   *pContext,
  LPCWSTR         pNamespace,
  LPCWSTR         pDescription,
  HRESULT         hr,
  const SAFEARRAY *pPrivilegesNotHeld,
  const SAFEARRAY *pPrivilegesRequired
);

Parameters

pContext

Pointer to the current context. A context must be provided to prevent deadlocks. Either use the context passed into the provider by Provider::EnumerateInstances or Provider::ExecQuery, or else obtain it from the instance using CInstance::GetMethodContext. This parameter must not be NULL.

pNamespace

Pointer to the namespace that contains the registration of the Win32_PrivilegesStatus class.

pDescription

Pointer to the value to be put in the Description property of the status object instance.

hr

Value to be put in the StatusCode property of the status object instance.

pPrivilegesNotHeld

This parameter is not currently implemented and must be NULL.

pPrivilegesRequired

Pointer to the value to be put in the PrivilegesRequired property of the status object instance.

Return value

The method returns TRUE if successful, and FALSE otherwise.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemglue.h (include FwCommon.h)
Library FrameDyn.lib
DLL FrameDynOS.dll; FrameDyn.dll