2.2.13 IWbemContext Interface

The signatures of many methods that are related to the Windows Management Instrumentation Remote Protocol include a parameter to specify an IWbemContext interface pointer. The IWbemContext interface represents an IWbemContext object, which acts as a property bag (a specialized container for properties that store variants) that a client MAY use to store additional information to be used by the server. This information MUST be composed of a property list, the property types, and the assigned property values.

The following properties can be passed as part of any call where IWbemContext is passed as a parameter to the server.<3>

PropertyName

PropertyType

PropertyValue

Description

__ProviderArchitecture

VT_I4

32 or 64

Indicates the provider architecture to be used. This parameter directs WMI to choose the specified type of provider, if available. If omitted, WMI is directed to choose the native architecture of the server.

__RequiredArchitecture

VT_BOOL

True or False

Indicates whether the requested WMI provider architecture is required.

__MI_DESTINATIONOPTIONS_DATA_LOCALE

VT_BSTR

MUST be a locale name in the "MS_xxx" format (see section 2.2.29.

A locale that indicates the preferred format for culture-specific information such as time and date.

__MI_DESTINATIONOPTIONS_UI_LOCALE

VT_BSTR

MUST be a locale name in the "MS_xxx" format (see section 2.2.29.

A locale that indicates the preferred language to use for human-readable strings.

__CorrelationId

VT_BSTR

GUID in string form.

This value SHOULD be used in tracing or debugging to group client operation and WMI server tasks related to client operation.

When used through Windows Management Instrumentation Remote Protocol methods, the IWbemContext parameter MUST be custom marshaled by the DCOM Remote Protocol (see [MS-DCOM]), as specified in the following list.

Parameter/source

Value/description

Interface UUID

{44ACA674-E8FC-11D0-A07C-00C04FB68820}

Marshaling buffer layout

The marshaling buffer has the format of the IWbemContextBuffer structure, as specified in section 2.2.13.1.

Unmarshaler CLSID

{674B6698-EE92-11D0-AD71-00C04FD8FDFF}

This CLSID represents the unmarshaler CLSID that is supplied by the Windows Management Instrumentation Remote Protocol to the DCOM Remote Protocol and MUST be sent over the network by the DCOM Remote Protocol when custom marshaling is implemented. For more information, refer to [MS-DCOM] section 2.2.18.6.

For the IDL of these two IWbemContext interfaces, see Appendix A, which contains the full IDL of the Windows Management Instrumentation Remote Protocol.

All scalar types that are encountered in the following structures MUST be stored in little-endian format.

The IWbemContext interface is marshaled or unmarshaled by using the following data structures.

Structure

Description

IWbemContextBuffer Marshaling

Structure requirements for marshaling a buffer.

IWbemContextProperty Marshaling

Structure requirements for marshaling a property.

IWbemContextString Marshaling

Structure requirements for marshaling a string.

IWbemContextArray Marshaling

Structure requirements for marshaling an array.

The IWbemContext interface pointer is specified as a parameter for many remote methods in WMI. The data structures that are listed here define the wire formats for the data that is used by this protocol.

The integer formats OCTET, UINT16, and UINT32 are encoded as defined in [MS-WMIO] section 2.2.72.