IWbemServices class com

Used by clients and providers to access WMI services.

The interface is implemented by WMI and WMI providers, and is the primary WMI interface.

To learn more, see learn.microsoft.com/windows/win32/api/wbemcli/nn-wbemcli-iwbemservices.

Inheritance
Implemented types

Constructors

IWbemServices(VTablePointer ptr)
Creates a new instance of IWbemServices from a VTablePointer.
IWbemServices.from(IUnknown interface)
Creates a new instance of IWbemServices from an existing interface.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
ptr VTablePointer
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRef() int
Increments the reference count of this COM object.
inherited
cancelAsyncCall(IWbemObjectSink? pSink) → void
Cancels any currently pending asynchronous calls based on the IWbemObjectSink pointer, which was originally passed to the asynchronous method.
createClassEnum(BSTR strSuperclass, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx) IEnumWbemClassObject?
Returns an enumerator for all classes that satisfy selection criteria.
createClassEnumAsync(BSTR strSuperclass, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Returns an enumeration of all classes that the class provider supports.
createInstanceEnum(BSTR strFilter, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx) IEnumWbemClassObject?
Creates an enumerator that returns the instances of a specified class according to user-specified selection criteria.
createInstanceEnumAsync(BSTR strFilter, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Creates an enumerator that asynchronously returns the instances of a specified class according to user-specified selection criteria.
deleteClass(BSTR strClass, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, Pointer<VTablePointer>? ppCallResult) → void
Deletes the specified class from the current namespace.
deleteClassAsync(BSTR strClass, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Deletes the specified class from the current namespace.
deleteInstance(BSTR strObjectPath, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, Pointer<VTablePointer>? ppCallResult) → void
Deletes an instance of an existing class in the current namespace.
deleteInstanceAsync(BSTR strObjectPath, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Asynchronously deletes an instance of an existing class in the current namespace.
execMethod(BSTR strObjectPath, BSTR strMethodName, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemClassObject? pInParams, Pointer<VTablePointer>? ppOutParams, Pointer<VTablePointer>? ppCallResult) → void
Executes a method exported by a CIM object.
execMethodAsync(BSTR strObjectPath, BSTR strMethodName, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemClassObject? pInParams, IWbemObjectSink? pResponseHandler) → void
Asynchronously executes a method exported by a CIM object.
execNotificationQuery(BSTR strQueryLanguage, BSTR strQuery, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx) IEnumWbemClassObject?
Executes a query to receive events.
execNotificationQueryAsync(BSTR strQueryLanguage, BSTR strQuery, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Performs the same task as IWbemServices.execNotificationQuery except that events are supplied to the specified response handler until CancelAsyncCall is called to stop the event notification.
execQuery(BSTR strQueryLanguage, BSTR strQuery, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx) IEnumWbemClassObject?
Executes a query to retrieve objects.
execQueryAsync(BSTR strQueryLanguage, BSTR strQuery, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Executes a query to retrieve objects asynchronously.
getObject(BSTR strObjectPath, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, Pointer<VTablePointer>? ppObject, Pointer<VTablePointer>? ppCallResult) → void
Retrieves a class or instance.
getObjectAsync(BSTR strObjectPath, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Retrieves an object, either a class definition or instance, based on its path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openNamespace(BSTR strNamespace, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, Pointer<VTablePointer>? ppWorkingNamespace, Pointer<VTablePointer>? ppResult) → void
Provides the caller with a new IWbemServices pointer that has the specified child namespace as its operating context.
putClass(IWbemClassObject? pObject, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, Pointer<VTablePointer>? ppCallResult) → void
Creates a new class or updates an existing one.
putClassAsync(IWbemClassObject? pObject, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Creates a new class, or updates an existing one.
putInstance(IWbemClassObject? pInst, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, Pointer<VTablePointer>? ppCallResult) → void
Creates or updates an instance of an existing class.
putInstanceAsync(IWbemClassObject? pInst, WBEM_GENERIC_FLAG_TYPE lFlags, IWbemContext? pCtx, IWbemObjectSink? pResponseHandler) → void
Asynchronously creates or updates an instance of an existing class.
queryInterface<T extends IUnknown>() → T
Queries this COM object for a specific interface defined by the type parameter T.
inherited
queryObjectSink(WBEM_GENERIC_FLAG_TYPE lFlags) IWbemObjectSink?
Allows the caller to obtain a notification handler that is exported by Windows Management.
release() int
Decrements the reference count of this COM object.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited