Skip to content

Latest commit

 

History

History
158 lines (103 loc) · 6.71 KB

nf-wbemcli-iwbemservices-createinstanceenum.md

File metadata and controls

158 lines (103 loc) · 6.71 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wbemcli.IWbemServices.CreateInstanceEnum
IWbemServices::CreateInstanceEnum (wbemcli.h)
The IWbemServices::CreateInstanceEnum method creates an enumerator that returns the instances of a specified class according to user-specified selection criteria.
CreateInstanceEnum
CreateInstanceEnum method [Windows Management Instrumentation]
CreateInstanceEnum method [Windows Management Instrumentation]
IWbemServices interface
IWbemServices interface [Windows Management Instrumentation]
CreateInstanceEnum method
IWbemServices.CreateInstanceEnum
IWbemServices::CreateInstanceEnum
WBEM_FLAG_BIDIRECTIONAL
WBEM_FLAG_DEEP
WBEM_FLAG_DIRECT_READ
WBEM_FLAG_FORWARD_ONLY
WBEM_FLAG_RETURN_IMMEDIATELY
WBEM_FLAG_SHALLOW
WBEM_FLAG_USE_AMENDED_QUALIFIERS
_hmm_iwbemservices_createinstanceenum
wbemcli/IWbemServices::CreateInstanceEnum
wmi.iwbemservices_createinstanceenum
wmi\iwbemservices_createinstanceenum.htm
wmi
47671b9b-a2ff-4375-b2a4-7e8599f1fb69
12/05/2018
CreateInstanceEnum, CreateInstanceEnum method [Windows Management Instrumentation], CreateInstanceEnum method [Windows Management Instrumentation],IWbemServices interface, IWbemServices interface [Windows Management Instrumentation],CreateInstanceEnum method, IWbemServices.CreateInstanceEnum, IWbemServices::CreateInstanceEnum, WBEM_FLAG_BIDIRECTIONAL, WBEM_FLAG_DEEP, WBEM_FLAG_DIRECT_READ, WBEM_FLAG_FORWARD_ONLY, WBEM_FLAG_RETURN_IMMEDIATELY, WBEM_FLAG_SHALLOW, WBEM_FLAG_USE_AMENDED_QUALIFIERS, _hmm_iwbemservices_createinstanceenum, wbemcli/IWbemServices::CreateInstanceEnum, wmi.iwbemservices_createinstanceenum
wbemcli.h
Wbemidl.h
Windows
Windows Vista
Windows Server 2008
Wbemuuid.lib
Fastprox.dll; Esscli.dll; FrameDyn.dll; FrameDynOS.dll; Ntevt.dll; Stdprov.dll; Viewprov.dll; Wbemcomn.dll; Wbemcore.dll; Wbemess.dll; Wbemsvc.dll; Wmipicmp.dll; Wmidcprv.dll; Wmipjobj.dll; Wmiprvsd.dll
Windows
19H1
IWbemServices::CreateInstanceEnum
wbemcli/IWbemServices::CreateInstanceEnum
c++
APIRef
kbSyntax
COM
Fastprox.dll
Esscli.dll
FrameDyn.dll
FrameDynOS.dll
Ntevt.dll
Stdprov.dll
Viewprov.dll
Wbemcomn.dll
Wbemcore.dll
Wbemess.dll
Wbemsvc.dll
Wmipicmp.dll
Wmidcprv.dll
Wmipjobj.dll
Wmiprvsd.dll
IWbemServices.CreateInstanceEnum

IWbemServices::CreateInstanceEnum

-description

The IWbemServices::CreateInstanceEnum method creates an enumerator that returns the instances of a specified class according to user-specified selection criteria. This method supports simple WQL queries; more complex queries can be processed using the IWbemServices::ExecQuery method.

-parameters

-param strFilter [in]

Valid BSTR containing the name of the class for which instances are desired. This parameter cannot be NULL.

-param lFlags [in]

The following flags affect the behavior of this method. The suggested value for this parameter is WBEM_FLAG_RETURN_IMMEDIATELY and WBEM_FLAG_FORWARD_ONLY for best performance.

WBEM_FLAG_USE_AMENDED_QUALIFIERS

If this flag is set, WMI retrieves the amended qualifiers stored in the localized namespace of the current connection's locale. If not set, only the qualifiers stored in the immediate namespace are retrieved.

WBEM_FLAG_DEEP

This flag forces the enumeration to include this and all subclasses in the hierarchy.

WBEM_FLAG_SHALLOW

This flag forces the enumeration to include only pure instances of this class, excluding all instances of subclasses which supply properties not found in this class.

WBEM_FLAG_RETURN_IMMEDIATELY

This flag causes this to be a semisynchronous call. For more information, see Calling a Method.

WBEM_FLAG_FORWARD_ONLY

This flag causes a forward-only enumerator to be returned. Forward-only enumerators are generally much faster and use less memory than conventional enumerators but do not allow calls to Clone or Reset.

WBEM_FLAG_BIDIRECTIONAL

This flag causes Windows Management to retain pointers to objects of the enumeration until the client releases the enumerator. Because object pointers are not released immediately, this method may fail with a hResult of WBEM_E_OUT_OF_MEMORY if the client attempts to enumerate a large number of objects. This flag is implied by default if you set the lFlags parameter to 0 (zero).

WBEM_FLAG_DIRECT_READ

This flag causes direct access to the provider for the class specified without any regard to its parent class or subclasses.

-param pCtx [in]

Typically NULL. Otherwise, this is a pointer to an IWbemContext object that may be used by the provider that is providing the requested instances. The values in the context object must be specified in the documentation for the provider in question. For more information about this parameter, see Making Calls to WMI.

-param ppEnum [out]

Receives the pointer to the enumerator, which has a positive reference count. The caller must call IUnknown::Release on the pointer after it is no longer required.

-returns

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT.

On failure, you can obtain any available information from the COM function GetErrorInfo.

COM-specific error codes also may be returned if network problems cause you to lose the remote connection to Windows Management.

-remarks

It is not an error for the returned enumerator to have zero elements.

-see-also

IWbemServices

IWbemServices::CreateInstanceEnumAsync

Retrieving an Error Code