![]() ![]() If Succeeded(CoInitializeEx(nil, COINIT_MULTITHREADED)) then Microsoft recommends use the CoInitializeEx function with the COINIT_MULTITHREADED flag this unit called JwaWbemCli is part of the JEDI API Library Accessing the WMI using the COM Interface Note : the code showed in this article was tested in Delphi 2007, Delphi XE and FPC 2.4.2 and uses the WBEM Client interface Unit for Object Pascal which is an translation of the headers of the WbemCli.h file. The interfaces of the COM API for WMI are very similar to the Microsoft WMIScripting Library because the last is just a wrapper for the COM object. In the next sample you will learn how avoid this additional layer. In the next diagram you can see the layers to access the WMI, you can note how the WMIScripting finally access the WMI using the WMI COM API. in both cases you are using the same layer to access the WMI (WMIScripting). In the past articles always I show samples to use the WMI using late binding or importing the Microsoft WMIScripting Library. A fellow Delphi programmer, ask me how they can access the WMI using the COM API for WMI, so I decide write this article to show how.įirst you must to know which this API was designed primarily for low level access to the WMI from C++ and for create WMI providers, compile mof files and so on. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |