Re: Inconsistent WMI results using multiple asynchronous queries

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi,

Do you get the same problem with a synchronous query?

I've noticed some strange things with WMI depending on the flags you set whereby some types of query (e.g. semi-synchronous) will silently fail; you get a bunch of instances but some are missing, no error, but then change the flags and set to synchronous and you either get them all or you get an error.

Can you reproduce the error?
Can you reproduce it using scripting (not C++)

If so, post the code and we can test it.

Brian wrote:
I wrote a utility in c++ that performs asynchronous WMI queries for
multiple classes on a local machine. It works fine most of the time.
However, sometimes the results for one or more classes are missing no
matter how long I wait for the return.

Following is a pseudo code excerpt of what I'm currently trying to
do:

Initialize COM parameters with a call to CoInitializeEx
IniIitialize COM process security
Connect to the local root\cimv2 namespace and make IWbemServices
Set IWbemServices proxy security via CoSetProxyBlanket
Use the IWbemServices pointer to make requests to WMI
For each wmiQuery { ExecQueryAsync() }

Does anyone know if you are allowed to call multiple instances of
ExecQueryAsync() under a single instance of IWbemServices -or- do I
need to initialize a separate instance of IWbemServices for each call
to ExecQueryAsync()?



--
Gerry Hickman (London UK)
.