Windows Management Instrumentation Interface
Windows Management Instrumentation Interface
Windows Management Instrumentation Interface
No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.
Patents. Microsoft has patents that may cover your implementations of the technologies
described in the Open Specifications. Neither this notice nor Microsoft's delivery of the
documentation grants any licenses under those or any other Microsoft patents. However, a given
Open Specification may be covered by Microsoft's Open Specification Promise (available here:
http://www.microsoft.com/interop/osp) or the Community Promise (available here:
http://www.microsoft.com/interop/cp/default.mspx). If you would prefer a written license, or if
the technologies described in the Open Specifications are not covered by the Open Specifications
Promise or Community Promise, as applicable, patent licenses are available by contacting
[email protected].
Trademarks. The names of companies and products contained in this documentation may be
covered by trademarks or similar intellectual property rights. This notice does not grant any
licenses under those rights.
Fictitious Names. The example companies, organizations, products, domain names, e-mail
addresses, logos, people, places, and events depicted in this documentation are fictitious. No
association with any real company, organization, product, domain name, email address, logo,
person, place, or event is intended or should be inferred.
Reservation of Rights. All other rights are reserved, and this notice does not grant any rights
other than specifically described above, whether by implication, estoppel, or otherwise.
Tools. The Open Specifications do not require the use of Microsoft programming tools or
programming environments in order for you to develop an implementation. If you have access to
Microsoft programming tools and environments you are free to take advantage of them. Certain
Open Specifications are intended for use in conjunction with publicly available standard
specifications and network programming art, and assumes that the reader either is familiar with the
aforementioned material or has immediate access to it.
1 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
2 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
2 Messages................................................................................................................ 15
2.1 Transport............................................................................................................ 15
2.2 Common Data Types ............................................................................................ 15
2.2.1 WQL Query .................................................................................................... 15
2.2.1.1 WQL Schema and Data Query .................................................................... 15
2.2.1.2 WQL Event Query ..................................................................................... 19
2.2.2 CIM Path and Namespace ................................................................................ 21
2.2.3 Protocol Return Codes..................................................................................... 23
2.2.4 IWbemClassObject Interface ............................................................................ 23
2.2.4.1 Prototype Result Object ............................................................................. 24
2.2.4.2 Extrinsic Events ........................................................................................ 25
2.2.5 WBEM_CHANGE_FLAG_TYPE Enumeration ......................................................... 25
2.2.6 WBEM_GENERIC_FLAG_TYPE Enumeration ........................................................ 26
2.2.7 WBEM_STATUS_TYPE Enumeration................................................................... 27
2.2.8 WBEM_TIMEOUT_TYPE Enumeration ................................................................. 27
2.2.9 WBEM_QUERY_FLAG_TYPE Enumeration ........................................................... 27
2.2.10 WBEM_BACKUP_RESTORE_FLAGS Enumeration ............................................... 28
2.2.11 WBEMSTATUS Enumeration ........................................................................... 28
2.2.12 WBEM_CONNECT_OPTIONS Enumeration ........................................................ 30
2.2.13 IWbemContext ............................................................................................. 30
2.2.13.1 IWbemContextBuffer Marshaling Structure ................................................. 31
2.2.13.2 IWbemContextProperty Marshaling Structure ............................................. 32
2.2.13.3 IWbemContextString Marshaling Structure ................................................. 33
2.2.13.4 IWbemContextArray Marshaling Structure .................................................. 33
2.2.14 ObjectArray Structure ................................................................................... 34
2.2.14.1 WBEM_DATAPACKET_OBJECT Structure..................................................... 36
2.2.14.2 WBEMOBJECT_CLASS Structure ................................................................ 37
2.2.14.3 WBEMOBJECT_INSTANCE Structure .......................................................... 37
2.2.14.4 WBEMOBJECT_INSTANCE_NOCLASS Structure ........................................... 38
2.2.15 WBEM_REFRESHED_OBJECT Structure ............................................................ 39
2.2.16 WBEM_INSTANCE_BLOB Enumeration ............................................................. 40
2.2.17 WBEM_INSTANCE_BLOB_TYPE Enumeration .................................................... 40
2.2.18 RefreshedInstances ...................................................................................... 40
2.2.19 RefreshedSingleInstance ............................................................................... 41
2.2.20 _WBEM_REFRESH_INFO Structure .................................................................. 41
2.2.21 _WBEM_REFRESHER_ID Structure .................................................................. 41
2.2.22 _WBEM_RECONNECT_INFO Structure ............................................................. 42
3 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
4 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
5 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
6 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
1.1 Glossary
activation
Augmented Backus-Naur Form (ABNF)
authentication level
class identifier (CLSID)
Common Information Model (CIM)
Common Information Model (CIM) class
Common Information Model (CIM) instance
Common Information Model (CIM) method
Common Information Model (CIM) namespace
Common Information Model (CIM) object
Common Information Model (CIM) path
Common Information Model (CIM) property
Common Information Model (CIM) relative path
Distributed Component Object Model (DCOM)
extrinsic event
globally unique identifier (GUID)
Interface Definition Language (IDL)
interface pointer
intrinsic event
language code identifier (LCID)
manageable entity
Microsoft Interface Definition Language (MIDL)
opnum
release
remote procedure call (RPC)
security principal
security provider
Security Support Provider Interface (SSPI)
superclasses and subclasses
universally unique identifier (UUID)
CIM localizable information: The portion of information in a CIM class definition that could be
language-specific or country-specific.
client: In the context of this specification, "client" is used to identify the system that consumes
WMI services and initiates [MS-DCOM] calls to WMI servers.
7 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
server: In the context of this specification, "server" is used to identify the system that
implements WMI services, provides management services, and accepts [MS-DCOM] calls from
WMI clients.
WMI asynchronous operation: An operation executed on the server side. The client continues
executing and does not check whether a response is available from the server.
WMI Query Language (WQL): A subset of the American National Standards Institute
Structured Query Language (ANSI SQL). WQL differs from standard SQL in that it retrieves
from classes rather than from tables, and returns CIM classes or instances rather than
rows. WQL is specified in section 2.2.1.
WMI semi-synchronous operation: An operation executed on the server side while the client
is regularly checking whether a response is available from the server.
WMI synchronous operation: An operation executed on the server side while the client waits
for the response message.
MAY, SHOULD, MUST, SHOULD NOT, MUST NOT: These terms (in all caps) are used as
described in [RFC2119]. All statements of optional behavior use either MAY, SHOULD, or
SHOULD NOT.
1.2 References
We conduct frequent surveys of the normative references to assure their continued availability. If
you have any issue with finding a normative reference, please contact [email protected]. We
will assist you in finding the relevant information. Please check the archive site,
http://msdn2.microsoft.com/en-us/library/E4BD6494-06AD-4aed-9823-445E921C9624, as an
additional source.
[C706] The Open Group, "DCE 1.1: Remote Procedure Call", C706, August 1997,
http://www.opengroup.org/public/pubs/catalog/c706.htm
[FIPS127] Federal Information Processing Standards Publication, "Database Language SQL", FIPS
PUB 127, June 1993, http://www.itl.nist.gov/fipspubs/fip127-2.htm
[IEEE754] Institute of Electrical and Electronics Engineers, "Standard for Binary Floating-Point
Arithmetic", IEEE 754-1985, October 1985, http://ieeexplore.ieee.org/servlet/opac?punumber=2355
[MS-DCOM] Microsoft Corporation, "Distributed Component Object Model (DCOM) Remote Protocol
Specification", March 2007.
[MS-LCID] Microsoft Corporation, "Windows Language Code Identifier (LCID) Reference", July 2007.
8 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
[MS-RPCE] Microsoft Corporation, "Remote Procedure Call Protocol Extensions", January 2007.
[RFC1001] Network Working Group, "Protocol Standard for a NetBIOS Service on a TCP/UDP
Transport: Concepts and Methods", STD 19, RFC 1001, March 1987,
http://www.ietf.org/rfc/rfc1001.txt
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC
2119, March 1997, http://www.ietf.org/rfc/rfc2119.txt
Note This WMI management interface is exposed as a public API in Windows Server 2003 R2,
Windows Server 2008, and Windows Server 2008 R2. A .mof file publishing the capabilities of the
WMI provider associated with DFS-R is included in the DFS-R distribution under
%%SYSTEM_ROOT%%\webm\dfsrprov.mof.
The Windows Management Instrumentation Remote Protocol is the Microsoft implementation of the
Common Information Model (CIM), as specified in [DMTF-DSP004]. The Windows Management
Instrumentation Remote Protocol uses CIM as the conceptual model for representing enterprise
management information that can be managed by an administrator.
9 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
At layer 3, the Windows Management Instrumentation Remote Protocol management data sources
are designed to interact locally with Windows manageable entities. Layer 2 supports the core of
the Windows Management Instrumentation Remote Protocol service and is called the CIM Object
Manager (CIMOM). CIMOM interacts with the Windows Management Instrumentation Remote
Protocol management data sources, the database storing and caching CIM class definitions and
CIM instances from the [DMTF-DSP004]. Layer 1 implements the Distributed Component Object
Model interfaces (as specified in [MS-DCOM]) that are used by the Windows Management
Instrumentation Remote Protocol to communicate over the network between Windows Management
Instrumentation Remote Protocol clients and servers. This layer is the only layer that communicates
over the network. Network communication is achieved by using the Distributed Component Object
Model (DCOM) Remote Protocol and a set of Windows Management Instrumentation Remote
Protocol DCOM interfaces, as specified in section 3.1.4.
10 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Windows Management Instrumentation Remote Protocol clients can be local or remote from the
server, as illustrated in the preceding figure. In either case, the same set of Windows Management
Instrumentation Remote Protocol interfaces is used. The server makes no differentiation between a
local client and a remote client. Likewise, if the client is running on the server, the client makes no
differentiation.
The communication works the same way between clients and server; all interactions between clients
and server are made through the DCOM Remote Protocol locally or remotely. Therefore, clients are
always acting in a message submission mode through the DCOM Remote Protocol to leverage the
Windows Management Instrumentation Remote Protocol interfaces that are implemented on the
server side.
11 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
1. Synchronous calls
2. Semi-Synchronous calls
3. Asynchronous calls
The server APIs for synchronous and semi-synchronous APIs are the same, but the call is executed
synchronously if the flags do not contain WBEM_FLAG_RETURN_IMMEDIATELY. If the flag
WBEM_FLAG_RETURN_IMMEDIATELY is specified, the call is executed semi-synchronously.
Examples for such APIs are, IWbemServices::GetObject, IWbemServices::PutClass etc.
The IWbemServices methods that end with Async are asynchronous counterparts for their
synchronous APIs. Example for async APIs are, IWbemServices::GetObjectAsync,
IWbemServices::PutClassAsync etc.
The management information that is exchanged between clients and server (and server and clients)
is transmitted over the network by the Windows Management Instrumentation Remote Protocol as a
custom-marshaled payload, as specified in [MS-DCOM].
The Windows Management Instrumentation Remote Protocol serializes the management information
that is transmitted, as specified in [MS-WMIO]. Before reading this Windows Management
Instrumentation Remote Protocol document, acquire a working knowledge of the concepts,
structures, and communication protocols as specified in [MS-DCOM], [DMTF-DSP004], and [MS-
WMIO]. Namespace security is controlled by using security descriptors, as specified in [MS-DTYP].
The Windows Management Instrumentation Remote Protocol uses the DCOM Remote Protocol to
communicate over the network and to authenticate all requests issued against the infrastructure.
The DCOM Remote Protocol is actually the foundation for the Windows Management Instrumentation
Remote Protocol and is used to accomplish the following:
Authenticate clients.
This implies that the DCOM Remote Protocol implementation provides and uses all underlying
protocols, as specified in [MS-RPCE], [MS-DCOM], and [C706].
Besides DCOM Remote Protocol support, the Windows Management Instrumentation Remote
Protocol uses a special encoding, as specified in [MS-WMIO], to transfer information as specified in
[DMTF-DSP004] over the network.
1.5 Prerequisites/Preconditions
The client that uses the protocol possesses valid credentials that are recognized by the server
accepting the client requests. The client uses security providers that recognize such credentials to
authenticate to the remote server by using the Security Support Provider Interface (SSPI),
which is supported by the Remote Procedure Call Protocol.
12 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
This document covers versioning issues in the following areas. The Windows Management
Instrumentation Remote Protocol does explicit negotiation as follows:
The client of this protocol uses the mechanism, as specified in [MS-DCOM] section 1.7, to
discover which interfaces are supported by the exported object and to interpret the
E_NOINTERFACE result, as specified in [MS-DCOM] section 1.7. The client then adjusts its
behavior based on the availability of the requested interface, as specified in sections 3.2.3 and
3.2.4.2.6.
The protocol uses return codes as a capability discovery mechanism; the client interprets them as
a capability negotiation, as specified in section 3.2.4.1.1. Microsoft Windows® behavior is
documented in the respective sections.
The protocol uses return values and parameters to negotiate the locale capabilities of the server
as specified in section 3.2.3.
In order to extend the CIM schema with Microsoft Windows® using the Windows Management
Instrumentation Remote Protocol, Vendors MUST use operations as specified in section 3.1.4.3.
This protocol uses HRESULT values as specified in [MS-ERREF]. Vendors can define their own
HRESULT values, provided they set the C bit (0x20000000) for each vendor-defined value,
indicating that the value is a customer code.
There are no standards assignments for this protocol. This protocol uses the following class
identifiers (CLSIDs) (as specified in [MS-DCOM] section 1.9):
CLSID_WbemLevel1Login ({8BC3F05E-D86B-11D0-A075-00C04FB68820})
CLSID_WbemBackupRestore ({C49E32C6-BC8B-11D2-85D4-00105A1F8304})
IID_IWbemLevel1Login ({F309AD18-D86A-11d0-A075-00C04FB68820})
IID_IWbemLoginClientID ({d4781cd6-e5d3-44df-ad94-930efe48a887})
IID_IWbemLoginHelper ({541679AB-2E5F-11d3-B34E-00104BCC4B4A})
13 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
IID_IWbemBackupRestore ({C49E32C7-BC8B-11d2-85D4-00105A1F8304})
IID_IWbemBackupRestoreEx ({A359DEC5-E813-4834-8A2A-BA7F1D777D76})
IID_IWbemClassObject ({DC12A681-737F-11CF-884D-00AA004B2E24})
IID_IWbemContext ({44aca674-e8fc-11d0-a07c-00c04fb68820})
14 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
2.1 Transport
Windows Management Instrumentation Remote Protocol messages MUST be transported via the
DCOM Remote Protocol. The Windows Management Instrumentation Remote Protocol objects that
are exported by the WMI server MUST be capable of DCOM activation, as specified in [MS-DCOM]
section 3.1.4.1.1.
The client connection MUST be secured at an authentication level that is negotiated by the DCOM
Remote Protocol infrastructure.
A client has the capability to express a query against a server. This query MUST be expressed in the
WMI Query Language (WQL). WQL is a subset of the American National Standards Institute
Structured Query Language, as specified in [FIPS127] and [MSDN-WQL]. WQL differs from the
standard SQL in that WQL retrieves from classes rather than tables, and returns CIM classes or CIM
instances rather than rows. WQL supports a specific semantic designed to query against CIM classes
or CIM instances with their related characteristics. Queries MUST be of one of the following 3 forms:
Event queries: Queries focused on events triggered by state changes of CIM classes or CIM
instances. Events triggered on CIM instances can be internal to the infrastructure (intrinsic) or
external to the infrastructure (extrinsic). Events can also be timer events.
WQL uses terminologies and concepts, as specified in [DMTF-DSP004], and requires familiarity with
the CIM model.
The next section specifies the complete syntax of WQL queries for schema, data, and event queries.
The syntax for the WQL schema and data queries is provided in Augmented Backus-Naur Form
(ABNF).
; -----------------------------------
; WQL schema and data queries
; -----------------------------------
DATA-WQL =
("SELECT" <PROPERTY-LIST> "FROM" <CLASS-NAME>
<OPTIONAL-SEL-WHERE>)/
("SELECT" ASTERISK "FROM" <CLASS-NAME> <OPTIONAL-SEL-WHERE>)/
("SELECT" ASTERISK "FROM META_CLASS" <OPTIONAL-META-WHERE>)/
15 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
OBJECT-REL-PATH =
<CLASS-NAME> "=" <TYPED-CONSTANT> <OBJECT-REL-PATH2>
OBJECT-REL-PATH2 =
[COMMA <OBJECT-REL-PATH>]
; -----------------------------------
; Expression
; -----------------------------------
EXPR =
( [OPEN-PARENTHESIS] <PROPERTY-EVALUATION>
<EXPR2> [CLOSE-PARENTHESIS] ) /
( [OPEN-PARENTHESIS] "__CLASS" <EQUIVALENT-OPERATOR>
<CLASS-NAME> <EXPR2> [CLOSE-PARENTHESIS] )
PROPERTY-EVALUATION =
( <PROPERTY-NAME> <OPERATOR> <TYPED-CONSTANT> ) /
( <PROPERTY-NAME> <IS-OPERATOR> "NULL" )
OPERATOR = <EQUIVALENT-OPERATOR> /
<COMPARE-OPERATOR>
; -----------------------------------
; Characters
; -----------------------------------
16 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
CLASS-NAME = [__]<STRING-IDENTIFIER>
PROPERTY-NAME = [__]<STRING-IDENTIFIER>
QUALIFIER-NAME = <STRING-IDENTIFIER>
TYPED-CONSTANT = INT /
REAL /
STRING /
DATETIME /
BOOL
INT = "[-+]?\d+"
REAL = "[-+]?(\d*\.\d+)|(\d+)"
STRING = ["]([a-z][A-Z]\d)*["]
DATETIME =
"(\d\d\d\d)(0\d|1[012])(0\d|[12][0-9]|3[01])([0-1]\d|2[0-3])
([0-5]\d)([0-5]\d)[.]\d\d\d\d\d\d[+-]([0-6][02468][0]|7[0-2][0])"
DATA-WQL A string expressing the WQL query. The WQL string uses different WQL
reserved keywords to select the type of information desired.
FROM A keyword that MUST be specified with the SELECT statement to express the
17 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
OPTIONAL-META- The WHERE statement narrows the scope of a SELECT. The WHERE statement
WHERE followed by the __THIS ISA statement is narrowing the scope of the WQL query
to return CIM instances only made out of the CLASS-NAME specified.
__CLASS A keyword referring to the CIM object, indicating the class of the current CIM
object. The __CLASS keyword in a WHERE clause only selects CIM instances of
derived classes made out of the CLASS-NAME.
ASSOCIATORS OF A keyword that is a WQL statement to locate associated CIM classes or CIM
instances. It MUST NOT be used in combination with the SELECT keyword and
the REFERENCES OF keyword.
REFERENCES OF A keyword that is a WQL statement to locate the CIM classes or CIM instances
associating CIM classes or CIM instances. It MUST NOT be used in combination
with the SELECT keyword and the ASSOCIATORS OF keyword.
OBJECT-REL-PATH The CIM relative path of the CIM class or CIM instance to be queried. It
MUST be specified for ASSOCIATORS OF and REFERENCES OF queries.
18 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
ResultRole If the ResultRole keyword is being used in ASSOCIATORS OF queries, the result
MUST only return CIM instances where the role matches the reference CIM
Property name of the CIM instances.
The following example shows the syntax for WQL event queries in ABNF notation.
; -----------------------------------
; WQL event queries
; -----------------------------------
; -----------------------------------
; Expression
; -----------------------------------
EXPR =
[OPEN-PARENTHESIS] <PROPERTY-EVALUATION> /
<EXPR2> [CLOSE-PARENTHESIS]
EXPR2 = ( ["OR" [OPEN-PARENTHESIS] <EXPR> /
[CLOSE-PARENTHESIS] ] ) /
( ["AND" [OPEN-PARENTHESIS] <EXPR> /
[CLOSE-PARENTHESIS] ] )
PROPERTY-EVALUATION =
( <PROPERTY-NAME> <OPERATOR> <TYPED-CONSTANT> ) /
( <PROPERTY-NAME> <IS-OPERATOR> "NULL" )
OPERATOR = <EQUIVALENT-OPERATOR> /
19 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
; -----------------------------------
; Characters
; -----------------------------------
ALPHA = %x41-5A
DIGIT = %x30-39
DOT = ","
COMMA = "."
ASTERISK = "*"
OPEN-PARENTHESIS = "("
CLOSE-PARENTHESIS = ")"
STRING-IDENTIFIER = ALPHA *(ALPHA / DIGIT / (*("_") ALPHA / DIGIT))
CLASS-NAME = [__]<STRING-IDENTIFIER>
EVENT-CLASS-NAME = [__]<STRING-IDENTIFIER>
PROPERTY-NAME = [__]<STRING-IDENTIFIER>
TYPED-CONSTANT = INT /
REAL /
STRING /
DATETIME /
BOOL
INT = "[-+]?\d*"
REAL = "[-+]?\d*(\.\d+)?"
STRING = ["]([a-z][A-Z]\d)*["]
DATETIME = "(\d\d\d\d)(0\d|1[012])(0\d|[12][0-9]|3[01])
([0-1]\d|2[0-3])([0-5]\d)([0-5]\d)[.]\d\d\d\d\d\d[+-]
([0-6][02468][0]|7[0-2][0])"
Objects and
keywords Description
EVENT-WQL A string expressing the WQL event query. The WQL string uses different WQL reserved
keywords to select the type of information wanted.
SELECT A keyword expressing the selection of information requested (similar to SQL SELECT).
SELECT expresses the CIM class or CIM instance to be queried. It MUST be specified in a
WQL event query.
PROPERTY- A list of PROPERTY-NAME values. PROPERTY-NAME values in the list MUST be separated
LIST by a comma (",").
20 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
FROM A keyword that MUST be specified with the SELECT statement to express the CIM class or
CIM instance that the query MUST be run against.
EVENT- MUST be specified and MUST be an intrinsic, an extrinsic, or a timer event class. An
CLASS-NAME intrinsic event class is a class derived from __InstanceOperationEvent,
__ClassOperationEvent, or __NamespaceOperationEvent, representing possible intrinsic
events. An extrinsic event class is a class derived from __ExtrinsicEvent, representing
possible extrinsic events. A timer event class is a class derived from __TimerEvent event
class, representing possible timer events.
WITHIN A keyword indicating the server to poll the system for an event. In case of an intrinsic
EVENT-CLASS-NAME, the WITHIN keyword MUST be specified. The WITHIN keyword is
optional for extrinsic EVENT-CLASS-NAME. If the WITHIN keyword is specified, the
INTERVAL MUST be specified.
INTERVAL INTERVAL specifies the polling interval. It MUST be expressed in seconds. If "WITHIN" is
specified, the INTERVAL MUST be specified.
EVENT- The WHERE statement narrows the scope of a SELECT event query if the EVENT-CLASS-
WHERE NAME is an extrinsic or timer event CIM class. The WHERE statement MUST be specified to
narrow the scope of a SELECT event query if the EVENT-CLASS-NAME is an intrinsic CIM
class.
ISA A keyword that MUST be used in combination with the INSTANCE-STATE keyword. It is
used as a comparative operator between the INSTANCE-STATE and a CLASS-NAME to
reduce the scope of events returned to the CIM instances made out of the CLASS-NAME.
GROUP If the GROUP WITHIN keyword is used, the INTERVAL MUST be specified. This keyword
WITHIN indicates that all events occurring during the WITHIN INTERVAL period MUST be grouped
as one event.
HAVING If the HAVING keyword is specified, it MUST be followed by EXPR to filter the selection of
events. This keyword indicates that all events grouped during the GROUP WITHIN period
MUST meet the expression specified in EXPR before being returned as one event.
BY A keyword that groups event instances sharing a same value on a specified PROPERTY-
NAME. In such a case, events are returned that represent a group of events sharing the
same PROPERTY-NAME value. The system MUST return as many events representing a
group of events as there are PROPERTY-NAME values.
The syntax for CIM path and namespace is provided in ABNF notation.
; -----------------------------------
21 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
CLASS-NAME = [__]<STRING-IDENTIFIER>
PROPERTY-NAME = [__]<STRING-IDENTIFIER>
; -----------------------------------
; NAMESPACE
; -----------------------------------
TYPED-CONSTANT = INT /
REAL /
STRING /
DATETIME /
BOOL
INT = "[-+]?\d*"
REAL = "[-+]?\d*(\.\d+)?"
STRING = ["]([a-z][A-Z]\d)*["]
DATETIME =
"(\d\d\d\d)(0\d|1[012])(0\d|[12][0-9]|3[01])
([0-1]\d|2[0-3])([0-5]\d)([0-5]\d)[.]\d\d\d\d\d\d[+-]
([0-6][02468][0]|7[0-2][0])"
; -----------------------------------
; Characters
; -----------------------------------
ALPHA = %x41-5A
DIGIT = %x30-39
BACKSLASH = "\"
DOT = "."
STRING-IDENTIFIER = ALPHA *(ALPHA / DIGIT / (*("_") ALPHA / DIGIT))
COLON=":"
MACHINENAME = <STRING-IDENTIFIER> / DOT
Objects and
keywords Description
22 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
MACHINENAME The network-identifiable name of the machine where the referenced WMI class,
instance, or namespace resides.
KEY-VALUE-LIST List of PROPERTY-NAME and their values, separated by a ",". Each property value
pair is represented as propertyName=value format.
Codes that are returned by the protocol are represented as an HRESULT, as specified in [MS-ERREF]
section 2.1.
The HRESULT values that are documented in the following table are interpreted by the protocol
through a specific set of interface methods, as specified in sections 3.1.4.3, 3.1.4.4.2, and
3.2.4.1.1.
The severity bit of HRESULT MUST be interpreted as specified in [MS-ERREF] section 2.1. HRESULT
errors are not recoverable by the protocol. HRESULT successes, other than the ones specified in the
following table, MUST be considered as equal to WBEM_S_NO_ERROR.
Constant/value Description
WBEM_S_FALSE Either no more CIM objects are available, the number of returned CIM objects is
0x00000001 less than the number requested, or this is the end of an enumeration.
WBEM_S_NEW_STYLE The operation was successful and indicates that the receiver of the call is able to
0x000400FF receive optimized IWbemObjectSink::Indicate calls.
The signatures of many methods that are related to the Windows Management Instrumentation
Remote Protocol include a parameter to specify an IWbemClassObject interface pointer. This
parameter MUST be custom marshaled by the DCOM Remote Protocol, as specified in the following
table. The IWbemClassObject interface represents a WMI object, such as a WMI class or an object
instance. All CIM objects (CIM classes and CIM instances) that are passed during WMI calls between
the client and server are objects of this interface.
Parameter/source Value/description
23 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Marshaling buffer The buffer representing a CIM object MUST be encoded using the EncodingUnit
layout object block, as specified in [MS-WMIO] section 2.2.1.
The prototype result object is an IWbemClassObject that is returned when the lFlags parameter of
the IWbemServices::ExecQuery or IWbemServices::ExecQueryAsync method includes the
WBEM_FLAG_PROTOTYPE flag.
The query returns the CIM class object that is specified in the CLASS-NAME of the query that is
modified to match the query.
If the query specifies PROPERTY-LIST, as specified in section 2.2.1.1, the class object is modified
to represent the results of the query by removing all the properties that are not specified in the
PROPERTY-LIST of the query and by adding selected properties with the Order qualifier (see the
2nd paragraph following concerning the Order qualifier). In this case, the CIM class is encoded as an
IWbemClassObject object, as specified in section 2.2.4, with an ObjectFlags block that contains a
0x10 value that is set as specified in [MS-WMIO] section 2.2.6. If any key property is removed
because it is not specified in PROPERTY-LIST, the 0x40 flag is set on ObjectFlags.
If the query specifies ASTERISK, as specified in section 2.2.1.1, the class object is returned with all
the properties added to the Order qualifier. In this case, the CIM class is encoded as an
IWbemClassObject object and the 0x10 flag is not set in ObjectFlags.
The Order qualifier (QUALIFIER-NAME attribute set to Order, see 2.2.1.1) is an array of 32-bit
signed integers. Each value in the array represents the position of the property in PROPERTY-LIST
(if PROPERTY-LIST is specified) or represents the order in which the property appears in the class
(if the query specifies ASTERISK). The position is encoded starting from 0.
For example,
results in class1 containing only two properties, prop1 and prop2. The prop1 property is added to
an Order qualifier that has a value of {0,2}, and the prop2 property is added to an Order qualifier
that has a value of {1}.
Note The prop1 property occurs twice in the PROPERTY-LIST, at positions 1 and 3, and
therefore, has two values {0,2}.
If the query specifies a PROPERTY-LIST that does not contain at least one of the following
properties, the DerivationList in ClassPart of the CurrentClass, as specified in [MS-WMIO] section
2.2.17, is encoded as empty:
__DERIVATION
__SUPERCLASS
24 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Otherwise, the DerivationList in ClassPart of the CurrentClass is encoded in the same way as the
actual CIM class that represents the CLASS-NAME of the query.
The PropertyLookupTable, NdTable, ValueTable, and ClassHeap in ClassPart of the CurrentClass (as
specified in [MS-WMIO] section 2.2.15) are encoded to contain only the selected properties in the
query.
Remaining items are encoded in the same way as the CIM class that represents the CLASS-NAME
that is specified in the query.
Extrinsic events are events generated by a component outside the implementation. In WMI,
extrinsic events are represented as instances of a class that is derived from the __ExtrinsicEvent
class. If any component wants to generate an event, the component defines a class that is derived
from the __ExtrinsicEvent class. Instances of the derived class defined by the component,
represented by using IWbemClassObject, are used to send events.
[abstract]
class __SystemClass
{
};
[abstract]
class __IndicationRelated : __SystemClass
{
};
Where TIME_CREATED is the time at which the event is generated, represented as a 64-bit value
that represents the number of 100-nanosecond intervals since January 1, 1601 (UTC), and
SECURITY_DESCRIPTOR is a standard Windows security descriptor, as defined in [MS-DTYP],
represented as an array of bytes. The security descriptor MUST specify security for events as
specified in section 5.2.
The WBEM_CHANGE_FLAG_TYPE enumeration is used to indicate and update the type of the flag.
25 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_FLAG_UPDATE_ONLY: This flag causes the put operation to update the class or
instance. The class or instance MUST exist for the call to be successful.
WBEM_FLAG_CREATE_ONLY: This flag causes the put operation to create the class or
instance. For the call to be successful, the class or instance MUST NOT exist.
The WBEM_GENERIC_FLAG_TYPE enumeration is used to indicate and update the type of the
flag.
WBEM_FLAG_RETURN_IMMEDIATELY: This flag causes the call to return without waiting for
the operation to complete. The call result parameter contains the IWbemCallResult object by
using the status of the operation that can be retrieved.
26 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_FLAG_DIRECT_READ: This flag causes direct access to the provider for the specified
class without regard to its parent class or subclasses.
If this flag is not set, the server does not retrieve any localized qualifiers for the CIM object.
The WBEM_STATUS_TYPE enumeration gives information about the status of the operation.
The WBEM_TIMEOUT_TYPE enumeration gives information about the type of time-out for the
process.
The WBEM_QUERY_FLAG_TYPE enumeration gives information about the type of the flag.
27 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
If used in IWbemServices::CreateInstanceEnum or
IWbemServices::CreateInstanceEnumAsync, this constant causes the enumeration to
return the instances of this class and also the instances of subclasses in the hierarchy of the
class.
If used in IWbemServices::CreateInstanceEnum or
IWbemServices::CreateInstanceEnumAsync, this constant causes the enumeration to
return only the instances of this class and excludes all instances of subclasses.
WBEM_FLAG_PROTOTYPE: This flag is used for prototyping. It does not run the query;
instead, it returns the Prototype Result Object as specified in section 2.2.4.1.
The WBEMSTATUS enumeration gives information about the status of an operation. If the server
encounters an error condition for which this protocol does not explicitly state an error value, the
server can return any HRESULT to indicate failure by setting the Severity (S bit) of the HRESULT, as
defined in [MS-ERREF] section 2.1.
28 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
E_NOTIMPL: The attempted operation is not implemented. The value of this element is as
specified in [MS-ERREF] section 2.1.
29 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The WBEM_CONNECT_OPTIONS enumeration gives information about the type of options of the
connection.
2.2.13 IWbemContext
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,<2> 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.
When used through Windows Management Instrumentation Remote Protocol methods, the
IWbemContext parameter MUST be custom marshaled by the DCOM Remote Protocol, as specified
in the following list.
Parameter/source Value/description
Marshaling buffer The marshaling buffer has the format of the IWbemContextBuffer structure, as
layout specified in section 2.2.13.1.
30 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
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.1.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
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 IWbemContextBuffer data structure defines the wire format for buffer data that is used by this
protocol. It's structure has the following encoding format (defined in ABNF notation as specified in
[RFC4234]).
The stream MUST start with a 32-bit integer (numGUIDs, in the following list) that MUST be set
to 1. The following ABNF represents the number of GUIDs that are present in the next
GuidArray.
NumGuids = UINT32
NumGuids MUST be followed by an array of standard GUIDs and MUST contain NumGuids
elements.
The stream MUST contain a 32-bit integer that represents the property count.
NumProps = UINT32
The property list MUST immediately follow the property count and MUST be marshaled as a
continuous list without padding between properties, as specified in IWbemContextProperty
(section 2.2.13.2). The number of IWbemContextProperty properties MUST be equal to
NumProps.
31 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The IWbemContextProperty data structure defines the wire format for property data that is used by
this protocol. The property is a variable-length structure and has the following structure:
PropertyName = IWbemContextString
PropertyFlags = UINT32
PropertyType is a 16-bit unsigned integer that represents the type of the property.
PropertyType = UINT16
MUST have one of the following values as specified in [MS-OAUT] section 2.2.7:
VT_NULL
VT_I2
VT_I4
VT_R4
VT_R8
VT_BSTR
VT_BOOL
VT_UI1
VT_UI2
VT_UI4
VT_UNKNOWN
VT_I1
If the value is an array, the listed property types MUST be combined by using the bitwise OR
operation with VT_ARRAY (also specified in [MS-OAUT] section 2.2.7).
32 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
VT_UI1, VT_I1 MUST be marshaled as an array of 8 bytes with the first byte containing the value
of the property.
VT_I2, VT_UI2, MUST be marshaled as an array of 8 bytes with the first 2 bytes containing the
VT_BOOL value of the property.
VT_I4, VT_UI4 MUST be marshaled as an array of 8 bytes with the first 4 bytes containing the
value of the property.
VT_R4 MUST be marshaled as an array of 8 bytes with the first 4 bytes containing the
value of the property, as specified in [IEEE754], a 4-byte floating-point format.
The IWbemContextString data structure defines the wire format for the string data that is used by
this protocol. Strings (property names and VT_BSTR properties values) MUST be represented as a
32-bit character count and followed by a sequence of characters that are encoded in UTF-16, as
specified in [UNICODE].
StringLength = UINT32
UnicodeCharacter = 2OCTET
The IWbemContextArray data structure defines the wire format for array data that is used by this
protocol. IWbemContextArray has the following structure:
ElementCount MUST be an integer that represents the number of elements in the array.
33 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
ElementSize MUST represent the size of a single element in the array. The size MUST match the
size of the elements.
ElementSize = UINT32
Elements is a variable stream of bytes that represent all element values in the array. (Array
elements are marshaled in a different representation from nonarray elements.)
Each element MUST be marshaled as an array of bytes that use the following representation.
Type Marshaling
VT_IUNKNOWN MUST be marshaled as an array of bytes that represent a marshaling buffer for the
IWbemClassObject interface. In this case, ElementSize SHOULD be set to 4 or 8.
<4>
VT_R4 MUST be marshaled as an array of 8 bytes with the first 4 bytes containing the
value of the property, as specified in [IEEE754], in a 4-byte floating-point format.
The ObjectArray structure MUST be used to encode multiple CIM objects that are returned in
response to the IWbemWCOSmartEnum::Next (section 3.1.4.7.1) method. This structure is
also used to encode parameters of the optimized IWbemObjectSink::Indicate (section
3.1.4.2.1) method.<5> To minimize network bandwidth, a server SHOULD support the ObjectArray
structure when an array of CIM objects is sent.
The optimization MUST be achieved by sending the CIM class information just once at the beginning
of the communication. This CIM class MUST be identified by a randomly generated GUID that is
maintained by both the server and the client. The remaining CIM instances MUST be sent without
the CIM class information. The CIM class definition that is identified by the GUID is used to
reconstruct the full CIM instances on the client side.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
dwByteOrdering
34 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
...
dwSizeOfHeader1
dwDataSize1
dwFlags
... dwDataSize2
... dwSizeOfHeader3
... dwDataSize3
... dwNumObjects
...
dwByteOrdering (4 bytes): The byte ordering. It MUST be one of the following values.<6>
Value Meaning
abSignature (8 bytes): MUST be set to {0x57, 0x42, 0x45, 0x4D, 0x44, 0x41, 0x54, 0x41} (a
byte array containing the unquoted, unterminated ASCII string "WBEMDATA").
dwSizeOfHeader1 (4 bytes): This stores the total size of these fields: dwByteOrdering,
abSignature, dwSizeofHeader1, dwDataSize1, dwFlags, bVersion, and bPacketType.
The size of the header MUST be 0x0000001A. Data immediately follows the header.
dwDataSize1 (4 bytes): MUST indicate the length, in bytes, of the data that follows this
header, starting at the dwSizeOfHeader2 field.
bVersion (1 byte): The version number of the header. The version MUST be 1.
35 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Value Meaning
dwSizeOfHeader2 (4 bytes): This stores the size of these fields: dwSizeofHeader2 and
dwDataSize2.
This size MUST be 8. Data immediately follows after the field dwDataSize2.
dwDataSize2 (4 bytes): MUST be the size, in bytes, of the data that follows this field.
dwDataSize3 (4 bytes): MUST indicate the length of the remaining data, starting at the
wbemObjects field.
wbemObjects (variable): The objects array that contains the CIM class definition and CIM
instances. These CIM objects MUST be encoded in the WBEM_DATAPACKET_OBJECT structure.
The WBEM_DATAPACKET_OBJECT MUST contain the CIM class definition and CIM instances.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
dwSizeOfHeader
dwSizeOfData
...
bObjectType (1 byte): The type of data in the data packet. The type MUST take one of the
following specified values.
36 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Object (variable): The CIM object carried into the WBEM_DATAPACKET_OBJECT, having
dwSizeOfData bytes. The embedded CIM object MUST match the selector field bObjectType.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
dwSizeOfHeader
dwSizeOfData
ObjectData (variable)
...
dwSizeOfHeader (4 bytes): The size, in bytes, of the header, which MUST be 0x00000008.
dwSizeOfData (4 bytes): The size, in bytes, of the data that follows the header.
ObjectData (variable): Contains the string of bytes that represent the CIM class, encoded as
EncodingUnitObjectBlock, as specified in [MS-WMIO] section 2.2.2.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
dwSizeOfHeader
dwSizeOfData
37 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
...
...
...
ObjectData (variable)
...
dwSizeOfHeader (4 bytes): The size, in bytes, of the header, which MUST be 0x00000018.
dwSizeOfData (4 bytes): The size, in bytes, of the data that follows the header.
classID (16 bytes): The unique identifier of the CIM class type.
ObjectData (variable): Contains the string of bytes that represent the CIM instance, encoded
as EncodingUnitObjectBlock, as specified in [MS-WMIO] section 2.2.2.
The WBEMOBJECT_INSTANCE_NOCLASS structure MUST contain a CIM instance without the CIM
class definition.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
dwSizeOfHeader
dwSizeOfData
classID
...
...
...
ObjectData (variable)
...
38 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
dwSizeOfData (4 bytes): The size, in bytes, of the data that follows the header.
classID (16 bytes): The unique identifier of the CIM class type.
ObjectData (variable): Contains the string of bytes that represent the CIM instance, encoded
as the EncodingUnitInstanceNoClass object block, as specified in [MS-WMIO] section 2.2.3.
The CIM instance transmitted using EncodingUnitInstanceNoClass does not have a
CurrentClass block (as specified in [MS-WMIO] section 2.2.13) to minimize the data
transmitted because CurrentClass contains the same data for all the CIM instances.
The CurrentClass for another instance of the same CIM class is previously sent using the
WBEMOBJECT_INSTANCE structure. To match the WBEMOBJECT_INSTANCE structure that has the
CurrentClass block, the classID specified in WBEMOBJECT_INSTANCE_NOCLASS MUST be matched
with the classID of WBEMOBJECT_INSTANCE. If a matching WBEMOBJECT_INSTANCE is found, the
CurrentClass block in the WBEMOBJECT_INSTANCE MUST be used to encode or decode
EncodingUnitInstanceNoClass. If no matching WBEMOBJECT_INSTANCE is found during decoding, it
MUST be treated as an error. If no matching WBEMOBJECT_INSTANCE is found during encoding, the
CIM instance MUST be encoded as a WBEMOBJECT_INSTANCE structure.
The WBEM_REFRESHED_OBJECT structure MUST be used to encode the results of the remote
refreshing service that is returned by the IWbemRemoteRefresher::RemoteRefresh (section
3.1.4.13.1) interface method.
m_lBlobType: MUST represent the type of the CIM object that is encoded in m_pbBlob as
specified in 2.2.17.
39 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Version
numObjects
Objects (variable)
...
Version (4 bytes): MUST represent the encoding version. Version MUST be set to 0x00000001.
numObjects (4 bytes): MUST represent the number of CIM objects encoded that are contained
in the package.
2.2.18 RefreshedInstances
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
blobSize
40 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
...
2.2.19 RefreshedSingleInstance
2. InstanceData
3. InstanceQualifierSet
4. InstanceHeap
typedef struct {
long m_lType;
[switch_is(m_lType)] WBEM_REFRESH_INFO_UNION m_Info;
long m_lCancelId;
} _WBEM_REFRESH_INFO;
m_lCancelId: MUST be a unique identifier for the refresher object that is being used to cancel
the refreshing object when the refresher object is using
IWbemRemoteRefresher::StopRefreshing (section 3.1.4.13.2).
The _WBEM_REFRESHER_ID structure identifies the client that is requesting refreshing services.
The structure MUST be used to return information from IWbemRefreshingServices (section
3.1.4.12) interface methods.
typedef struct {
41 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
m_dwProcessId : It MUST be an identifier created by the client and it MUST be unique within
the context of the client.<7>
The _WBEM_RECONNECT_INFO structure MUST contain the type for the information about the
target CIM instance.
typedef struct {
long m_lType;
[string] LPCWSTR m_pwcsPath;
} _WBEM_RECONNECT_INFO;
m_pwcsPath : MUST be a CIM path to the remote CIM instance to be added to the refresher.
typedef struct {
long m_lId;
HRESULT m_hr;
} _WBEM_RECONNECT_RESULTS;
m_lId: MUST be a unique identifier for the refresher object used to cancel the refreshing object
by using the IWbemRemoteRefresher::StopRefreshing (section 3.1.4.13.2) interface
method.
The _WBEM_RECONNECT_TYPE enumeration defines possible types of remote CIM instances. The
structure MUST be used to return to information from IWbemRefreshingServices (section
3.1.4.12) interface methods.
typedef enum
42 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_RECONNECT_TYPE_LAST: This member is used only by the server to track the range
of values for this enumeration. It MUST NOT be used by the client.
typedef enum
{
WBEM_REFRESH_TYPE_INVALID = 0,
WBEM_REFRESH_TYPE_REMOTE = 3,
WBEM_REFRESH_TYPE_NON_HIPERF = 6
} WBEM_REFRESH_TYPE;
WBEM_REFRESH_TYPE_INVALID: The server uses this value internally. The server MUST
NOT return this value.
typedef struct {
[string] WCHAR* m_wszNamespace;
IWbemClassObject* m_pTemplate;
} _WBEM_REFRESH_INFO_NON_HIPERF;
43 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
typedef struct {
IWbemRemoteRefresher* m_pRefresher;
IWbemClassObject* m_pTemplate;
GUID m_Guid;
} _WBEM_REFRESH_INFO_REMOTE;
m_pRefresher: MUST be a pointer to the IWbemRemoteRefresher interface that the client used
to retrieve the refreshed information.
typedef
[switch_type(long)]
union _WBEM_REFRESH_INFO_UNION {
[case(WBEM_REFRESH_TYPE_REMOTE)]
_WBEM_REFRESH_INFO_REMOTE m_Remote;
[case(WBEM_REFRESH_TYPE_NON_HIPERF)]
_WBEM_REFRESH_INFO_NON_HIPERF m_NonHiPerf;
[case(WBEM_REFRESH_TYPE_INVALID)]
HRESULT m_hres;
} WBEM_REFRESH_INFO_UNION;
The client can request data from the WMI server in a client-preferred locale. The format of each
locale MUST conform to one of the following:
"MS_xxx" format, where "xxx" is a string representation of LCID in BASE16, which MUST identify
the locale as specified in [MS-LCID]. For example, to send LCID 1033 (0x409), the string MUST
be "MS_409".
Locale name format as specified in [MS-LCID]. For example, LCID 1033 (0x409) maps to en-US
and MUST be passed as "en-US" in this representation.
44 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The __SystemSecurity class is used to read or modify the security descriptor for a CIM namespace.
The class is defined by WMI as shown in the following MOF text.
The GetSD and SetSD methods exchange a byte array containing a self-relative
SECURITY_DESCRIPTOR structure, as defined in [MS-DTYP] section 2.4.6.
45 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
A client in the context of this specification is a machine that issues a Windows Management
Instrumentation Remote Protocol request. The request is issued against a Windows Management
Instrumentation Remote Protocol server. In this context, a server is a machine that handles the
request issued by the client. Detailed sequence diagrams are as specified in section 4. However, an
overview of a typical protocol sequence is illustrated as follows.
46 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
47 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The server MUST complete the requested operation before returning from the synchronous method
call. The status of the operation is returned as return value of the method. On successful execution
of the synchronous methods, the server MUST return result object or objects in the out parameter of
the method.
The server MUST start the requested operation and MUST return the appropriate response without
waiting for the operation to complete. If the requested operation fails to start, the server MUST
return an error as a return value of the method and MUST NOT return IEnumWbemClassObject or
IWbemCallResult as an out parameter.
For the requested operation to begin successfully, the server MUST return an object of type
IEnumWbemClassObject for the following methods, and the return value MUST be
WBEM_S_NO_ERROR. When the client calls the methods of IEnumWbemClassObject, the
IEnumWbemClassObject method MUST deliver the results of the requested operation. The
enumeration of IEnumWbemClassObject MUST return the same result set as the corresponding
synchronous operation.
IWbemServices::ExecQuery
IWbemServices::CreateInstanceEnum
IWbemServices::CreateClassEnum
IWbemServices::ExecNotificationQuery
If the requested operation begins successfully, the server MUST return an object of type
IWbemCallResult for the following methods, and the return value MUST be WBEM_S_NO_ERROR.
When the client calls the methods of IWbemCallResult, IWbemCallResult MUST deliver the
result of the requested operation.
IWbemServices::OpenNamespace
IWbemServices::PutInstance
IWbemServices::GetObject
IWbemServices::PutClass
IWbemServices::DeleteClass
IWbemServices::DeleteInstance
IWbemServices::ExecMethod
The server MUST start the requested operation and MUST return the appropriate response without
waiting for the completion of the operation. If starting the requested operation fails, the server
MUST return the error as a return value of the method; MUST NOT keep a reference to
IWbemObjectSink (passed as a response handler); and MUST NOT call
IWbemObjectSink::Indicate or IWbemObjectSink::SetStatus.
48 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The server MAY call IWbemObjectSink::SetStatus multiple times when it executes the
asynchronous operation in order to report the operation progress,<8> as explicitly requested by a
client using a WBEM_SEND_STATUS flag. In this situation, the HRESULT parameter contains the
progress information.
Calls made by the server into the client-provided IWbemObjectSink interface SHOULD use an
authentication level that is greater than NONE. If that fails, the server SHOULD retry with an
authentication level of NONE.<9> The server MUST try to make the calls by using the machine
principal name.
3.1.2 Timers
The server MUST use timers to ensure that the conversation between itself and its clients remains
active. The Windows Management Instrumentation Remote Protocol uses two timers:
Sink timer: Each asynchronous operation has a corresponding timer, which MUST be initialized to
30 seconds when the server calls the client back using IWbemObjectSink. The timer MUST be
reset when the call completes.
3.1.3 Initialization
The protocol MUST be initialized after successful activation of one of the two interfaces that are
registered with the DCOM Remote Protocol infrastructure, as specified in [MS-DCOM] section 1.9.
The server MUST accept multiple parallel invocations from different clients running under different
security principals. On each interface, the server MUST support multiple outstanding calls.
The errors returned by the server are not actionable unless explicitly specified in this section. The
server MUST perform an access check against all operations and ensure secure access to the results.
The methods MUST be secured by using access rights as specified in section 5.2.
If the server detects that the IWbemClassObject that is sent by the client does not conform to [MS-
WMIO] encoding, as specified in section 2.2.4, the server MUST return an HRESULT that has the S
(severity) bit set as specified in [MS-ERREF]. The exact code is implementation-dependent.
If the server is expected to set the value of the output parameter, but the output parameter is set to
NULL upon input, the server SHOULD return an error to indicate failure. In this case, the server
cannot modify the output parameter.
49 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The IWbemLevel1Login interface allows a user to connect to the management services interface
in a particular namespace. The interface MUST be uniquely identified by the UUID {F309AD18-
D86A-11d0-A075-00C04FB68820}.
Method Description
EstablishPosition Opnum: 3
RequestChallenge Opnum: 4
WBEMLogin Opnum: 5
NTLMLogin Opnum: 6
The object that exports this interface also implements the IWbemLoginClientID and
IWbemLoginHelper interfaces. The IRemUnknown and IRemUnknown2 interfaces, as specified
in [MS-DCOM], MUST be used to manage the interfaces exposed by the object. The object MUST be
uniquely identified with the CLSID {8BC3F05E-D86B-11D0-A075-00C04FB68820}.
HRESULT EstablishPosition(
[in, unique, string] wchar_t* reserved1,
[in] DWORD reserved2,
[out] DWORD* LocaleVersion
50 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
reserved1: MUST be set to NULL when sent and MUST be ignored on receipt.
LocaleVersion: The server MUST set the value of LocaleVersion based on the server behavior
when IWbemLevel1Login::NTLMLogin is passed an unrecognized locale name in the
wszPreferredLocale parameter:<10>
The return value and LocaleVersion are used for Locale capability negotiation before calling
IWbemLevel1Login::NTLMLogin, as described in section 3.2.3.
If the server returns an error for an unrecognized locale name passed to
IWbemLevel1Login::NTLMLogin, the server MUST set the LocaleVersion parameter to 0.
Return Values: The server MUST return one of the following values, based on server behavior
for the wszPreferredLocale parameter in IWbemLevel1Login::NTLMLogin.
HRESULT RequestChallenge(
[in, unique, string] wchar_t* reserved1,
[in, unique, string] wchar_t* reserved2,
[out, size_is(16), length_is(16)]
unsigned char* reserved3
);
reserved1: MUST be set to NULL when sent and MUST be ignored on receipt.
reserved2: MUST be set to NULL when sent and MUST be ignored on receipt.
reserved3: MUST be set to NULL when sent and MUST be ignored on receipt.
51 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT WBEMLogin(
[in, unique, string] wchar_t* reserved1,
[in, size_is(16), length_is(16), unique]
unsigned char* reserved2,
[in] long reserved3,
[in] IWbemContext* reserved4,
[out] IWbemServices** reserved5
);
reserved1: MUST be set to NULL when sent and MUST be ignored on receipt.
reserved2: MUST be set to NULL when sent and MUST be ignored on receipt.
reserved4: MUST be set to NULL when sent and MUST be ignored on receipt.
reserved5: MUST be set to NULL when sent and MUST be ignored on receipt.
HRESULT NTLMLogin(
[in, unique, string] LPWSTR wszNetworkResource,
[in, unique, string] LPWSTR wszPreferredLocale,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IWbemServices** ppNamespace
);
wszNetworkResource: The string MUST represent the namespace on the server to which the
returned IWbemServices object is associated. This parameter MUST NOT be NULL and MUST
match the namespace syntax as specified in section 2.2.2.
wszPreferredLocale: MUST be a pointer to a string that MUST specify the locale values in the
preferred order, separated by a comma. Each locale format SHOULD conform to the WMI
locale format, as specified in WMI Locale Formats section 2.2.29. Any subsequent calls that
request CIM localizable information (WBEM_FLAG_USE_AMENDED_QUALIFIERS)
52 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
lFlags: MUST be zero. The server SHOULD consider any other value as not valid and return
WBEM_E_INVALID_PARAMETER; otherwise, the server behavior is implementation-
specific.<14>
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR, as specified in section 2.2.11,
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
access to the namespace; otherwise, WBEM_ACCESS_DENIED MUST be returned.
All subsequent IWbemServices method invocations that request localized information MUST return
the information in the language that is specified in wszPreferredLocale. When the preferred locale is
NULL, the server SHOULD<15> use implementation-specific logic to decide the locale.
The successful method execution MUST fill the ppNamespace parameter with an IWbemServices
interface pointer and MUST return WBEM_S_NO_ERROR.
The failed method execution MUST set the output parameter to NULL and MUST return an error in
the format specified in section 2.2.3.
The IWbemObjectSink interface MUST be implemented by the WMI client if the WMI client uses
asynchronous method calls as specified in section 3.2.4.2.7. In this case, the WMI client acts as an
IWbemObjectSink server. The WMI server acts as an IWbemObjectSink client and invokes the
IWbemObjectSink methods to deliver the results (IWbemClassObjects, if any, and the status code)
of the IWbemServices method for which this IWbemObjectSink is passed as a response handler.
Because this interface is implemented by the WMI client and the WMI server and called by both, the
server in this section refers to the implementer of this interface and the client refers to the caller in
a specific scenario.
53 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Method Description
Indicate The server receives the IWbemClassObject interfaces, which are sent in an ObjectArray
structure. These objects are the result of an IWbemServices asynchronous method call
that was started with this sink as the response handler.
Opnum: 3
SetStatus The server receives either a completion status code or information about the progress of the
operation that was started with this sink as the response handler.
Opnum: 4
When the IWbemObjectSink::Indicate method is called, the apObjArray parameter MUST contain
additional result objects as an array of an IWbemClassObject, sent by the client to the server. The
IWbemObjectSink::Indicate method has the following syntax, expressed in Microsoft Interface
Definition Language (MIDL).
HRESULT Indicate(
[in] long lObjectCount,
[in, size_is(lObjectCount)] IWbemClassObject** apObjArray
);
lObjectCount: MUST be the number of CIM objects in the array of pointers in the ppObjArray
parameter.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call.
WBEM_S_NO_ERROR (0x00)
When the IWbemObjectSink::Indicate method is called for the first time, the server that
implements the ObjectArray structure MUST return WBEM_S_NEW_STYLE if the execution of the
method succeeds.<16> If a server does not implement the ObjectArray structure, it MUST return
WBEM_S_NO_ERROR for successful execution of the method.
If the server implements the ObjectArray structure and WBEM_S_NEW_STYLE is returned during the
first call to the IWbemObjectSink::Indicate method, the server MUST support subsequent calls to
the IWbemObjectSink::Indicate method by using both the DCOM Remote Protocol marshaling
and the ObjectArray structure as specified in section 2.2.14.
When the IWbemObjectSink::SetStatus method is called, the parameter MUST contain the result
of the operation or the progress status information.
54 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
lFlags: Flags that give information about the operation status. The flags MUST be interpreted as
specified in the following table.
Note The flags are not bit flags and cannot be combined.
Value Meaning
Any other DWORD value that does not match the condition shown MUST be treated as not
valid and an error MUST be returned.
hResult: The hResult value of the asynchronous operation or notification. This hResult MUST be
the same HRESULT that the WMI client gets from the matching synchronous operation when
the WMI client makes an asynchronous request to the WMI server.
strParam: If the parameter is NULL, the server MUST ignore the parameter. If the parameter is
not NULL, it MUST represent the operational result of the asynchronous operation. The string
MUST be the same as the string that is returned from the IWbemCallResult::GetResultString
(Opnum 4) method when the operation is executed synchronously.
pObjParam: If the parameter is NULL, the server MUST ignore the parameter. If the parameter
is not NULL, the object MUST contain additional error information for the asynchronous
operation failure.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The IWbemServices interface exposes methods that MUST provide management services to client
processes. The implementation MUST implement all methods and return errors if the semantics of
the operation cannot be completed. IWbemServices defines the execution scope for all methods
implemented on the interface. The initial scope MUST be established by the
IWbemLevel1Login::NTLMLogin call, which returns the interface pointer.
55 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
QueryObjectSink Obtains a notification handler that allows the client to send events
directly to the server.
Opnum: 5
DeleteClass Deletes a specified class from the namespace associated with the
current IWbemServices interface.
Opnum: 10
56 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
CreateInstanceEnum Creates an instance enumeration of all class instances that satisfy the
selection criteria.
Opnum: 18
ExecNotificationQuery Server runs a query to receive events when called by a client to request
subscription to the events.
Opnum: 22
IWbemServices MUST be a DCOM Remote Protocol interface. The interface MUST be uniquely
identified by UUID {9556dc99-828c-11cf-a37e-00aa003240c7}. The object exporting this interface
also implements the IWbemRefreshingServices interface, as shown in the following diagram.
57 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT OpenNamespace(
[in] const BSTR strNamespace,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in, out, unique] IWbemServices** ppWorkingNamespace,
[in, out, unique] IWbemCallResult** ppResult
);
strNamespace: MUST be the CIM path to the target namespace. This namespace MUST be
relative to the current namespace that is associated with the IWbemServices interface
pointer that is used to make the OpenNamespace method call. This parameter MUST NOT be
NULL.
lFlags: Flags that affect the behavior of the OpenNamespace method. The behavior of each
flag MUST be interpreted as follows:
If this bit is not set, the server MUST make the method call synchronous.
If this bit is set, the server MUST make the method call semisynchronously.
Name Value
WBEM_FLAG_RETURN_IMMEDIATELY 0x00000010
Any other DWORD value that does not match the preceding condition MUST be treated as
invalid.
The output parameter MUST be based on the state of the lFlags parameter (whether
WBEM_FLAG_RETURN_IMMEDIATELY is set) as listed in the following table.
ppResult: The output parameter MUST be filled according to the state of the lFlags parameter
(whether WBEM_FLAG_RETURN_IMMEDIATELY is set) as listed in the following table.
58 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR, as specified in section 2.2.11,
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
If the method returns a success code, the method MUST fill one of the two output parameters, as
indicated by the use of the lFlags parameter, which is previously specified.
The successful synchronous method execution MUST fill the ppWorkingNamespace parameter with
an IWbemServices interface pointer and MUST return WBEM_S_NO_ERROR.
The semisynchronous method execution MUST follow the rules that are specified in section
3.1.1.1.2.
The failed method execution MUST set the output parameters to NULL and MUST return an error in
the format that is specified in section 2.2.11.
HRESULT CancelAsyncCall(
[in] IWbemObjectSink* pSink
);
pSink: MUST be a pointer to the IWbemObjectSink interface object that was passed to the
asynchronous method that the client wants to cancel. This parameter MUST NOT be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
59 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The server MUST validate that the security principal making the
IWbemServices::CancelAsyncCall is the same principal that has made the call to be cancelled.
Otherwise, the server MUST return a WBEM_E_ACCESS_DENIED error.
The server MUST NOT wait for any response from the client to complete the cancellation to prevent
protocol performance degradation.
The failed method execution MUST return an error in the format specified in section 2.2.11.
The QueryObjectSink method obtains a notification handler that allows the client to send events
directly to the server.
HRESULT QueryObjectSink(
[in] long lFlags,
[out] IWbemObjectSink** ppResponseHandler
);
lFlags: This parameter is not used and its value MUST be 0x0.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
The successful method execution MUST fill the ppResponseHandler parameter and MUST return
WBEM_S_NO_ERROR.
60 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The IWbemServices::GetObject method retrieves a CIM class or a CIM instance. This method
MUST retrieve CIM objects from the namespace that is associated with the current IWbemServices
interface.
HRESULT GetObject(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out, in, unique] IWbemClassObject** ppObject,
[out, in, unique] IWbemCallResult** ppCallResult
);
strObjectPath: MUST be the CIM path of the CIM object to be retrieved. If the parameter is
NULL, the server MUST return an empty CIM Object.
lFlags: Specifies the behavior of the IWbemServices::GetObject method. Flag behavior MUST
be interpreted as specified in the following table.
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
in section 2.2.6.
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the
0x00000010 method call synchronously.
If this bit is set, the server MUST make the method
call semisynchronously.
61 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
ppObject: If the parameter is set to NULL, the server MUST ignore it. If the parameter is not
NULL, the server MUST return an IWbemClassObject interface pointer that contains the
requested CIM object. In this case, the output parameter MUST be filled according to the state
of the lFlags parameter (whether WBEM_FLAG_RETURN_IMMEDIATELY is set) as listed in the
following table.
ppCallResult: This parameter is optional. If the parameter is set to NULL, the server MUST
ignore it. If the parameter is non-NULL, the server MUST return an IWbemCallResult
interface pointer that contains the operation call result. In this case, the output parameter
MUST be filled according to the state of the lFlags parameter (whether
WBEM_FLAG_RETURN_IMMEDIATELY is set) as listed in the following table.
Return Values: This method MUST return an HRESULT that MUST indicate the status of the
method call. The HRESULT MUST have the type and values as specified in section 2.2.11. The
server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11) to indicate the
successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The successful synchronous method execution MUST provide the retrieved IWbemClassObject
interface pointer in the ppObject parameter and MUST return WBEM_S_NO_ERROR.
62 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The failed method execution MUST set the output parameters to NULL and MUST return an error in
the format specified in section 2.2.11.
HRESULT GetObjectAsync(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
strObjectPath: MUST be the CIM path of the CIM object to be retrieved. If this parameter is set
to NULL, the server MUST return an empty CIM object.
lFlags: Specifies the behavior of the GetObjectAsync method. Flag behavior MUST be
interpreted as specified in the following table.
The server MUST accept a combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
in section 2.2.6.
WBEM_FLAG_SEND_STATUS If this bit is not set, the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus call on the interface
pointer that is provided in the pResponseHandler
parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface
pointer prior to call completion.
63 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
In response to the GetObjectAsync method, the server MUST evaluate the strObjectPath
parameter and MUST return the requested CIM object. The method MUST fail if the CIM object
referred to by strObjectPath does not exist, if the method parameters are not valid as specified in
this section, or if the server is unable to execute the method.
The asynchronous method execution MUST follow the rules that are specified in section 3.1.1.1.3.
The IWbemServices::PutClass method creates a new class or updates an existing class in the
namespace that is associated with the current IWbemServices interface. The server MUST NOT
allow the creation of classes that have names that begin or end with an underscore because those
names are reserved for system classes.
HRESULT PutClass(
[in] IWbemClassObject* pObject,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out, in, unique] IWbemCallResult** ppCallResult
);
pObject: MUST be a pointer to an IWbemClassObject interface pointer that MUST contain the
class information to create a new class or update an existing class. This parameter MUST NOT
be NULL.
lFlags: Specifies the behavior of the PutClass method. Flag behavior MUST be interpreted as
specified in the following table.
The server MUST accept a combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is set, the server SHOULD ignore all the
0x00020000 amended qualifiers while it creates or updates the
CIM class.<17>
If this bit is not set, the server SHOULD include all the
qualifiers, including amended qualifiers, while it
updates or creates the CIM class.
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the
64 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
ppCallResult: The output parameter MUST be filled according to the state of the lFlags
parameter (whether WBEM_FLAG_RETURN_IMMEDIATELY is set) as listed in the following
table.
This parameter is optional. If the parameter is set to NULL, the server MUST ignore it. If the
parameter is non-NULL, the server MUST return an IWbemCallResult interface pointer that
contains the operation call result.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
65 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
In response to the IWbemServices::PutClass method, the server MUST evaluate the pObject
parameter and MUST add or update this class into the current namespace. The method MUST fail if
pObject represents a read-only class, if the method parameters or their combinations are not valid
as specified in this section, or if the server is unable to execute the method.
The semisynchronous method execution MUST follow the rules that are specified in section
3.1.1.1.2.
The failed method execution MUST set output parameters to NULL and MUST return an error in the
format specified in section 2.2.11.
HRESULT PutClassAsync(
[in] IWbemClassObject* pObject,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
pObject: MUST be a pointer to an IWbemClassObject interface pointer that MUST contain the
class information to create a new class or update an existing class. The class that is specified
by the parameter MUST have been correctly initialized with all the required property values.
This parameter MUST NOT be NULL.
lFlags: Specifies the behavior of the PutClassAsync method. Flag behavior MUST be interpreted
as specified in the following table.
The server MUST accept a combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is set, the server SHOULD ignore all the
0x00020000 amended qualifiers while it creates or updates a CIM
class.<18>
If this bit is not set, the server SHOULD include all the
qualifiers, including amended qualifiers, while it
updates or creates a CIM class.
66 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_FLAG_SEND_STATUS If this bit is not set, the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus method call on the
interface pointer that is provided in the
pResponseHandler parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface
pointer prior to call completion.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
67 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The IWbemServices::DeleteClass method MUST delete a specified class from the namespace that
is associated with the current IWbemServices interface.
HRESULT DeleteClass(
[in] const BSTR strClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in, out, unique] IWbemCallResult** ppCallResult
);
strClass: MUST be the name of the class to delete. This parameter MUST NOT be NULL.
lFlags: Specifies the behavior of the DeleteClass method. Flag behavior MUST be interpreted as
specified in the following table.
Value Meaning
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is set, the server MUST make the method call
0x00000010 semisynchronously.
If this bit is not set, the server MUST make the method call
synchronously.
Any other DWORD value that does not match the preceding condition MUST be treated as
invalid.
ppCallResult: This parameter is optional. If the parameter is set to NULL, the server MUST
ignore it. If the parameter is not NULL, the server MUST return an IWbemCallResult
interface pointer that contains the operation call result. The output parameter MUST be filled
according to the state of the lFlags parameter (whether WBEM_FLAG_RETURN_IMMEDIATELY
is set) as listed in the following table.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
68 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
In response to the IWbemServices::DeleteClass method, the server MUST evaluate the strClass
parameter (specified in this section) and MUST delete the strClass parameter from the current
namespace. The server MUST delete all the instances of the class and recursively delete all the
derived classes. The method MUST fail if the following applies: if strClass does not exist; if the
method parameters or their combinations are not valid as specified in this section; or if the server is
unable to execute the method.
The semisynchronous method execution MUST follow the rules that are specified in section
3.1.1.1.2.
The failed method execution MUST set output parameters to NULL and MUST return an error in the
format specified in section 2.2.11.
HRESULT DeleteClassAsync(
[in] const BSTR strClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
strClass: MUST be the name of the class to delete. This parameter MUST NOT be NULL.
lFlags: Specifies the behavior of the DeleteClassAsync method. Flag behavior MUST be
interpreted as specified in the following table.
Value Meaning
WBEM_FLAG_SEND_STATUS If this bit is not set, the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus call on the interface pointer that is
provided in the pResponseHandler parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface pointer prior
to call completion.
Any other DWORD value that does not match the preceding condition MUST be treated as not
valid.
69 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
The asynchronous method execution MUST follow the rules that are specified in section 3.1.1.1.3.
HRESULT CreateClassEnum(
[in] const BSTR strSuperClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IEnumWbemClassObject** ppEnum
);
strSuperClass: MUST specify a superclass name. Only classes that are subclasses of this class
MUST be returned. If strSuperClass is NULL or a zero-length string, all classes in the
namespace MUST be included in the result set. The results MUST be filtered by using the
lFlags parameter. Classes without a base class MUST be considered to be derived from the
NULL superclass.
lFlags: Flags affect the behavior of the CreateClassEnum method. Flag behavior MUST be
interpreted as specified in the following table.
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
70 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
in section 2.2.6.
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the
0x00000010 method call synchronously.
If this bit is set, the server MUST make the method
call semisynchronously.
WBEM_FLAG_SHALLOW When this bit is not set, the server MUST return all
0x00000001 classes that are derived from the requested class and
all its subclasses.
When this bit is set, the server MUST return only the
classes that are directly derived from the requested
class.
WBEM_FLAG_FORWARD_ONLY When this bit is not set, the server MUST return an
0x00000020 enumerator that has reset capability.
When this bit is set, the server MUST return an
enumerator that does not have reset capability, as
specified in section 3.1.4.4.
ppEnum: MUST receive the pointer to the enumerator that implements the
IEnumWbemClassObject interface. This parameter MUST NOT be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The successful synchronous method execution MUST fill the ppEnum parameter with an
IEnumWbemClassObject interface pointer after all classes are collected and MUST return
WBEM_S_NO_ERROR.
The semisynchronous method execution MUST follow the rules that are specified in section
3.1.1.1.2.
The failed method execution MUST set the value that is referenced by the output parameters to
NULL and MUST return an error in the format that is specified in section 2.2.11.
71 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT CreateClassEnumAsync(
[in] const BSTR strSuperClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
strSuperClass: Specifies a superclass name. Only classes that are subclasses of this class MUST
be returned. If strSuperClass is NULL or a zero-length string, all classes in the namespace
MUST be considered in the result set. The results MUST be filtered by using the lFlags
parameter. Classes without a base class are considered to be derived from the NULL
superclass.
lFlags: Flags that affect the behavior of the CreateClassEnum method. Flag behavior MUST be
interpreted as specified in the following table.
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object as specified
in section 2.2.6.
WBEM_FLAG_SEND_STATUS If this bit is not set, the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus call on the interface
pointer that is provided in the pResponseHandler
parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface
pointer prior to call completion.
WBEM_FLAG_SHALLOW When this bit is not set, the server MUST return all
0x00000001 classes that are derived from the requested class and
all its subclasses.
When this bit is set, the server MUST only return the
classes that are directly derived from the requested
class.
72 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT, which MUST indicate the status of the
method call. The HRESULT MUST have the type and values as specified in section 2.2.11. The
server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to indicate the
successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The asynchronous method execution MUST follow the rules specified in section 3.1.1.1.3.
HRESULT PutInstance(
[in] IWbemClassObject* pInst,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in, out, unique] IWbemCallResult** ppCallResult
);
pInst: MUST be a pointer to an IWbemClassObject interface object that MUST contain the class
instance that the client wants to create or update. This parameter MUST NOT be NULL.
lFlags: Flags that affect the behavior of the PutInstance method. Flag behavior MUST be
interpreted as specified in the following table.
The server MUST accept a combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is set, the server SHOULD ignore all the
0x00020000 amended qualifiers while this method creates or
updates a CIM instance.
If this bit is not set, the server SHOULD include all the
qualifiers, including amended qualifiers, while this
method creates or updates a CIM instance.
73 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the
0x00000010 method call synchronously.
If this bit is set, the server MUST make the method
call semisynchronously.
pCtx: This parameter is optional. The pCtx parameter MUST be a pointer to an IWbemContext
interface object. The pCtx parameter indicates whether the client is requesting a partial-
instance update or a full-instance update. A partial-instance update modifies a subset of the
CIM instance properties. In contrast, a full-instance update modifies all the properties. If
NULL, this parameter indicates that the client application is requesting a full-instance update.
When pCtx is used to perform a partial-instance update, the IWbemContext interface object
MUST be filled in with the properties that are specified in the following table.
__PUT_EXT_STRICT_NULLS VT_BOOL If this property is set to TRUE, the server MUST force
the setting of properties to NULL. This parameter is
optional.
__PUT_EXT_ATOMIC VT_BOOL If the return code indicates success, all CIM property
updates MUST have been successful.
On failure, the server MUST revert any changes to
the original state for all CIM property that was
updated. On failure, not a single change MUST
remain. The operation is successful when all
properties are updated.
ppCallResult: This parameter is optional. If the parameter is set to NULL, the server MUST
ignore it. If the parameter is not NULL, the server MUST return an IWbemCallResult
interface pointer that contains the result of the operation call. The output parameter MUST be
filled according to the state of the lFlags parameter (whether
WBEM_FLAG_RETURN_IMMEDIATELY is set), as listed in the following table.
74 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
In response to the IWbemServices::PutInstance method, the server MUST evaluate the pInst
parameter as specified in this section. It MUST add or update this instance into the current
namespace. The method MUST fail if the following applies: if the server does not allow creation of
new instances for the pInst class or does not allow modification of the instance that is represented
by pInst; if the method parameters or their combinations are not valid as specified in this section;
or if the server is unable to execute the method.
The semisynchronous method execution MUST follow the rules as specified in section 3.1.1.1.2.
The failed method execution MUST set output parameters to NULL and MUST return an error in the
format that is specified in section 2.2.11.
HRESULT PutInstanceAsync(
[in] IWbemClassObject* pInst,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
pInst: MUST be a pointer to an IWbemClassObject interface object that MUST contain the class
instance that the client wants to create or update. This parameter MUST NOT be NULL.
lFlags: Flags that affect the behavior of the PutInstanceAsync method. Flag behavior MUST be
interpreted as specified in the following table.
75 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is set, the server SHOULD ignore all the
0x00020000 amended qualifiers while this method creates or
updates a CIM instance.
If this bit is not set, the server SHOULD include all the
qualifiers, including amended qualifiers, while this
method creates or updates a CIM instance.
WBEM_FLAG_SEND_STATUS If this bit is not set, the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus call on the interface
pointer that is provided in the pResponseHandler
parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface
pointer prior to call completion.
pCtx: This parameter is optional. The pCtx parameter MUST be a pointer to an IWbemContext
interface object that is specified in section 2.2.13. The pCtx parameter indicates whether the
client is requesting a partial-instance update or full-instance update. A partial-instance update
modifies a subset of CIM instance properties; a full-instance update modifies all the
properties. If NULL, this parameter indicates that the client application is requesting a full-
instance update. When pCtx is used to perform a partial-instance update, the IWbemContext
interface MUST be completed with the properties that are specified in the following table.
__PUT_EXT_ATOMIC VT_BOOL If the return code indicates success, all CIM property
76 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
The asynchronous method execution MUST follow the rules as specified in 3.1.1.1.3.
The failed method execution MUST return an error in the format that is specified in section 2.2.11.
HRESULT DeleteInstance(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in, out, unique] IWbemCallResult** ppCallResult
);
strObjectPath: MUST be the CIM path to the class instance that the client wants to delete. This
parameter MUST NOT be NULL. The CIM path MUST contain the class name and the value of
the key properties.
lFlags: Flags that affect the behavior of the IWbemServices::DeleteInstance method. Flag
behavior MUST be interpreted as specified in the following table.
77 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the method call
0x00000010 synchronously.
If this bit is set, the server MUST make the method call
semisynchronously.
Any other DWORD value that does not match the preceding condition MUST be treated as
invalid.
ppCallResult: This parameter is optional. If the parameter is set to NULL, the server MUST
ignore it. If the parameter is not NULL, the server MUST return an IWbemCallResult
interface pointer that contains the result of the operation call. The output parameter MUST be
filled according to the state of the lFlags parameter (whether
WBEM_FLAG_RETURN_IMMEDIATELY is set), as listed in the following table.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
The semisynchronous method execution MUST follow the rules as specified in section 3.1.1.1.2.
The failed method execution MUST set the output parameters to NULL and MUST return an error in
the format specified in section 2.2.11.
78 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT DeleteInstanceAsync(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
strObjectPath: MUST be the CIM path to the class instance that the client wants to delete. This
parameter MUST NOT be NULL. The CIM path MUST contain the class name and the value of
the key properties.
Value Meaning
WBEM_FLAG_SEND_STATUS If this bit is not set, the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus call on the interface pointer that is
provided in the pResponseHandler parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface pointer prior
to call completion.
Any other DWORD value that does not match the preceding condition MUST be treated as
invalid.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and
WBEM_FULL_WRITE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be
returned.
79 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The failed method execution MUST return an error in the format that is specified in section 2.2.11.
HRESULT CreateInstanceEnum(
[in] const BSTR strSuperClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IEnumWbemClassObject** ppEnum
);
strSuperClass: MUST contain the name of the CIM class for which the client wants instances.
This parameter MUST NOT be NULL.
lFlags: Flags that affect the behavior of the CreateInstanceEnum method. Flag behavior MUST
be interpreted as specified in the following table.
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
in section 2.2.6.
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the
0x00000010 method call synchronously.
If this bit is set, the server MUST make the method
call semisynchronously.
WBEM_FLAG_DIRECT_READ If this bit is not set, the server MUST consider the
0x00000200 entire class hierarchy when it returns the result.
If this bit is set, the server MUST disregard any
derived class when it searches the result.
80 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
ppEnum: MUST receive the pointer to the enumerator that is used to enumerate through the
returned class instances, which implements the IEnumWbemClassObject interface. This
parameter MUST NOT be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return the following value (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_ENABLE and WBEM_REMOTE_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The successful synchronous method execution MUST fill the ppEnum parameter with an
IEnumWbemClassObject interface pointer after all instances are collected and MUST return
WBEM_S_NO_ERROR.
The semisynchronous method execution MUST follow the rules as specified in section 3.1.1.1.2.
The failed method execution MUST set the value that is referenced by the output parameters to
NULL and MUST return an error in the format that is specified in section 2.2.11.
HRESULT CreateInstanceEnumAsync(
[in] const BSTR strSuperClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
strSuperClass: MUST contain the name of the CIM class for which the client wants instances.
This parameter MUST NOT be NULL.
81 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
in section 2.2.6.
WBEM_FLAG_SEND_STATUS If this bit is not set the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus call on the interface
pointer that is provided in the pResponseHandler
parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface
pointer prior to call completion.
WBEM_FLAG_DIRECT_READ If this bit is not set, the server MUST consider the
0x00000200 entire class hierarchy when it returns the result.
If this bit is set, the server MUST disregard any
derived class when it searches the result.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_ENABLE and WBEM_REMOTE_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
82 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The failed method execution MUST return an error in the format that is specified in section 2.2.11.
HRESULT ExecQuery(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IEnumWbemClassObject** ppEnum
);
strQuery: MUST contain the "WQL" query text as specified in [UNICODE] (UTF-16) and in
section 2.2.1. This parameter MUST NOT be NULL.
lFlags: Specifies the behavior of the IWbemServices::ExecQuery method. Flag behavior MUST
be interpreted as specified in the following table.
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD not return
0x00020000 CIM localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
in section 2.2.6.
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the
0x00000010 method call synchronously.
If this bit is set, the server MUST make the method
call semisynchronously.
WBEM_FLAG_DIRECT_READ If this bit is not set, the server MUST consider the
0x00000200 entire class hierarchy when it returns the result.
If this bit is set, the server MUST disregard any
derived class when it searches the result.
WBEM_FLAG_PROTOTYPE If this bit is not set, the server MUST run the query.
0x00000002 If this bit is set, the server MUST only return the class
schema of the resulting objects.
83 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
section 3.1.4.4.
ppEnum: MUST receive the pointer to the IEnumWbemClassObject that is used to enumerate
through the CIM objects that are returned for the query result set. This parameter MUST NOT
be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_ENABLE and WBEM_REMOTE_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The successful synchronous method execution MUST fill the ppEnum parameter with a
IEnumWbemClassObject interface pointer after all instances are collected and MUST return
WBEM_S_NO_ERROR.
The semisynchronous method execution MUST follow the rules that are specified in section
3.1.1.1.2.
The failed method execution MUST set the value that is referenced by the output parameters to
NULL and MUST return an error in the format specified in section 2.2.11.
HRESULT ExecQueryAsync(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
strQuery: MUST contain the WQL query text as specified in section 2.2.1. This parameter MUST
NOT be NULL.
84 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD not return
0x00020000 CIM localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
in section 2.2.6.
WBEM_FLAG_SEND_STATUS If this bit is not set the server MUST make one final
0x00000080 IWbemObjectSink::SetStatus call on the interface
pointer that is provided in the pResponseHandler
parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface
pointer prior to call completion.
WBEM_FLAG_PROTOTYPE If this bit is not set, the server MUST run the query.
0x00000002 If this bit is set, the server MUST only return the class
schema of the resulting objects.
WBEM_FLAG_DIRECT_READ If this bit is not set, the server MUST consider the
0x00000200 entire class hierarchy when it returns the result.
If this bit is set, the server MUST disregard any
derived class when it searches the result.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_ENABLE and WBEM_REMOTE_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
85 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The failed method execution MUST return an error in the format that is specified in section 2.2.11.
HRESULT ExecNotificationQuery(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IEnumWbemClassObject** ppEnum
);
strQuery: MUST contain the WQL event-related query text as specified in section 2.2.1. This
parameter MUST NOT be NULL.
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
Value Meaning
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information for the CIM object, as specified
in section 2.2.6.
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is set, the server MUST make the method
0x00000010 call semisynchronously.
This flag MUST always be set.
86 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_ENABLE and WBEM_REMOTE_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The failed method execution MUST set the value that is referenced by the output parameters to
NULL and MUST return an error in the format specified in section 2.2.11.
HRESULT ExecNotificationQueryAsync(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
strQuery: MUST contain the WQL event-related query text as specified in section 2.2.1. This
parameter MUST NOT be NULL.
The server MUST allow any combination of zero or more flags from the following table and
MUST comply with all the restrictions in a flag description. Any other DWORD value that does
not match a flag condition MUST be treated as not valid.
87 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_FLAG_USE_AMENDED_QUALIFIERS If this bit is not set, the server SHOULD return no CIM
0x00020000 localizable information.
If this bit is set, the server SHOULD return CIM
localizable information.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR, as specified in section 2.2.11,
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_ENABLE and WBEM_REMOTE_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The asynchronous method execution MUST follow the rules that are specified in section 3.1.1.1.3.
The failed method execution MUST return an error in the format specified in section 2.2.11.
If method execution succeeds, the server MUST run the notification query until the query is canceled
or execution fails. The server MUST NOT call IWbemObjectSink::SetStatus to send success or
operation progress information. When query execution fails, the server MUST call
IWbemObjectSink::SetStatus to send the error to the client, and the server MUST release
IWbemObjectSink.
HRESULT ExecMethod(
[in] const BSTR strObjectPath,
[in] const BSTR strMethodName,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemClassObject* pInParams,
[out, in, unique] IWbemClassObject** ppOutParams,
88 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
strObjectPath: MUST be the CIM path to the class or instance that implements the method. This
parameter MUST NOT be NULL. The CIM path MUST contain the class name and the value of
the key properties.
strMethodName: MUST be the name of the method to be executed. This parameter MUST NOT
be NULL.
Value Meaning
WBEM_FLAG_RETURN_IMMEDIATELY If this bit is not set, the server MUST make the method call
0x00000010 synchronously.
If this bit is set, the server MUST make the method call
semisynchronously.
Any other DWORD value that does not match the preceding condition MUST be treated as
invalid.
ppOutParams: If ppOutParams is NULL, the parameter MUST be ignored. When the parameter
is not NULL, it MUST return an IWbemClassObject interface pointer that contains output
parameters. The output parameter MUST be filled according to the state of the lFlags
parameter (whether WBEM_FLAG_RETURN_IMMEDIATELY is set) as listed in the following
table.
ppCallResult: This parameter is optional. If the parameter is set to NULL, the server MUST
ignore it. However, if the parameter is not NULL, the server MUST return an
IWbemCallResult interface pointer that contains the operation call result. In this situation,
the output parameter MUST be filled according to the state of the lFlags parameter (whether
WBEM_FLAG_RETURN_IMMEDIATELY is set) as listed in the following table.
89 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT, which MUST indicate the status of the
method call. HRESULT MUST have the type and values as specified in section 2.2.11. The
server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to indicate the
successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_METHOD_EXECUTE and
WBEM_REMOTE_ENABLE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST
be returned.
The successful synchronous method execution MUST return the output parameters that are
encapsulated in an IWbemClassObject interface pointer in the ppObject parameter and MUST return
WBEM_S_NO_ERROR.
The semisynchronous method execution MUST follow the rules that are specified in section
3.1.1.1.2.
The failed method execution MUST set the output parameters to NULL and MUST return an error in
the format specified in section 2.2.11.
HRESULT ExecMethodAsync(
[in] const BSTR strObjectPath,
[in] const BSTR strMethodName,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemClassObject* pInParams,
[in] IWbemObjectSink* pResponseHandler
);
90 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
strMethodName: MUST be the name of the method to be executed. This parameter MUST NOT
be NULL.
lFlags: Specifies the behavior of the ExecMethodAsync method. Flag behavior MUST be
interpreted as specified in the following table.
Value Meaning
WBEM_FLAG_SEND_STATUS If this bit is not set, the server MUST make just one final
0x00000080 IWbemObjectSink::SetStatus call on the interface pointer that is
provided in the pResponseHandler parameter.
If this bit is set, the server MAY make intermediate
IWbemObjectSink::SetStatus calls on the interface pointer prior
to call completion.
Any other DWORD value that does not match the preceding condition MUST be treated as
invalid.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (as specified in section 2.2.11)
to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_METHOD_EXECUTE and
WBEM_REMOTE_ENABLE accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST
be returned.
The asynchronous method execution MUST follow the rules that are specified in section 3.1.1.1.3.
The failed method execution MUST return an error in the format specified in section 2.2.11.
91 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The IEnumWbemClassObject interface MUST be used to return results from synchronous and
semisynchronous method calls, which can return multiple CIM objects as result. The interface MUST
be implemented by the server. The interface MUST be uniquely identified by UUID {027947e1-d731-
11ce-a357-000000000001}.
Method Description
Reset Causes the server to reset the enumeration sequence to the beginning of the collection of
CIM objects.
Opnum: 3
Next Causes the server to get one or more CIM objects starting at the current position in an
enumeration, and to move the current position by the number of CIM objects in the uCount
parameter.
Opnum: 4
Clone Causes the server to make a logical copy of the entire enumerator.
Opnum: 6
Skip Causes the server to move the current position in an enumeration ahead by a specified
number of CIM objects.
Opnum: 7
The object that exports this interface MUST implement the IWbemFetchSmartEnum interface. The
IRemUnknown and IRemUnknown2 interfaces, as specified in [MS-DCOM], MUST be used to
manage the interfaces exposed by the object.
92 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
When the IEnumWbemClassObject::Reset method is invoked, the server MUST reset the
enumeration sequence to the beginning of the collection of CIM objects.
HRESULT Reset();
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method. If the IEnumWbemClassObject::Reset
method is invoked on an enumerator that does not support reset capability, the server MUST
return WBEM_E_INVALID_OPERATION.
WBEM_S_NO_ERROR (0x00)
The server MUST validate that the security principal that makes the call is the same as the security
principal that obtained the IEnumWbemClassObject interface pointer; otherwise,
WBEM_E_ACCESS_DENIED MUST be returned.
In response to the IEnumWbemClassObject::Reset method, the server MUST reset the status of
the enumeration (as specified in this section) if the enumerator is not created by using
WBEM_FLAG_FORWARD_ONLY.
A failed method execution MUST set the current index position to 0x0 and return an error in the
format that is specified in section 2.2.11.
93 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
When the IEnumWbemClassObject::Next method is invoked, the server MUST either return
WBEM_S_TIMEDOUT with 0 CIM objects, or MUST get one or more CIM objects starting at the
current position in an enumeration. The server MUST also move the current position by the number
of CIM objects in the uCount parameter. When IEnumWbemClassObject is created, the current
position MUST be set on the first CIM object of the collection. The order of the CIM objects that are
stored in the enumerator is arbitrary.
HRESULT Next(
[in] long lTimeout,
[in] ULONG uCount,
[out, size_is(uCount), length_is(*puReturned)]
IWbemClassObject** apObjects,
[out] ULONG* puReturned
);
puReturned: MUST be a pointer to a ULONG type that receives the number of CIM objects that
are returned. When sent by the client, this parameter MUST NOT be NULL. Upon return by the
server, this parameter can be NULL if a failure occurs or if there are no results.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The server MUST validate that the security principal that makes the call is the same as the security
principal that obtained the IEnumWbemClassObject interface pointer; otherwise,
WBEM_E_ACCESS_DENIED MUST be returned.
In response to the IEnumWbemClassObject::Next method call, the server MUST evaluate the
uCount and lTimeout parameters (as specified in this section) and MUST return the requested
number of CIM objects, if any are available. The server MUST perform the operation within the time
allowed by lTimeout.
If the server is unable to return all the requested CIM objects in the requested amount of time, it
MUST return WBEM_S_TIMEDOUT. The requested number of CIM objects MUST start from the
current index position. The current index position in the enumeration MUST be incremented with the
number of CIM objects returned.
94 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
If the original semisynchronous operation fails, the server MUST return the error code that the
original method would have returned in its synchronous version.
The failed method execution MUST set the value that is referenced by the output parameters to
NULL and MUST return an error in the format that is specified in section 2.2.11.
HRESULT NextAsync(
[in] ULONG uCount,
[in] IWbemObjectSink* pSink
);
uCount: MUST be the number of CIM objects being requested. This parameter MUST NOT be
NULL.
pSink: MUST be a pointer to the IWbemObjectSink interface, which MUST represent the sink
to receive the CIM object. As each batch of CIM objects is requested, they MUST be delivered
to the IWbemObjectSink::Indicate method to which pSink points (as specified in section
3.1.4.2.1) and MUST be followed by a final call to the IWbemObjectSink::SetStatus method
to which pSink points, as specified in section 3.1.4.2.2. This parameter MUST NOT be NULL. In
error cases, indicated by the HRESULT return value, the supplied IWbemObjectSink
interface pointer MUST NOT be used by the server.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The server MUST validate that the security principal that makes the call is the same as the one that
obtained the IEnumWbemClassObject interface pointer; otherwise, WBEM_E_ACCESS_DENIED
MUST be returned.
95 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The failed method execution MUST return an error in the format specified in section 2.2.11.
The IEnumWbemClassObject::Clone method makes a logical copy of the entire enumerator. The
cloned enumerator MUST have the same current position as the source enumerator.
HRESULT Clone(
[out] IEnumWbemClassObject** ppEnum
);
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The server MUST validate that the security principal that makes the call is the same security
principal that obtained the IEnumWbemClassObject interface pointer; otherwise,
WBEM_E_ACCESS_DENIED MUST be returned.
The successful method execution MUST fill the ppEnum parameter with an
IEnumWbemClassObject interface pointer, as specified in section 3.1.4.4, which MUST be a copy
of the source enumerator that retains the current position in an enumeration. The method MUST
return WBEM_S_NO_ERROR.
If the original semisynchronous operation fails, the server MUST return the error code that the
original method would have returned in its synchronous version.
The failed method execution MUST return an error in the format that is specified in section 2.2.11.
When the IEnumWbemClassObject::Skip method is invoked, the server MUST move the current
position in an enumeration ahead by a specified number of CIM objects.
HRESULT Skip(
[in] long lTimeout,
[in] ULONG nCount
);
96 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
nCount: MUST be the number of CIM objects to skip in the enumeration. If this parameter is
greater than the number of CIM objects that remain to enumerate, the call MUST skip to the
end of the enumeration, and WBEM_S_FALSE MUST be the returned value for the method.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The server MUST validate that the security principal that makes the call is the same as the security
principal that obtained the IEnumWbemClassObject interface pointer; otherwise,
WBEM_E_ACCESS_DENIED MUST be returned.
In response to the IEnumWbemClassObject::Skip method, the server MUST evaluate the uCount
and lTimeout parameters as specified in this section. The server MUST skip the requested number of
CIM objects from the result set. The server MUST complete the operation within the time allowed by
lTimeout. The requested number of CIM objects MUST start from the current index position. The
current index position in the enumeration MUST be incremented by the number of CIM objects
skipped.
If the call succeeds, it MUST return WBEM_S_NO_ERROR. If the call gets to the end of the
enumeration and the number of remaining CIM objects is less than the number of requested CIM
objects, the server MUST return WBEM_S_FALSE. If the server is not able to skip the requested
number of CIM objects in the requested amount of time, it MUST return WBEM_S_TIMEDOUT.
If the original semisynchronous operation fails, the server MUST return the error code that the
original method would have returned in its synchronous version.
The failed method execution MUST return an error in the format that is specified in section 2.2.11.
The IWbemCallResult interface MUST be used to return call results from semisynchronous calls
that return a single CIM object. The interface MUST be implemented by the server. The interface
MUST be uniquely identified by UUID {44aca675-e8fc-11d0-a07c-00c04fb68820}.
Method Description
GetResultObject Causes the server to attempt to retrieve a CIM object from a previous
semisynchronous call to the IWbemServices::GetObject method or
IWbemServices::ExecMethod method.
Opnum: 3
GetResultString Causes the server to return the assigned CIM path of a CIM instance that was created
by the IWbemServices::PutInstance method.
Opnum: 4
GetResultService Causes the server to retrieve a pointer to the IWbemServices interface that results
97 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
GetCallStatus Causes the server to return the status of the current outstanding semisynchronous
call.
Opnum: 6
HRESULT GetResultObject(
[in] long lTimeout,
[out] IWbemClassObject** ppResultObject
);
lTimeout: MUST be the maximum amount of time, in milliseconds, that the call to the
IWbemCallResult::GetResultObject method allows to pass before it times out. If the
constant WBEM_INFINITE (0xFFFFFFFF) is used, the GetResultObject method call MUST wait
until the operation succeeds. If this parameter is set to 0 and the result object is available at
the time of the method call, the object MUST be returned in ppResultObject and
WBEM_S_NO_ERROR MUST also be returned. If this parameter is set to 0 but the result object
is not available at the time of the method call, WBEM_S_TIMEDOUT MUST be returned.
ppResultObject: MUST be a copy of the CIM object when the semisynchronous operation is
complete. A new CIM object MUST NOT be returned on error. When sent by the client, this
parameter MUST NOT be NULL. Upon return by the server, this parameter can be NULL if
there is a failure or if there are no results.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
In response to the IWbemCallResult::GetResultObject method, the server MUST return the CIM
object in the ppResultObject parameter in the time allowed by the lTimeout parameter. The method
MUST fail if the method parameters are not valid, as specified earlier in this section, or if the server
is unable to execute the method.
The successful method execution MUST fill ppResultObject with an IWbemClassObject interface
pointer and MUST return WBEM_S_NO_ERROR.
The failed method execution sets the value referenced by the output parameters to NULL and MUST
return an error in the format specified in section 2.2.11. In case the operation is not completed after
98 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
When the IWbemCallResult::GetResultString method is called, the server MUST return the
assigned CIM path of a CIM instance that was created by the IWbemServices::PutInstance
method that returned IWbemCallResult in the ppCallResult parameter.
HRESULT GetResultString(
[in] long lTimeout,
[out] BSTR* pstrResultString
);
pstrResultString: MUST be a pointer to a BSTR value, which MUST contain the CIM path of the
CIM object instance, which MUST lead to the CIM instance that was created using
IWbemServices::PutInstance. In case of failure of the semisynchronous operation, the
returned string MUST be NULL. When sent by the client, this pointer parameter MUST NOT be
NULL. If the original operation does not return a string, the returned string MUST be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
IWbemCallResult::GetResultString MUST be called to obtain the CIM path created after the
IWbemServices::PutInstance execution. In response to the
IWbemCallResult::GetResultString method, the server MUST return the string result of the
operation in the pstrResultString parameter. The method MUST fail if the method parameters are
not valid, as specified earlier in this section, or if the server is unable to execute the method.
The successful method execution MUST fill pstrResultString with a string value of type BSTR and
MUST return WBEM_S_NO_ERROR.
The failed method execution sets the value referenced by the output parameters to NULL and MUST
return an error in the format specified in section 2.2.11. In case the operation is not completed after
lTimeout milliseconds, the server MUST return WBEM_S_TIMEDOUT and MUST allow for further
retries to be made.
99 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT GetResultService(
[in] long lTimeout,
[out] IWbemServices** ppServices
);
lTimeout: MUST be the time, in milliseconds, that the call to GetResultService allows to pass
before timing out. If the constant WBEM_INFINITE (0xFFFFFFFF) is used, the Skip method call
MUST wait until the operation succeeds.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The successful method execution MUST fill the ppServices parameter with an IWbemServices
interface pointer and MUST return WBEM_S_NO_ERROR.
The failed method execution sets the value that is referenced by the output parameters to NULL and
MUST return an error in the format that is specified in section 2.2.11. If the operation does not
complete within lTimeout milliseconds, the server MUST return WBEM_S_TIMEDOUT and MUST allow
for further retries to be made.
100 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
When the IWbemCallResult::GetCallStatus method is invoked, the server MUST return the status
of the current outstanding semisynchronous call.
HRESULT GetCallStatus(
[in] long lTimeout,
[out] long* plStatus
);
lTimeout: MUST be the maximum amount of time, in milliseconds, that the call to
GetCallStatus allows to pass before timing out. If the constant WBEM_INFINITE
(0xFFFFFFFF) is used, the Skip method call waits until the operation succeeds.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The successful method execution MUST fill plStatus with the operation status code of the
IWbemServices method operation and MUST return WBEM_S_NO_ERROR.
The failed method execution sets the value that is referenced by the output parameters to NULL and
MUST return an error in the format that is specified in section 2.2.11.
Method Description
101 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
enumerator interface.
Opnum: 3
HRESULT GetSmartEnum(
[out] IWbemWCOSmartEnum** ppSmartEnum
);
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The server MUST validate that the security principal that makes the call is the same as the security
principal that obtained the IEnumWbemClassObject interface pointer; otherwise,
WBEM_E_ACCESS_DENIED MUST be returned.
A successful execution MUST return the IWbemWCOSmartEnum interface in the output parameter
and MUST return WBEM_S_NO_ERROR.
The failed method execution MUST set the output parameters to NULL and MUST return an error in
the format specified in section 2.2.11.
Method Description
Next Returns an array of IWbemClassObject interface pointers that are encoded by using the
ObjectArray structure for optimization purposes.
Opnum: 3
102 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT Next(
[in] REFGUID proxyGUID,
[in] long lTimeout,
[in] ULONG uCount,
[out] ULONG* puReturned,
[out] ULONG* pdwBuffSize,
[out, size_is(,*pdwBuffSize)] byte** pBuffer
);
proxyGUID: MUST be a client-generated GUID that MUST identify the client. This parameter
MUST NOT be NULL.
lTimeout: MUST be the maximum amount of time, in milliseconds, that the Next method call
allows to pass before it times out. If the constant WBEM_INFINITE (0xFFFFFFFF) is used, the
Skip method call waits until the operation succeeds. This parameter MUST NOT be NULL.
uCount: MUST be the number of requested CIM objects. This parameter MUST NOT be NULL.
puReturned: MUST be a pointer to a ULONG value that MUST contain the number of CIM objects
that are returned by the Next method. This parameter MUST NOT be NULL.
pdwBuffSize: MUST be a pointer to a ULONG value that MUST contain the buffer size, in bytes.
This parameter MUST NOT be NULL.
pBuffer: MUST be a pointer to the byte array that MUST represent the packet. This parameter
MUST NOT be NULL. The byte array represents an array of CIM objects that are encoded by
using the ObjectArray format as specified in section 2.2.14. When returned by the server, this
parameter can be NULL if a failure occurs or if there are no results to return.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
If a failure occurs, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
The server MUST validate that the security principal that makes the call is the same as the security
principal that obtained the IEnumWbemClassObject interface pointer; otherwise,
WBEM_E_ACCESS_DENIED MUST be returned.
103 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
On success, the server MUST return data in the pBuffer by using an ObjectArray structure as
specified in section 2.2.14.
The successful method execution MUST return WBEM_S_NO_ERROR. If the number of remaining
CIM objects to be retrieved is less than the number of requested CIM objects, the server MUST
return WBEM_S_FALSE. Regardless, the server MUST fill the output parameters of the method as
specified in section 2.2.14.
Method Description
SetClientInfo Passes the client NETBIOS name and a unique client generated number to the server.
Opnum: 3
The IWbemLoginClientID::SetClientInfo method MUST pass the client NETBIOS name and a
unique client-generated number to the server.
HRESULT SetClientInfo(
[in, unique, string] LPWSTR wszClientMachine,
[in] long lClientProcId,
[in] long lReserved
);
wszClientMachine: MUST specify the client NETBIOS name. This parameter MUST NOT be
NULL.
lReserved: This parameter is not used, and its value MUST be NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
104 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The server MUST fail the IRemUnknown::QueryInterface operation if the interface is not
implemented by the server. This interface is not required for the protocol to work.
Method Description
SetEvent Signals an event on the server with name that MUST be specified as a parameter of the
method.
Opnum: 3
HRESULT SetEvent(
[in] LPCSTR sEventToSet
);
sEventToSet: MUST contain the name of the event to be signaled. This parameter MUST NOT be
NULL.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
If the method fails, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
The IWbemBackupRestore interface exposes methods that back up and restore the contents of
the CIM database. The interface MUST be implemented by the server to support backup/restore
scenarios. The interface MUST be uniquely identified by UUID {C49E32C7-BC8B-11d2-85D4-
00105A1F8304}.
Method Description
Backup Causes the server to back up the contents of the CIM database.
Opnum: 3
Restore Causes the server to restore the contents of the CIM database.
105 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Opnum: 4
The object exporting this interface MUST also implement the IWbemBackupRestoreEx interface.
The IRemUnknown and IRemUnknown2 interfaces, as specified in [MS-DCOM], MUST be used to
manage the interfaces exposed by the object. The object MUST be uniquely identified with CLSID
{C49E32C6-BC8B-11D2-85D4-00105A1F8304}.
On the IWbemBackupRestore::Backup method invocation, the server MUST back up the contents
of the CIM database.
HRESULT Backup(
[in, string] LPCWSTR strBackupToFile,
[in] long lFlags
);
strBackupToFile: MUST be a UTF-16 string, which MUST contain the name of the file to which
the CIM database is backed up. This parameter MUST NOT<20> be NULL.
lFlags: This parameter is not used, and its value MUST be 0x0.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
106 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
In response to the IWbemBackupRestore::Backup method, the server MUST back up the CIM
database in a file that is specified in the strBackupToFile parameter. The server SHOULD<21> verify
that the security principal making the call is allowed to back up the CIM database using
implementation-specific authorization policy. If the security principal is not authorized, the server
MUST return WBEM_E_ACCESS_DENIED.
On the IWbemBackupRestore::Restore method invocation, the server MUST restore the contents
of the CIM database.
HRESULT Restore(
[in, string] LPCWSTR strRestoreFromFile,
[in] long lFlags
);
strRestoreFromFile: MUST be a UTF-16 string that MUST contain the name of the file from
which to restore the CIM database. This parameter MUST NOT<22> be NULL.
lFlags: Flags that affect the behavior of the Restore method. The flags' behavior MUST be
interpreted as specified in the following table.
Value Meaning
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
In response to the IWbemBackupRestore::Restore method, the server MUST restore the CIM
database from the file that is specified in the strRestoreFromFile parameter. The server
SHOULD<23> verify that the security principal making the call is allowed to restore the CIM
database using implementation-specific authorization policy. If the security principal is not
authorized, the server MUST return WBEM_E_ACCESS_DENIED.
107 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The IWbemBackupRestoreEx interface is a DCOM Remote Protocol interface (as specified in [MS-
DCOM]). The interface MUST be uniquely identified by UUID {A359DEC5-E813-4834-8A2A-
BA7F1D777D76}.
Method Description
Pause Causes the server to lock the CIM database in a consistent state while it is copied.
Opnum: 5
Resume Causes the server to unlock the CIM database and resume operations.
Opnum: 6
On the IWbemBackupRestoreEx::Pause method invocation, the server MUST flush the CIM
database in a consistent state and MUST block all the write operations to the CIM database until
IWbemBackupRestoreEx::Resume is called.
HRESULT Pause();
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
In response to the IWbemBackupRestoreEx::Pause method, the server MUST lock the CIM
database until the IWbemBackupRestoreEx::Resume MUST be called or the backup timer (see
section 3.1.5) expires.
On the IWbemBackupRestoreEx::Resume method invocation, the server MUST unlock the CIM
database and resume operations.
HRESULT Resume();
108 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return a WBEM_S_NO_ERROR (specified in section 2.2.11)
to indicate the successful completion of the method.
In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
The IWbemRefreshingServices interface MUST be implemented by the server. This interface (an
[MS-DCOM] interface)<25> provides methods that allow clients to get updates of numerous objects
in a single DCOM Remote Protocol method invocation; whereas the IWbemServices interface
provides methods that allow clients to get updates on a class or an instance.
The IWbemRefreshingServices interface requires multiple calls to set up the remote refresher;
however, after the remote refresher is set up, obtaining updates requires only a single call. The
IWbemRefreshingServices interface provides a faster CIM instance refreshing service when
updated data on CIM instances have to be retrieved multiple times.
Method Description
AddObjectToRefresherByTemplate Adds a CIM instance that is identified by its CIM object instance, to
the list of CIM objects to be refreshed.
Opnum: 4
AddEnumToRefresher Adds all CIM instances of the CIM class name to the list of CIM
objects to be refreshed.
Opnum: 5
109 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT AddObjectToRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in, string] LPCWSTR wszPath,
[in] long lFlags,
[in] IWbemContext* pContext,
[in] DWORD dwClientRefrVersion,
[out] _WBEM_REFRESH_INFO* pInfo,
[out] DWORD* pdwSvrRefrVersion
);
wszPath: MUST be a string that MUST contain the CIM path of the CIM instance. This parameter
MUST NOT be NULL.
lFlags: This parameter is not used, and its value SHOULD be 0x0.
dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD be
0x2.<26> The server MUST allow all client versions.
pdwSvrRefrVersion: MUST be an output parameter that MUST be the version of the server
refresher. The value of this parameter SHOULD be 0x1.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
110 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
In case of failure, the server MUST fill in the _WBEM_REFRESH_INFO structure with 0x0, set its
m_lType member to WBEM_REFRESH_TYPE_INVALID, and return an HRESULT error in the format
that is specified in section 2.2.11.
HRESULT AddObjectToRefresherByTemplate(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in] IWbemClassObject* pTemplate,
[in] long lFlags,
[in] IWbemContext* pContext,
[in] DWORD dwClientRefrVersion,
[out] _WBEM_REFRESH_INFO* pInfo,
[out] DWORD* pdwSvrRefrVersion
);
lFlags: This parameter is not used, and its value SHOULD be 0x0.
dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD be
0x2.<27> The server MUST allow all client versions.
pdwSvrRefrVersion: MUST be an output parameter that MUST be the version of the server
refresher. The value of this parameter SHOULD be 0x1.
111 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
The server MUST return the _WBEM_REFRESH_INFO structure that has an m_lType that is set to
either _WBEM_REFRESH_INFO_REMOTE or _WBEM_REFRESH_TYPE_NON_HIPERF,
depending on implementation-specific criteria.
In case of failure, the server MUST fill in the _WBEM_REFRESH_INFO parameter with 0x0, set its
m_lType member to WBEM_REFRESH_TYPE_INVALID, and return an error in the format that is
specified in section 2.2.11.
HRESULT AddEnumToRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in, string] LPCWSTR wszClass,
[in] long lFlags,
[in] IWbemContext* pContext,
[in] DWORD dwClientRefrVersion,
[out] _WBEM_REFRESH_INFO* pInfo,
[out] DWORD* pdwSvrRefrVersion
);
wszClass: MUST be a string that MUST contain the enumeration CIM class name. This parameter
MUST NOT be NULL.
lFlags: This parameter is not used, and its value SHOULD be 0x0.
112 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD be
0x2.<28> The server MUST allow all client versions.
pdwSvrRefrVersion: MUST be an output parameter, which MUST be the version of the server
refresher. The value of this parameter SHOULD be 0x1.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
This method MUST add all instances of a class, instead of a single instance of a class, as is the case
for the IWbemRefreshingServices::AddObjectToRefresher and
IWbemRefreshingServices::AddObjectToRefresherByTemplate methods.
The server MUST return the _WBEM_REFRESH_INFO structure that has an m_lType that is set to
either _WBEM_REFRESH_INFO_REMOTE or _WBEM_REFRESH_TYPE_NON_HIPERF,
depending on implementation-specific criteria.
In case of failure, the server MUST fill in the _WBEM_REFRESH_INFO structure with 0x0, set
m_lType to WBEM_REFRESH_TYPE_INVALID, and return an error in the format that is specified in
section 2.2.11.
HRESULT RemoveObjectFromRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
113 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
lId: This parameter MUST be an identifier to the object that is being removed. This parameter
MUST NOT be NULL.
lFlags: This parameter is not used, and its value SHOULD be 0x0.
dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD be
0x2.<29> The server MUST allow all client versions.
pdwSvrRefrVersion: MUST be an output parameter, which MUST be the version of the server
refresher. This value SHOULD be 0x1.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. If there are no failures, the server MUST always return
WBEM_E_NOT_AVAILABLE.<30>
WBEM_E_NOT_AVAILABLE (0x80041009)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
In case of failure, the server MUST set pdwSvrRefrVersion to 1 and MUST return an error in the
format specified in section 2.2.11.
HRESULT GetRemoteRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in] long lFlags,
[in] DWORD dwClientRefrVersion,
[out] IWbemRemoteRefresher** ppRemRefresher,
[out] GUID* pGuid,
[out] DWORD* pdwSvrRefrVersion
);
114 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD be
0x2.<31> The server MUST allow all client versions.
pGuid: MUST be an output parameter that MUST be a pointer to a GUID value that MUST identify
the returned refresher object. This parameter MUST NOT be NULL.
pdwSvrRefrVersion: MUST be an output parameter that MUST be the version of the server
refresher. The value of this parameter SHOULD be 0x1.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
HRESULT ReconnectRemoteRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in] long lFlags,
[in] long lNumObjects,
[in] DWORD dwClientRefrVersion,
[in, size_is(lNumObjects)] _WBEM_RECONNECT_INFO* apReconnectInfo,
[in, out, size_is(lNumObjects)]
_WBEM_RECONNECT_RESULTS* apReconnectResults,
115 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
lFlags: This parameter is not used, and its value SHOULD be 0x0.
lNumObjects: MUST be the number of CIM instances that are contained in the apReconnectInfo
array.
dwClientRefrVersion: MUST be the version of the client refresher. This value SHOULD be
0x2.<32> The server MUST allow all client versions.
pdwSvrRefrVersion: MUST be an output parameter that is the version of the server refresher.
This value SHOULD be 0x1.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR, which is specified in section
2.2.11, to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
The security principal that makes the call MUST have WBEM_REMOTE_ENABLE and WBEM_ENABLE
accesses to the namespace; otherwise, WBEM_E_ACCESS_DENIED MUST be returned.
If one of the CIM objects cannot be reconnected, the apReconnectResults element that corresponds
to apReconnectInfo MUST be set with an HRESULT return code.
In case of failure, the server MUST return an HRESULT value that indicates the status of the method
call.
Each array element MUST contain a refresher CIM object identifier (the m_lId member of
_WBEM_RECONNECT_RESULTS) that can be used to cancel the object. The m_lId member MUST be
116 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Method Description
RemoteRefresh Retrieves the updated set of CIM instances and enumerations configured by
an IWbemRefreshingServices interface pointer.
Opnum: 3
Opnum5NotUsedOnWire This method is reserved for local use and is not used remotely.
Opnum: 5
HRESULT RemoteRefresh(
[in] long lFlags,
[out] long* plNumObjects,
[out, size_is(,*plNumObjects)]
WBEM_REFRESHED_OBJECT** paObjects
);
lFlags: This parameter is not used, and its value MUST be 0x0.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call.
The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to indicate the
successful completion of the method.
117 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT StopRefreshing(
[in] long lNumIds,
[in, size_is(lNumIds)] long* aplIds,
[in] long lFlags
);
lNumIds: MUST be the number of identifiers in the array of object identifiers in the aplIds
parameter.
aplIds: MUST be an array of object identifiers that MUST identify the CIM instances and
enumerations to stop refreshing. The object identifier is the m_lCancelId member from the
_WBEM_REFRESH_INFO structure that is specified in section 2.2.20 and MUST be obtained
from a previous call to the IWbemRefreshingServices::AddObjectToRefresher,
IWbemRefreshingServices::AddObjectToRefresherByTemplate, or
IWbemRefreshingServices::AddEnumToRefresher method specified in section 3.1.4.12.
lFlags: This parameter is not used, and its value MUST be 0x0.
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. In case of success, the server MUST return WBEM_S_NO_ERROR (as
specified in section 2.2.11) to indicate the successful completion of the method.
WBEM_S_NO_ERROR (0x00)
118 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
In case of failure the server MUST return an error in the format specified in section 2.2.11.
HRESULT Opnum5NotUsedOnWire(
[in] long lFlags,
[out] GUID* pGuid
);
lFlags: This parameter is not used, and its value MUST be 0x0.
pGuid: MUST be an output parameter, which MUST be a pointer to a GUID value that MUST
identify the server object. This parameter MUST NOT be NULL.<34>
Return Values: This method MUST return an HRESULT value that MUST indicate the status of
the method call. The server MUST return WBEM_S_NO_ERROR (specified in section 2.2.11) to
indicate the successful completion of the method.
In case of failure, the server MUST return an HRESULT whose S (severity) bit is set as
specified in [MS-ERREF] section 2.1. The actual HRESULT value is implementation dependent.
Sink timer: If the timer expires and the call is not completed, the server MUST cancel the
asynchronous operation for which the timer expired.
Backup Timer: If the timer expires, the server MUST resume operations by simulating
IWbemBackupRestoreEx::Resume and MUST reset the timer to 0.
None.
The client MUST maintain association between _WBEM_REFRESHER_ID and the objects refreshed in
respective ID by the server. This information MUST be passed to the server when reconnecting the
refresher.
3.2.2 Timers
None
119 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The client MUST activate the IWbemLevel1Login interface on the machine that is running the
target WMI server by using the CLSID {8BC3F05E-D86B-11D0-A075-00C04FB68820}, as specified
in the DCOM Remote Protocol. The client SHOULD obtain the IWbemLoginClientID interface by
using the IRemUnknown and IRemUnknown2 interfaces, MS-DCOM, on the
IWbemLevel1Login interface. If the server returns an error for the IWbemLoginClientID
interface, the client MUST ignore the error. If the server returns the IWbemLoginClientID
interface, the client SHOULD call the IWbemLoginClientID::SetClientInfo method to set the
client information on the server.
The client SHOULD NOT obtain the IWbemLoginHelper interface from IWbemLevel1Login by
calling the IRemUnknown and IRemUnknown2 interfaces.<35>
If the client has multiple preferred locales or any locale string that does not match the "MS_xxx"
format as the pszPreferredLocale parameter to IWbemLevel1Login::NTLMLogin, the client MUST
determine whether the server supports the locale and filter out unsupported locales before calling
IWbemLevel1Login::NTLMLogin. To determine supported locales, the client MUST call
IWbemLevel1Login::EstablishPosition. If the return value is E_NOTIMPL, the client MUST
choose the first locale that matches the "MS_xxx" format and MUST remove other locales from the
string.
If the client detects that the IWbemClassObject that is returned by the WMI server does not
conform to [MS-WMIO] encoding, as specified in section 2.2.4, the results MUST be ignored and the
requested operation MUST be considered as failed.
The IWbemObjectSink interface is implemented by the WMI client if the WMI client uses
asynchronous method calls as specified in section 3.2.4.2.7. In this case, the WMI client acts as an
IWbemObjectSink server. The WMI server acts as an IWbemObjectSink client. The WMI server
MUST invoke the IWbemObjectSink methods to deliver the results (IWbemClassObjects, if any, and
the status code) of the IWbemServices method for which this IWbemObjectSink is passed as a
response handler, as specified in section 3.1.1.1.3.
Because this interface is implemented by the WMI client and the WMI server and invoked by both,
the server in this section refers to the implementer of this interface, and client refers to the invoker
in a specific scenario.
The IWbemObjectSink interface is implemented by the WMI server and returned to the WMI client in
a ppResponseHandler parameter, if the WMI client calls the IWbemServices::QueryObjectSink
method. In this case, the WMI server acts as an IWbemObjectSink server. The WMI client acts as an
IWbemObjectSink client. The WMI client MUST invoke IWbemObjectSink methods to deliver the
120 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Method Description
SetStatus Called by the client either to indicate the end of an operation or to send status information to
the server.
Opnum: 4
If there are no IWbemClassObject results to be reported, the client MUST NOT call the
IWbemObjectSink::Indicate method.
Otherwise, the client MUST call the IWbemObjectSink::Indicate method one or more times until
the entire IWbemClassObject results are delivered to the server. Each time the
IWbemObjectSink::Indicate method is called, a subset of the result is delivered to the server. For
a specific set of result objects, the client uses implementation-specific criteria to choose the number
and timing of the IWbemObjectSink::Indicate method calls that are used to deliver the result
objects.<36>
Clients that implement the ObjectArray structure MUST call IWbemObjectSink::Indicate by using
DCOM Remote Protocol marshaling for the first time. If a server returns WBEM_S_NEW_STYLE, the
client SHOULD send the remainder of the results by using the ObjectArray structure as specified in
section 2.2.14. If the server does not return WBEM_S_NEW_STYLE, the client MUST send the
remainder of the results in the IWbemObjectSink::Indicate call by using DCOM Remote Protocol
marshaling and MUST NOT use the ObjectArray structure.
The client MUST call the IWbemObjectSink::SetStatus method operation to send the final status
of the IWbemServices method operation by passing WBEM_STATUS_COMPLETE as an lFlags
parameter and the operation return code as an HRESULT parameter. After calling
IWbemObjectSink::SetStatus with final status information, the client MUST release the
IWbemObjectSink interface and MUST NOT call any other methods of IWbemObjectSink.
When the reported operation status is success, the client MUST set the pObjParam parameter to
NULL.
The client MAY call IWbemObjectSink::SetStatus multiple times during the operation execution to
report the operation progress.<37> In this case, lFlags MUST be set to WBEM_STATUS_PROGRESS
and the hResult parameter MUST contain the progress information.
When sending operation progress information, the client MAY call IWbemObjectSink::SetStatus
any time before final status is sent.
If the client wants to send the events to the WMI server, the client MUST call the
IWbemServices::QueryObjectSink method on the IWbemObjectSink interface that is obtained
121 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
3.2.4.2.2 Calling Put Interfaces for CIM Objects with Amended Qualifiers
If the client wants to invoke following WMI methods synchronously, the client MUST NOT set
WBEM_FLAG_RETURN_IMMEDIATELY when making method calls. When the method completes, the
result of the operation is returned as return value. List of methods returning no objects in
synchronous mode are
IWbemServices::PutInstance
IWbemServices::PutClass
IWbemServices::DeleteClass
IWbemServices::DeleteInstance
If the client wants to invoke any of the following WMI methods synchronously, the client MUST NOT
set WBEM_FLAG_RETURN_IMMEDIATELY when making method calls. When the method completes
successfully, the output parameter contains the result object of the operation. The following table
lists the methods and output parameter containing the result object of the operation.
1 IWbemServices::OpenNamespace ppWorkingNamespace
2 IWbemServices::GetObject ppObject
3 IWbemServices::ExecMethod ppOutParams
When the call to the method fails, the output parameter will be NULL.
If the client wants to invoke any of the following WMI methods semi-synchronously, the client MUST
set WBEM_FLAG_RETURN_IMMEDIATELY when it makes the method calls.
When the method returns success, the IWbemCallResult parameter MUST be used to get the
result of the actual semi-synchronous operation. The client MUST call the methods of
IWbemCallResult, as specified in the following table, to obtain the results of the semi-synchronous
operation that is initiated by the client. The client MUST NOT call other methods of
IWbemCallResult except as specified in the following table.
122 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
When the semisynchronous IWbemServices method fails, the output parameter does not have the
IWbemCallResult interface.
If the client wants to invoke any of the following WMI methods semi-synchronously, the client MUST
set WBEM_FLAG_RETURN_IMMEDIATELY when making method. If the client wants to invoke any of
the following methods synchronously, the client MUST NOT set WBEM_FLAG_RETURN_IMMEDIATELY
when making IWbemServices method calls.
IWbemServices::ExecQuery
IWbemServices::CreateInstanceEnum
IWbemServices::CreateClassEnum
IWbemServices::ExecNotificationQuery
When the method execution failed as indicated by return value, the output parameter will not have
IEnumWbemClassObject.
123 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
If the client wants to start the enumerator from the first object, the client MUST call
IEnumWbemClassObject::Reset, if the IWbemServices method that created the
IEnumWbemClassObject is not passed WBEM_FLAG_FORWARD_ONLY flag.
If the client wants to create a new enumerator containing the same result set, the client MUST call
IEnumWbemClassObject::Clone, if the IWbemServices method that created the
IEnumWbemClassObject is not passed WBEM_FLAG_FORWARD_ONLY flag. The client SHOULD
use IEnumWbemClassObject created using IEnumWbemClassObject::Clone as another result
object by calling IEnumWbemClassObject::Next.
If the client wants to get some results of the operation asynchronously, the client MUST call
IEnumWbemClassObject::NextAsync with the uCount, in this case next uCount result objects
are returned in IWbemObjectSink passed as a parameter to
IEnumWbemClassObject::NextAsync.
If the client wants to invoke any of the above asynchronous methods, the client MUST pass an
object implementing IWbemObjectSink interface to the above method calls as a response handler.
124 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
When the IWbemServices method invocation fails, the result of the operation is returned as a
return value of the method.
After the IWbemServices asynchronous method invocation succeeds, if the client wants to cancel
the pending asynchronous operation the client MUST call IWbemServices::CancelAsyncCall
method. If the client calls IWbemServices::CancelAsyncCall, the client MUST pass the
IWbemObjectSink passed to the asynchronous IWbemServices method that is still pending.
If client wants to invoke methods of IWbemBackupRestore interface, the client MUST activate
IWbemBackupRestore interface on the target WMI server machine using CLSID {C49E32C6-
BC8B-11D2-85D4-00105A1F8304} as specified in DCOM remote protocol.
If client wants to invoke methods of IWbemBackupRestoreEx interface, the client MUST activate
IWbemBackupRestoreEx interface on the target WMI server machine using CLSID {C49E32C6-
BC8B-11D2-85D4-00105A1F8304} as specified in DCOM remote protocol. The client may obtain
IWbemBackupRestoreEx by calling IRemUnknown and IRemUnknown2 interfaces, as specified in
[MS-DCOM], on IWbemBackupRestore interface obtained as specified in section 3.1.4.10
The client MUST obtain IWbemRefreshingServices interface, if the client wants to get updates to
the objects in an efficient manner. The client MUST obtain IWbemRefreshingServices interface by
calling IRemUnknown and IRemUnknown2 on IWbemServices interface obtained as specified in
section 3.2.3.
The client MUST generate _WBEM_REFRESHER_ID as specified in section 2.2.21. The client may call
IWbemRefreshingServices::AddObjectToRefresher,
IWbemRefreshingServices::AddObjectToRefresherByTemplate or
IWbemRefreshingServices::AddEnumToRefresher to add multiple objects and enums to the
refresher.
The client MUST pass the _WBEM_REFRESHER_ID that is generated as specified in section 2.2.21 to
the IWbemRefreshingServices::AddObjectToRefresher and
IWbemRefreshingServices::AddObjectToRefresherByTemplate methods.
The client MUST allow all the version numbers that are returned by the server in pdwSvrRefrVersion.
125 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
3.2.4.5.2 IWbemRefreshingServices::AddEnumToRefresher
The client MUST pass the _WBEM_REFRESHER_ID that is generated as specified in section 2.2.21 to
the IWbemRefreshingServices::AddEnumToRefresher method.
The client MUST allow all the version numbers that are returned by the server in pdwSvrRefrVersion.
3.2.4.5.3 IWbemRefreshingServices::GetRemoteRefresher
When invoking the methods of the IWbemRemoteRefresher interface, if the connection is lost
and reported to the client as an RPC disconnect error (see [MS-ERREF]), the client SHOULD try to
reconnect to WMI by obtaining IWbemServices as specified in section 3.2.3 and to obtain the
IWbemRemoteRefresher interface using the IWbemServices interface as specified in section
3.2.4.5, and SHOULD call the IWbemRefreshingServices::GetRemoteRefresher method on this
interface.
126 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
If the GUID is equal to the GUID that is returned in WBEM_REFRESH_INFO_REMOTE when the
remote refresher is first received by calling either
IWbemRefreshingServices::AddEnumToRefresher,
IWbemRefreshingServices::AddObjectToRefresher, or
IWbemRefreshingServices::AddObjectToRefresherByTemplate, the client MUST NOT call
IWbemRefreshingServices::ReconnectRemoteRefresher. The client SHOULD call
IWbemRemoteRefresher::RemoteRefresh on the IWbemRemoteRefresher interface, which is
obtained by using IWbemRefreshingServices::GetRemoteRefresher to refresh the object. The
client MUST NOT call the methods on the IWbemRemoteRefresher interface whose connection is
initially lost.
If the GUID is not equal to the GUID that is returned in WBEM_REFRESH_INFO_REMOTE when the
remote refresher is first received by calling either
IWbemRefreshingServices::AddEnumToRefresher,
IWbemRefreshingServices::AddObjectToRefresher or
IWbemRefreshingServices::AddObjectToRefresherByTemplate, the client MUST call
IWbemRefreshingServices::ReconnectRemoteRefresher to reconnect all the objects to the
refresher. The client MUST NOT call methods on the new remote refresher until
IWbemRefreshingServices::ReconnectRemoteRefresher is executed successfully. The client
MUST NOT call methods on the IWbemRemoteRefresher interface whose connection is lost
initially.
3.2.4.5.4 IWbemRefreshingServices::ReconnectRemoteRefresher
The client MUST allow all the version numbers that are returned by the server in pdwSvrRefrVersion.
When the method executes successfully, the client MUST validate all _WBEM_RECONNECT_RESULTS
to see if any object or enumerator has failed to be added to the refresher.
None.
None.
127 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The protocol is initiated by the DCOM Remote Protocol activation of the CLSID _IWbemLevel1Login.
For a client application to connect to the WMI service on a remote server, the client application first
obtains an IWbemLevel1Login interface pointer to the server on the remote computer by using
the COM activation. The client then uses the DCOM Remote Protocol to obtain an
IWbemLevel1Login interface pointer.
128 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
A synchronous operation completes when the entire result set is ready on the server. The following
sections describe the different scenarios where synchronous operations are applicable.
129 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
In this context of operation, there are two kinds of client behavior and two kinds of server behavior,
depending in the product version, resulting in four cases of client-server interaction.
The product versions that exhibit unoptimized client behavior and unoptimized server behavior are
listed in section 4.2.2.
To make a synchronous operation from a client to a server, the client uses the IWbemServices
interface pointer. The client calls the IWbemServices synchronous methods
130 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The product versions that exhibit unoptimized client behavior and optimized server behavior are
listed in section 4.2.2.
To make a synchronous operation from a client to a server, the client uses the IWbemServices
interface pointer. The client calls the IWbemServices synchronous methods
IWbemServices::CreateInstanceEnum, IWbemServices::CreateClassEnum, and
IWbemServices::ExecQuery. In response to the method executed, the server returns an
IEnumWbemClassObject interface pointer. The client then uses the
IEnumWbemClassObject::Next method to repeatedly retrieve the IWbemClassObject objects
from the query result set.
The call sequence here is the same as that in 4.2.2.1 because in both cases, the client is
unoptimized, and therefore still uses the old mechanism for communication. Sections 4.2.2.3 and
4.2.2.4 explain the call sequences between the newer versions of client and server behavior.
131 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The product versions that exhibit optimized client behavior and optimized server behavior are listed
in section 4.2.2.
To make a synchronous operation from a client to a server, the client uses the IWbemServices
interface pointer. The client calls the IWbemServices synchronous methods
IWbemServices::CreateInstanceEnum, IWbemServices::CreateClassEnum, and
IWbemServices::ExecQuery. In response to the method executed, the server returns an
IEnumWbemClassObject interface pointer. The client uses IRemUnknown and
IRemUnknown2, as specified in [MS-DCOM], to obtain an IWbemFetchSmartEnum interface
pointer from the IEnumWbemClassObject interface pointer. The client then calls the
IWbemFetchSmartEnum::GetSmartEnum method to obtain the IWbemWCOSmartEnum
interface pointer. The client uses the IWbemWCOSmartEnum::Next method repeatedly to
retrieve the IWbemClassObject interface pointers that contains the result set. The results are
encoded as an ObjectArray as specified in section 2.2.14.
132 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The product versions that exhibit optimized client behavior and unoptimized server behavior are
listed in section 4.2.2.
To make a synchronous operation from a client to a server, the client uses the IWbemServices
interface pointer. The client calls the IWbemServices synchronous methods
IWbemServices::CreateInstanceEnum, IWbemServices::CreateClassEnum, and
IWbemServices::ExecQuery. In response to the method executed, the server returns an
IEnumWbemClassObject interface pointer. The client uses IRemUnknown and
133 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
In semisynchronous cases, the call returns before the requested operation completes, and another
interface is used to retrieve the operation results. The returned interface depends on the
IWbemServices methods that are invoked by the client. The following sections describe the two
different behaviors.
134 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The semisynchronous operation uses the same sequence as the synchronous calls, as specified in
section 4.2.2, to request a result set. However, in semisynchronous cases, the
IEnumWbemClassObject interface pointer is returned before the result set is available on the
server. This is different from the synchronous case, in which the interface pointer is returned only
after the result set is available on the server. The IEnumWbemClassObject interface pointer is
returned before the result set is available on the server. When the client calls the
IEnumWbemClassObject::Next method, it specifies a time-out within which the server returns
the requested results. When one of the previous conditions is satisfied, the call completes.
An asynchronous method returns before the requested operation completes. The server continues to
execute the request and delivers the results to the client by using a response handler when the
results are available. A response handler is used to receive the results as they become available.
135 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
To make an asynchronous query, the client uses the IWbemServices interface pointer and it
passes the IWbemObjectSink interface when calling an asynchronous method of the
IWbemServices interface.
If the asynchronous call returns SUCCESS, the server keeps a reference to the IWbemObjectSink
interface pointer. If the server is required to return WMI objects to the client, the server delivers the
results through the IWbemObjectSink::Indicate method.
After the delivery of all objects, the server makes a single call to IWbemObjectSink::SetStatus to
indicate that the operation finished, specifying the final status of the operation. After that, the
server releases the IWbemObjectSink pointer.
136 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
The asynchronous communication is optimized to reduce the network usage by making use of the
ObjectArray structure as specified in section 2.2.14.
A client supporting that capability notifies the server by returning 0x400FF (WBEM_S_NEW_STYLE)
in the first Indicate operation. A server that does not support the ObjectArray structure interprets
this as a success return code, while a server supporting the ObjectArray structure notices the code
and sends the rest of the results by using the ObjectArray structure, as specified in section 2.2.14.
When using the refresher mechanism, a client application that is connected to a remote computer
through an IWbemServices pointer uses the IRemUnknown and IRemUnknown2 interfaces, as
specified in [MS-DCOM], to obtain an IWbemRefreshingServices interface, and it adds CIM
objects or enumerators as needed. The following diagram illustrates this behavior.
137 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
138 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
139 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
For all methods, the server MUST evaluate the authentication level and the security principal rights
to open a CIM namespace, and the server MUST fail the operation if the security requirements are
not met.<42>
The server MUST secure access to each CIM namespace by using standard Microsoft Windows®
security descriptors,<43> as specified in [MS-DTYP]. The access mask that controls the security
principal rights contains the following specific rights, which are interpreted as specified in the table.
WBEM_FULL_WRITE 0x4 Grants the security principal to write to classes and instances.
WBEM_PARTIAL_WRITE_REP 0x8 Grants the security principal to update information in the cache
only.
WBEM_REMOTE_ENABLE 0x20 Grants the security principal to remotely access the server.
In order to change the namespace security descriptor, a client MUST use the Windows Management
Instrumentation Remote Protocol and the required CIM object encoding, as specified in [MS-WMIO].
To query or change the security descriptor, the __SystemSecurity class methods GetSD and SetSD
defined in section 2.2.30 MUST be used. To manage the namespace security, the __SystemSecurity
class MUST be implemented at the top level of every namespace. The GetSD and SetSD methods
are invoked as specified in sections 3.1.4.3.22 and 3.1.4.3.23.
If the event object that is delivered to the WMI server (as specified in 3.2.4.2.1), contains a
SECURITY_DESCRIPTOR as specified in 2.2.4.2, the server MUST secure access to the event object
by using standard Windows security descriptors. The access mask that controls the security principal
rights has the following specific rights, which are interpreted as specified in the following table.
WBEM_RIGHTS_PUBLISH 0x80 Grants the security principal permission to send events to the WMI
server as specified in 3.2.4.2.1.
WBEM_RIGHT_SUBSCRIBE 0x40 Grants the security principal permission to receive the event object
using the IWbemServices::ExecNotificationQuery or
IWbemServices::ExecNotificationQueryAsync method call. If
this permission is not granted, the client can make
IWbemServices::ExecNotificationQuery or
IWbemServices::ExecNotificationQueryAsync calls, but the
140 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
141 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
import "ms-dtyp.idl";
import "ms-oaut.idl";
interface IWbemClassObject;
interface IWbemServices;
interface IWbemObjectSink;
interface IEnumWbemClassObject;
interface IWbemCallResult;
interface IWbemContext;
interface IWbemBackupRestore;
interface IWbemBackupRestoreEx;
interface IWbemLoginClientID;
interface IWbemLevel1Login;
interface IWbemLoginHelper;
[
restricted,
uuid(8BC3F05E-D86B-11d0-A075-00C04FB68820)
]
coclass WbemLevel1Login {
interface IWbemLevel1Login;
};
142 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
[
restricted,
uuid(674B6698-EE92-11d0-AD71-00C04FD8FDFF)
]
coclass WbemContext
{
interface IWbemContext;
};
[
uuid(9A653086-174F-11d2-B5F9-00104B703EFD)
]
coclass WbemClassObject
{
143 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
[
uuid(C49E32C6-BC8B-11d2-85D4-00105A1F8304)
]
coclass WbemBackupRestore
{
interface IWbemBackupRestoreEx;
};
interface IWbemQualifierSet;
[
local,
restricted,
object,
uuid(dc12a681-737f-11cf-884d-00aa004b2e24)
]
interface IWbemClassObject : IUnknown
{
};
interface IWbemServices;
[
object,
restricted,
uuid(7c857801-7381-11cf-884d-00aa004b2e24)
]
interface IWbemObjectSink : IUnknown
{
HRESULT Indicate(
[in] long lObjectCount,
[in, size_is(lObjectCount)]
IWbemClassObject** apObjArray
);
HRESULT SetStatus(
[in] long lFlags,
[in] HRESULT hResult,
[in] BSTR strParam,
[in] IWbemClassObject* pObjParam
);
};
[
object,
restricted,
uuid(027947e1-d731-11ce-a357-000000000001)
]
interface IEnumWbemClassObject : IUnknown
{
HRESULT Reset();
144 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT NextAsync(
[in] ULONG uCount,
[in] IWbemObjectSink* pSink
);
HRESULT Clone(
[out] IEnumWbemClassObject** ppEnum
);
HRESULT Skip(
[in] long lTimeout,
[in] ULONG nCount
);
};
[
object,
restricted,
local,
uuid(44aca674-e8fc-11d0-a07c-00c04fb68820)
]
interface IWbemContext : IUnknown
{
};
[
object,
restricted,
uuid(44aca675-e8fc-11d0-a07c-00c04fb68820)
]
interface IWbemCallResult : IUnknown
{
HRESULT GetResultObject(
[in] long lTimeout,
[out] IWbemClassObject** ppResultObject
);
HRESULT GetResultString(
[in] long lTimeout,
[out] BSTR* pstrResultString
);
HRESULT GetResultService(
[in] long lTimeout,
[out] IWbemServices** ppServices
);
HRESULT GetCallStatus(
[in] long lTimeout,
145 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
[
object,
restricted,
uuid(9556dc99-828c-11cf-a37e-00aa003240c7),
pointer_default(unique)
]
interface IWbemServices : IUnknown
{
HRESULT OpenNamespace(
[in] const BSTR strNamespace,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out, in, unique] IWbemServices** ppWorkingNamespace,
[out, in, unique] IWbemCallResult** ppResult
);
HRESULT CancelAsyncCall(
[in] IWbemObjectSink* pSink
);
HRESULT QueryObjectSink(
[in] long lFlags,
[out] IWbemObjectSink** ppResponseHandler
);
HRESULT GetObject(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out, in, unique] IWbemClassObject** ppObject,
[out, in, unique] IWbemCallResult** ppCallResult
);
HRESULT GetObjectAsync(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT PutClass(
[in] IWbemClassObject* pObject,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out, in, unique] IWbemCallResult** ppCallResult
);
HRESULT PutClassAsync(
[in] IWbemClassObject* pObject,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
146 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT DeleteClassAsync(
[in] const BSTR strClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT CreateClassEnum(
[in] const BSTR strSuperclass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IEnumWbemClassObject** ppEnum
);
HRESULT CreateClassEnumAsync(
[in] const BSTR strSuperclass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT PutInstance(
[in] IWbemClassObject* pInst,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out, in, unique] IWbemCallResult** ppCallResult
);
HRESULT PutInstanceAsync(
[in] IWbemClassObject* pInst,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT DeleteInstance(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out, in, unique] IWbemCallResult** ppCallResult
);
HRESULT DeleteInstanceAsync(
[in] const BSTR strObjectPath,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT CreateInstanceEnum(
[in] const BSTR strSuperClass,
[in] long lFlags,
147 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT CreateInstanceEnumAsync(
[in] const BSTR strSuperClass,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT ExecQuery(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IEnumWbemClassObject** ppEnum
);
HRESULT ExecQueryAsync(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT ExecNotificationQuery(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IEnumWbemClassObject** ppEnum
);
HRESULT ExecNotificationQueryAsync(
[in] const BSTR strQueryLanguage,
[in] const BSTR strQuery,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemObjectSink* pResponseHandler
);
HRESULT ExecMethod(
[in] const BSTR strObjectPath,
[in] const BSTR strMethodName,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemClassObject* pInParams,
[out, in, unique] IWbemClassObject** ppOutParams,
[out, in, unique] IWbemCallResult** ppCallResult
);
HRESULT ExecMethodAsync(
[in] const BSTR strObjectPath,
[in] const BSTR strMethodName,
[in] long lFlags,
[in] IWbemContext* pCtx,
[in] IWbemClassObject* pInParams,
148 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
[
object,
restricted,
uuid(C49E32C7-BC8B-11d2-85D4-00105A1F8304)
]
interface IWbemBackupRestore : IUnknown
{
HRESULT Backup(
[in, string] LPCWSTR strBackupToFile,
[in] long lFlags
);
HRESULT Restore(
[in, string] LPCWSTR strRestoreFromFile,
[in] long lFlags
);
};
[
object,
restricted,
uuid(A359DEC5-E813-4834-8A2A-BA7F1D777D76)
]
interface IWbemBackupRestoreEx : IWbemBackupRestore
{
HRESULT Pause();
HRESULT Resume();
};
[
restricted,
uuid(F1E9C5B2-F59B-11d2-B362-00105A1F8177)
]
interface IWbemRemoteRefresher : IUnknown {
HRESULT RemoteRefresh(
[in] long lFlags,
149 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT StopRefreshing(
[in] long lNumIds,
[in, size_is(lNumIds)] long* aplIds,
[in] long lFlags
);
HRESULT Opnum5NotUsedOnWire(
[in] long lFlags,
[out] GUID* pGuid
);
};
typedef struct {
IWbemRemoteRefresher* m_pRefresher;
IWbemClassObject* m_pTemplate;
GUID m_Guid;
} _WBEM_REFRESH_INFO_REMOTE;
typedef struct {
[string] wchar_t* m_wszNamespace;
IWbemClassObject* m_pTemplate;
} _WBEM_REFRESH_INFO_NON_HIPERF;
typedef enum
{
WBEM_REFRESH_TYPE_INVALID = 0,
WBEM_REFRESH_TYPE_REMOTE = 3,
WBEM_REFRESH_TYPE_NON_HIPERF = 6
}WBEM_REFRESH_TYPE;
[case (WBEM_REFRESH_TYPE_NON_HIPERF)]
_WBEM_REFRESH_INFO_NON_HIPERF m_NonHiPerf;
[case (WBEM_REFRESH_TYPE_INVALID)]
HRESULT m_hres;
} WBEM_REFRESH_INFO_UNION;
typedef struct {
long m_lType;
[switch_is(m_lType)] WBEM_REFRESH_INFO_UNION m_Info;
long m_lCancelId;
} _WBEM_REFRESH_INFO;
typedef struct {
[string] LPSTR m_szMachineName;
DWORD m_dwProcessId;
GUID m_guidRefresherId;
} _WBEM_REFRESHER_ID;
150 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
typedef struct {
long m_lType;
[string] LPCWSTR m_pwcsPath;
} _WBEM_RECONNECT_INFO;
typedef struct {
long m_lId;
HRESULT m_hr;
} _WBEM_RECONNECT_RESULTS;
[
restricted,
uuid(2C9273E0-1DC3-11d3-B364-00105A1F8177)
]
interface IWbemRefreshingServices : IUnknown
{
HRESULT AddObjectToRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in, string] LPCWSTR wszPath,
[in] long lFlags,
[in] IWbemContext* pContext,
[in] DWORD dwClientRefrVersion,
[out] _WBEM_REFRESH_INFO* pInfo,
[out] DWORD* pdwSvrRefrVersion
);
HRESULT AddObjectToRefresherByTemplate(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in] IWbemClassObject* pTemplate,
[in] long lFlags,
[in] IWbemContext* pContext,
[in] DWORD dwClientRefrVersion,
[out] _WBEM_REFRESH_INFO* pInfo,
[out] DWORD* pdwSvrRefrVersion
);
HRESULT AddEnumToRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in, string] LPCWSTR wszClass,
[in] long lFlags,
[in] IWbemContext* pContext,
[in] DWORD dwClientRefrVersion,
[out] _WBEM_REFRESH_INFO* pInfo,
[out] DWORD* pdwSvrRefrVersion
);
HRESULT RemoveObjectFromRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in] long lId,
[in] long lFlags,
[in] DWORD dwClientRefrVersion,
[out] DWORD* pdwSvrRefrVersion
151 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
HRESULT GetRemoteRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in] long lFlags,
[in] DWORD dwClientRefrVersion,
[out] IWbemRemoteRefresher** ppRemRefresher,
[out] GUID* pGuid,
[out] DWORD* pdwSvrRefrVersion
);
HRESULT ReconnectRemoteRefresher(
[in] _WBEM_REFRESHER_ID* pRefresherId,
[in] long lFlags,
[in] long lNumObjects,
[in] DWORD dwClientRefrVersion,
[in, size_is(lNumObjects)]
_WBEM_RECONNECT_INFO* apReconnectInfo,
[in, out, size_is(lNumObjects)]
_WBEM_RECONNECT_RESULTS* apReconnectResults,
[out] DWORD* pdwSvrRefrVersion
);
};
[
restricted,
object,
uuid(423EC01E-2E35-11d2-B604-00104B703EFD)
]
interface IWbemWCOSmartEnum : IUnknown
{
HRESULT Next(
[in] REFGUID proxyGUID,
[in] long lTimeout,
[in] ULONG uCount,
[out] ULONG* puReturned,
[out] ULONG* pdwBuffSize,
[out, size_is(,*pdwBuffSize)] byte** pBuffer
);
};
[
restricted,
object,
uuid(1C1C45EE-4395-11d2-B60B-00104B703EFD)
]
interface IWbemFetchSmartEnum : IUnknown
{
HRESULT GetSmartEnum(
[out] IWbemWCOSmartEnum** ppSmartEnum
);
};
[
restricted,
object,
uuid(d4781cd6-e5d3-44df-ad94-930efe48a887)
]
152 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
[
object,
restricted,
uuid(F309AD18-D86A-11d0-A075-00C04FB68820),
pointer_default(unique)
]
interface IWbemLevel1Login : IUnknown
{
HRESULT EstablishPosition(
[in, unique, string] wchar_t* reserved1,
[in] DWORD reserved2,
[out] DWORD* reserved3
);
HRESULT RequestChallenge(
[in, unique, string] wchar_t* reserved1,
[in, unique, string] wchar_t* reserved2,
[out, size_is(16), length_is(16)] unsigned char* reserved3
);
HRESULT WBEMLogin(
[in, unique, string] wchar_t* reserved1,
[in, size_is(16), length_is(16), unique]
unsigned char* reserved2,
[in] long reserved3,
[in] IWbemContext* reserved4,
[out] IWbemServices** reserved5
);
HRESULT NTLMLogin(
[in, unique, string] LPWSTR wszNetworkResource,
[in, unique, string] LPWSTR wszPreferredLocale,
[in] long lFlags,
[in] IWbemContext* pCtx,
[out] IWbemServices** ppNamespace
);
};
[
restricted,
object,
uuid(541679AB-2E5F-11d3-B34E-00104BCC4B4A)
]
interface IWbemLoginHelper : IUnknown
{
HRESULT SetEvent(
[in] LPCSTR sEventToSet
);
153 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
154 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
This specification also covers Microsoft Windows NT® Server operating system behavior when it
interacts with WMI clients in one of the previously listed versions of Microsoft Windows®.
Exceptions, if any, are noted below. If a service pack number appears with the product version,
behavior changed in that service pack. The new behavior also applies to subsequent service packs of
the product unless otherwise specified.
Unless otherwise specified, any statement of optional behavior in this specification prescribed using
the terms SHOULD or SHOULD NOT implies Windows behavior in accordance with the SHOULD or
SHOULD NOT prescription. Unless otherwise specified, the term MAY implies that Windows does not
follow the prescription.
<1> Section 2.2.6: The prefix "__" is specific to Windows and is not a CIM standard.
<2> Section 2.2.13: A Windows client builds the IWbemContext object by using a set of specific
IWbemContext methods to add, delete, and enumerate properties with their respective values.
The IWbemContext methods are not used by the protocol at any time. They are used internally by
the client and the server to manage the content of the object.
<3> Section 2.2.13.4: 32-bit versions of Windows set the value to 4; however, 64-bit versions of
Windows set the value to 8.
<4> Section 2.2.13.4: 32-bit versions of Windows set the value to 4; however, 64-bit versions of
Windows set the value to 8.
<5> Section 2.2.14: This optimization technique is being used by Windows starting with
Windows XP and Windows Server 2003.
<7> Section 2.2.21: Windows uses the m_dwProcessId as the process identifier.
155 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
<9> Section 3.1.1.1.3: Windows tries to make the call at the highest authentication level,
RPC_C_AUTHN_PKT_PRIVACY. Windows gradually downgrades (decreasing the authentication level
by one level at every call) to RPC_C_AUTHN_NONE if the DCOM Remote Protocol (as specified in
[MS-DCOM]) is unable to use the current authentication level.
<10> Section 3.1.4.1.1: LocaleVersion is supported in Windows 7 and Windows Server 2008 R2
only. For Windows 2000, Windows XP, Windows Server 2003, Windows Server 2003 SP2,
Windows Vista, and Windows Server 2008, this parameter MUST be set to 0 when sent and MUST be
ignored on receipt.
<13> Section 3.1.4.1.4: Windows 2000, Windows XP, Windows Server 2003, Windows Vista, and
Windows Server 2008 fail the call if the locale name does not match one of the WMI locale formats,
as defined in WMI Locale Formats section 2.2.29, or if the locale name is not valid for that operating
system.
If the locale is in "MS_xxx" format as defined in 2.2.29 and the LCID is not valid for Windows 7,
Windows 7 fails the call. If the locale string is not in "MS_xxx" format and it is not a valid locale for
Windows 7, the locale is ignored.
<14> Section 3.1.4.1.4: Windows–based clients always set lFlags to zero. The server role of
Windows 2000 returns WBEM_E_INVALID_PARAMETER for a nonzero value of lFlags. The server
roles of Windows XP, Windows Vista, Windows Server 2003, and Windows Server 2008 allow lFlags
to be zero or any combination of the flags WBEM_FLAG_CONNECT_PROVIDERS and
WBEM_FLAG_CONNECT_REPOSITORY_ONLY.
<15> Section 3.1.4.1.4: Windows uses the system's locale as described in [MSDN-
GetSystemDefaultLangID].
<16> Section 3.1.4.2.1: The optimized asynchronous delivery is supported by Windows XP,
Windows Server 2003, Windows Server 2008, Windows 7, and Windows Server 2008 R2.
<17> Section 3.1.4.3.6: Windows does not ignore the amended qualifiers while it creates a CIM
class; however, it does ignore all the amended qualifiers while it updates a class. Because the
amended qualifiers are not ignored while Windows creates a CIM class, when this CIM class is
retrieved by using IWbemServices::GetObject or IWbemServices::GetObjectAsync (retrieved
even without using the WBEM_FLAG_USE_AMENDED_QUALIFIERS flag), the returned class contains
amended qualifiers.
<18> Section 3.1.4.3.7: Windows does not ignore the amended qualifiers while it creates a CIM
class; however, it does ignore all the amended qualifiers while it updates a class. Because the
amended qualifiers are not ignored while Windows creates a CIM class, when this CIM class is
retrieved by using IWbemServices::GetObject or IWbemServices::GetObjectAsync (retrieved
even without using the WBEM_FLAG_USE_AMENDED_QUALIFIERS flag), the returned class contains
amended qualifiers.
<19> Section 3.1.4.9.1: A WMI server in Windows 2000 and Windows XP signals a Windows kernel
event with the specified name. The valid values for the sEventToSet parameter of
IWbemLoginHelper::SetEvent are all the valid values for the lpName parameter to the
OpenEvent function, as defined in [MSDN-OpenEvent]. If the client can detect that the event is set
at the end of the IWbemLoginHelper::SetEvent method call, the client identifies that the server is
running in the same server. If the client and server are running on different machines, the Windows
156 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
<20> Section 3.1.4.10.1: Windows Server requires an absolute file path that starts with a drive
letter.
<21> Section 3.1.4.10.1: Windows allows users that have the SE_BACKUP_PRIVILEGE privilege to
perform the backup operation.
<22> Section 3.1.4.10.2: Windows Server requires an absolute file path that starts with a drive
letter.
<23> Section 3.1.4.10.2: Windows allows users that have the SE_RESTORE_PRIVILEGE privilege to
perform the restore operation.
<25> Section 3.1.4.12: The IWbemRefreshingServices interface is available only in Windows XP,
Windows Server 2003, Windows Server 2008, Windows 7, and Windows Server 2008 R2.
<26> Section 3.1.4.12.1: Windows 2000 sets the version number to 1. Windows XP, Windows
Server 2003, Windows Vista, Windows Server 2008, and Windows 7 set the version number to 2.
<27> Section 3.1.4.12.2: Windows 2000 sets the version number to 1. Windows XP, Windows
Server 2003, Windows Vista, Windows Server 2008, and Windows 7 set the version number to 2.
<28> Section 3.1.4.12.3: Windows 2000 sets the version number to 1. Windows XP, Windows
Server 2003, Windows Vista, Windows Server 2008, and Windows 7 set the version number to 2.
<29> Section 3.1.4.12.4: Windows 2000 sets the version number to 1. Windows XP, Windows
Server 2003, Windows Vista, Windows Server 2008, and Windows 7 set the version number to 2.
<30> Section 3.1.4.12.4: Windows does not implement this method and returns a
WBEM_E_NOT_AVAILABLE error code.
<31> Section 3.1.4.12.5: Windows 2000 sets the version number to 1. Windows XP, Windows
Server 2003, Windows Vista, Windows Server 2008, and Windows 7 set the version number to 2.
<32> Section 3.1.4.12.6: Windows 2000 sets the version number to 1. Windows XP, Windows
Server 2003, Windows Vista, Windows Server 2008, and Windows 7 set the version number to 2.
<33> Section 3.1.4.13: The IWbemRemoteRefresher interface is available only on Windows XP,
Windows Server 2003, and Windows Server 2008.
<34> Section 3.1.4.13.3: The Opnum5NotUsedOnWire method is not used by Windows and
therefore is not required for an implementation.
<35> Section 3.2.3: Windows 2000 and Windows XP clients obtain the IWbemLoginHelper
interface by using the IRemUnknown and IRemUnknown2 interfaces, as specified in [MS-DCOM]
sections 3.2.1.5.6 and 3.2.1.5.7, on the IWbemLevel1Login interface.
If the server returns an error during the attempt to use IRemUnknown and IRemUnknown2 to
obtain an IWbemLoginHelper interface, the client ignores the error. The client calls
IWbemLoginHelper::SetEvent to determine whether both the client and server are running on
the same machine.
157 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
<36> Section 3.2.4.1.1: Windows attempts to batch object delivery. The algorithm is complex;
however, the maximum batch size, in bytes, can be set by editing the registry value for
FinalizerBatchSize under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wbem\CIMOM registry
subkey. If FinalizerBatchSize is not specified, the default value, 262144 (0x40000), is used.
<38> Section 4.2.2: In this context, Unoptimized Client behavior is client behavior under
Windows 2000 and Windows 2000 Server.
<39> Section 4.2.2: In this context, Optimized Client behavior is client behavior under Windows XP,
including Windows XP 64-Bit Edition, Windows XP SP1, and Windows XP SP3; and under Windows
Server 2003, Windows Server 2003 SP2, Windows Vista, Windows Server 2008, Windows 7, and
Windows Server 2008 R2.
<40> Section 4.2.2: In this context, Unoptimized Server behavior is server behavior under
Windows 2000 and Windows 2000 Server.
<41> Section 4.2.2: Optimized server behavior in this context is server behavior under
Windows XP, including Windows XP 64-Bit Edition, Windows XP SP1, and Windows XP SP3; and
under Windows Server 2003, Windows Server 2003 SP2, Windows Vista, Windows Server 2008,
Windows 7, and Windows Server 2008 R2.
<42> Section 5.1: Windows secures the access to each namespace and accepts only authenticated
calls made at least at the RPC_C_AUTHN_LEVEL_CONNECT level. Windows behavior across different
operating systems is specified in the following table.
Windows NT RPC_C_AUTHN_LEVEL_CONNECT
Windows XP RPC_C_AUTHN_LEVEL_PKT
<43> Section 5.2: In Windows, local administrators are implicitly granted all rights that are
specified in the table in section 5.2.
158 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Major changes affect protocol interoperability or implementation. Examples of major changes are:
Minor changes do not affect protocol interoperability or implementation. Examples are updates to
fix technical accuracy or ambiguity at the sentence, paragraph, or table level.
Major and minor changes can be described further using the following revision types:
Content update.
Content removed.
159 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
Some important terms used in revision type descriptions are defined as follows:
Protocol syntax refers to data elements (such as packets, structures, enumerations, and methods)
as well as interfaces.
Protocol revision refers to changes made to a protocol that affect the bits that are sent over the
wire.
Changes are listed in the following table. If you need further information, please contact
[email protected].
Major
chang
Tracking number (if e
applicable) (Y or Revisio
Section and description N) n Type
160 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
"0".
161 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
162 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
parameter.
163 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
164 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
6 39356 N Content
Appendix A: Full IDL Changed "strFilter" to update.
"strSuperClass".
N Editoriall
y
updated.
165 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
B G
E M
166 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
P T
R W
167 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification
168 / 168
[MS-WMI] — v20091104
Windows Management Instrumentation Remote Protocol Specification