News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Subject Deleted, Sorry

Started by Zen, July 17, 2014, 06:09:34 AM

Previous topic - Next topic

Zen

NEVERMIND.
I'LL FIGURE IT OUT.

KeepingRealBusy

Zen,

Hutch seems to be conversant with "virulently contagious Diagnostic Senile Decay".

Dave.

dedndave

i don't generally try to match all the types in an iInterface
if you do, you have to define a lot of Ptrs and Types that are really not necessary
most of the time, you can use DWORD, LPSTR/LPCSTR, or LPVOID
in the case of VARIANT structures, you can break it out to 4 dword-sized items

**apObjects

that tells you that it's a pointer to a pointer of an array of objects

IWbemClassObject

that describes another type of iInterface
it also requires a structure, and includes IUnknown

http://msdn.microsoft.com/en-us/library/aa391433%28v=vs.85%29.aspx

believe me, i am no expert when it comes to COM
i am in the same learn-as-you-go boat that you are - lol

dedndave

you might find it helpful to look at Edgar's GoAsm headers (wbemcli.h in particular)
problem is - they define interfaces differently than we do (each method is just a PTR  :( )
but - it does show you all the interfaces in a simple form
you can use it as a guideline to see what you need to define

dedndave

http://msdn.microsoft.com/en-us/library/aa390860%28v=vs.85%29.aspx

QuotelTimeOut [in]
    Specifies the maximum amount of time in milliseconds that the call blocks before returning. If you use the constant WBEM_INFINITE (0xFFFFFFFF), the call blocks until objects are available. If you use the value 0 (WBEM_NO_WAIT), the call returns immediately, whether any objects are available or not.

uCount [in]
    Number of requested objects.

ppObjects [out]
    Pointer to enough storage to hold the number of IWbemClassObject interface pointers specified by uCount. This storage must be supplied by the caller. This parameter cannot be NULL. The caller must call Release on each of the received interface pointers when they are no longer needed.

puReturned [out]
    Pointer to a ULONG that receives the number of objects returned. This number can be less than the number requested in uCount. This pointer cannot be NULL.
QuoteRemarks
You may see COM-specific error codes returned if network problems cause you to lose the remote connection to Windows Management. On error, you can call the COM function GetErrorInfo to obtain more error information.

http://msdn.microsoft.com/en-US/library/aa383513.aspx

QuoteWBEM_E_INVALID_QUERY_TYPE
2147749912 (0x80041018)
The requested query language is not supported.

from what i can gather, the uCount argument is the number of enumerations you want
the ppObjects pointer should, then, point to an array of LPVOID pointers, one for each uCount
each one is an IWbemClassObject interface pointer and should be released when you're done

Zen

#5
NEVERMIND.
BUT, THANKS DAVE, FOR THE SUGGESTIONS.

hutch--

 :biggrin:

> Hutch seems to be conversant with "virulently contagious Diagnostic Senile Decay".

Yesw but its a special kind, one you can turn on and off at will. "I don't remember ever having made a mistake". In fact voluntary senility is very useful once you master it, shuts those whinging little b*astards up every time. You are only in trouble when it becomes involuntary senility but then you won't remember so it does not matter much.  :P