beautypg.com

Namespace and context, Wbem context – Dell Intel PRO Family of Adapters User Manual

Page 12

background image

Back to Contents Page

Namespace and Context: Intel® PRO Network Adapters WMI and

CDM Providers User Guide

The CIM classes reside in a namespace. The standard Microsoft* namespace is called root/cimv2 and is based on CIM v2.2

or root/default. The WMI and CDM Provider classes can be added to this namespace. The Providers are based on CIM v2.5.

Because of this and differences used in the keys of the objects, the Providers' classes are located in a separate namespace,

root/IntelNCS.

WBEM Context

Context objects provide additional information to the Providers that cannot be passed as a parameter to a WMI API method.

To register context qualifiers, use the IWbemContext to register context qualifiers. The interface pointer for the context

object is passed as the last parameter of an IWbemServices method.

The following table contains the context qualifiers (named values) used by the Providers. Most qualifiers, like SessionHandle,

are only used in conjunction with specific functional areas of the Providers, whereas LocaleID, MachineName and

ApplicationName can be set for all IWbemServices calls.

If no context is passed to the Providers, they will use the LocaleID passed in the Initialize call to the Providers. Any read

done with a context will read the current configuration until a write operation is performed. Subsequent reads will show the

system as it would be after the write has succeeded. A NULL context can be used for reads.

Context

Qualifier

Variant

Type

Description

SessionHandle

VT_BSTR Identifies the application's copy of IANet network classes. The application cannot make any

changes to the classes or their attributes without first establishing a session handle. See

the section on the IANet_NetService class to see how to establish and use a session handle.

This qualifier is not required if the application is only going to read data from the classes.

The session handle allows the NCS software to manage simultaneous multiple accesses to

the configuration without one user locking out all others. Each session has a separate cache

to store any changes that have been made. If there are multiple users making changes

simultaneously then the first user to apply their changes will succeed. All the other users’

caches will be invalidated.

LocaleID

VT_BSTR Microsoft's ID for a locale. This is required if the application requires localized text strings

from the Providers. All error messages and warnings will be in English, unless the required

LocaleID is used.

ApplicationName

VT_BSTR The name of the application that made the call. This is required for logging.

MachineName

VT_BSTR The name of the machine that is connecting to the Providers. This is required for logging.

PreCheck

VT_BOOL This Boolean value is used to tell the Providers that the client is attempting to verify that

an operation is allowed before actually performing the operation. For example, adding an

adapter to a team.

Values:

TRUE = Provider will not perform the operation, but will return an error code and

extended status if the operation is not allowed.

FALSE = Provider will perform the operation.

If this qualifier is missing, it has the same effect as if the attribute was FALSE.

WarningErrorCode VT_I4

Some operations may require warnings to be sent to the user (e.g., adding an adapter to

the team may require the team to be reloaded in some circumstances). WMI does not

provide a mechanism for this. If this qualifier is present and non-zero, the Provider will

return E_FAIL if the operation succeeded, but there was an associated warning. The client

should use the extended status to get the text of the warning.

12