Export (0) Print
Expand All

IWbemObjectAccess interface

The IWbemObjectAccess interface provides access to the methods and properties of an object. An IWbemObjectAccess object is a container for an instance updated by a refresher. With the IWbemObjectAccess interface, you can get and set properties by using property handles instead of object property names.

Note  This interface is not implemented by client applications or providers under any circumstances. The implementation provided by WMI is the only one that is supported. A pointer to the interface can be retrieved by calling IWbemClassObject::QueryInterface.

Members

The IWbemObjectAccess interface inherits from the IUnknown interface. IWbemObjectAccess also has these types of members:

Methods

The IWbemObjectAccess interface has these methods.

MethodDescription
GetPropertyHandle

Returns a unique handle that identifies a property. You can use this handle to identify properties when using IWbemObjectAccess methods to read or write property values.

GetPropertyInfoByHandle

Returns the name and data type of the property that is associated with a property handle.

Lock

Prevents other processes from updating an IWbemObjectAccess object until it is unlocked.

ReadDWORD

Reads 32 bits of property data.

ReadPropertyValue

Reads a specified number of bytes of property data.

ReadQWORD

Reads 64 bits of property data.

Unlock

Allows other processes to update the property values of an IWbemObjectAccess object.

WriteDWORD

Writes 32 bits of property data.

WritePropertyValue

Writes a specified number of bytes of property data.

WriteQWORD

Writes 64 bits of property data.

 

Remarks

The IWbemObjectAccess methods that read and write data perform very little data validation. Because IWbemObjectAccess methods directly access properties, you can get and set properties much more rapidly than you can using standard object access techniques such as IWbemClassObject::Get and IWbemClassObject::Put.

Note  To maximize its speed, IWbemObjectAccess is completely unchecked. It is the responsibility of the user to ensure that all handles are proper, and that write buffers are correctly sized. Read and write operations are not intrinsically thread-safe. You should call the IWbemObjectAccess::Lock and IWbemObjectAccess::Unlock methods to prevent IWbemObjectAccess objects from concurrent access on multiple threads.

Property handles are the same for all instances of a class. Therefore, it is only necessary to retrieve a handle one time.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

DLL

Esscli.dll;
Fastprox.dll;
Wbemess.dll

See also

COM API for WMI
Accessing Performance Data in C++
Accessing WMI Preinstalled Performance Classes
IWbemRefresher

 

 

Show:
© 2014 Microsoft