Skip to main content

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.

16 (0x10)

Causes the call to return immediately.

0 (0x0)

Causes this call to block until the call has completed.

0 (0x0)

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

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.

64 (0x40)

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

0 (0x0)

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

128 (0x80)

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

0 (0x0)

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

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.


Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008





See also

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