Export (0) Print
Expand All

WbemFlagEnum

The WbemFlagEnum enumeration defines constants that are used by SWbemServices.ExecQuery, SWbemServices.ExecQueryAsync, SWbemServices.SubclassesOf, and SWbemServices.InstancesOf.

The WMI scripting type library, wbemdisp.tlb, defines these constants. Visual Basic applications can access this library; script languages must use the value of the constant directly, unless they use the Windows Script Host (WSH) XML file format. For more information, see Using the WMI Scripting Type Library.

Constant/valueDescription
wbemFlagReturnImmediately
16 (0x10)

Causes the call to return immediately.

wbemFlagReturnWhenComplete
0 (0x0)

Causes this call to block until the call has completed.

wbemFlagBidirectional
0 (0x0)

Causes WMI to retain pointers to objects of the enumeration until the client releases the enumerator.

wbemFlagForwardOnly
32 (0x20)

Causes a forward-only enumerator to be returned. Use this flag in combination with wbemFlagReturnImmediately to request semisynchronous access. For more information, see Calling a Method.

You can only iterate (as in a VBScript For Each statement) through a forward-only enumerator one time. The memory containing the instances is released by WMI so that the enumerator cannot be rewound. Therefore, the SWbemObjectSet.Count method cannot be used since it requires rewinding the enumerator.

Forward-only enumerators are generally much faster and use less memory than conventional enumerators, but they do not allow calls to SWbemObject.Clone.

wbemFlagNoErrorObject
64 (0x40)

This flag must not be set, and must be ignored on receipt.

wbemFlagReturnErrorObject
0 (0x0)

Causes asynchronous calls to return an error object in the event of an error.

wbemFlagSendStatus
128 (0x80)

Causes asynchronous calls to send status updates to the SWbemSink.OnProgress event handler for your object sink.

wbemFlagDontSendStatus
0 (0x0)

Prevents asynchronous calls from sending status updates to the SWbemSink.OnProgress event handler for your object sink.

wbemFlagUseAmendedQualifiers
131072 (0x20000)

Causes WMI to return class amendment data along with the base class definition. For more information about amended qualifiers, see Localizing WMI Class Information.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wbemdisp.h

IDL

Wbemdisp.idl

See also

Scripting API Constants
Making a Semisynchronous Call with VBScript
Calling a Method

 

 

Show:
© 2014 Microsoft