How can I map the ClassGUID found via WMI to the Classname - wmi

Using a WMI Query, I have been able to obtain a list of related devices using the ClassGUID. What I am struggling to find is a way of mapping the ClassGUID to the Classname string which is used by DeviceManager when grouping devices by Type.
Is this possible using WMI or would I have to resort to search the registry.
So far I have searched the WMI documentation which is not very forthcoming on the subject & used WMIExplorer & haven't found anything to link the two - as well as Googling.

Related

How to fetch Edge browsing history programmatically? Is there is any way using COM/Windows API to fetch it? [duplicate]

I used FindFirstUrlCacheEntry/FindNextUrlCacheEntry Win API to get Internet Explorer's history programmatically in C++.
Can you tell me how to get Microsoft Edge History using C++ (Windows API)?
Not possible at this point in time. Might want to use the 'suggestions routes' at some of the links below.
Developer Feedback Home - https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer
Developer Feedback Twitter - https://www.twitter.com/msedgedev
Feature Suggestions - https://windowsphone.uservoice.com/forums/101801-feature-suggestions/category/18985-web-browsing
Healy in Tampa
The history is stored in \AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat. It uses Microsoft’s Extensible Storage Engine to store data. There is a C++ wrapper for accessing Extensible Storage Engine files I've used to access data from this file.
The "Containers" table inside WebCacheV01.dat tells which "Container_X" tables have type of "Content" or "History", as well as the Secure Directories and their order. You can use the ESEDatabaseView utility to view the data inside the WebCacheV01.dat file.

What are SetupAPI,SetupAPI1,and SetupAPI2? And what the difference between them?

Recently,I need to realize a little function in MFC by C++ which is used to get a list of available serial ports. And then I saw this. I need to know what is SetupAPI1 and SetupAPI2? Where can I get the setup.dll when I wanna use this way to realize my function?. During searching the Internet I found there is a SetupAPI but it seems another one. Now, I am really confusing by these SetupAPI, SetupAPI1, and SetupAPI2. What are the differences? Where are they come from? And, how can I get them if I wanna to use these?
There is no such think as SetupAPI1 and SetupAPI2. There is a library named SetupAPI.
This answer you link to refers to a library named EnumSerialPort. From that page:
Internally the code provides 9 different ways (yes you read that right: Nine) of enumerating serial ports: Using CreateFile, QueryDosDevice, GetDefaultCommConfig, two ways using the Setup API, EnumPorts, WMI, Com Database & enumerating the values under the registry key HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM.
...
All of the configuration of the code is controlled by the following preprocessor values: CENUMERATESERIAL_USE_STL, _AFX, NO_ENUMSERIAL_USING_CREATEFILE, NO_ENUMSERIAL_USING_QUERYDOSDEVICE, NO_ENUMSERIAL_USING_GETDEFAULTCOMMCONFIG, NO_ENUMSERIAL_USING_SETUPAPI1, NO_ENUMSERIAL_USING_SETUPAPI2, NO_ENUMSERIAL_USING_ENUMPORTS, NO_ENUMSERIAL_USING_WMI, NO_ENUMSERIAL_USING_COMDB & NO_ENUMSERIAL_USING_REGISTRY.
This library presents two different methods that rely on SetupAPI, and simply numbers them one and two. You can see these details and more by following the links.

Enumerating Microsoft Edge History Programmatically

I used FindFirstUrlCacheEntry/FindNextUrlCacheEntry Win API to get Internet Explorer's history programmatically in C++.
Can you tell me how to get Microsoft Edge History using C++ (Windows API)?
Not possible at this point in time. Might want to use the 'suggestions routes' at some of the links below.
Developer Feedback Home - https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer
Developer Feedback Twitter - https://www.twitter.com/msedgedev
Feature Suggestions - https://windowsphone.uservoice.com/forums/101801-feature-suggestions/category/18985-web-browsing
Healy in Tampa
The history is stored in \AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat. It uses Microsoft’s Extensible Storage Engine to store data. There is a C++ wrapper for accessing Extensible Storage Engine files I've used to access data from this file.
The "Containers" table inside WebCacheV01.dat tells which "Container_X" tables have type of "Content" or "History", as well as the Secure Directories and their order. You can use the ESEDatabaseView utility to view the data inside the WebCacheV01.dat file.

How can I create specialized metadata nodes via llvm-c API?

I'd like to add debugging information to a LLVM-generated code. I'm using LLVM C API (since I'm calling LLVM from Smalltalk via FFI).
Debug informations are attached via specialized metadata nodes, but I could not find any way to create them. By looking to LLVM source code, it seems that I'd need to create metadata node with certain kind (say DILocationKind) but the "kind" enum seems not exposed by LLVM-C API nor LLVMMDNode() allows for passing the "kind" as an argument.
Is there a way create specialized metadata nodes using LLVM-C API?
Could somebody point me to some example how to add debug information to LLVM-generated code using LLVM-C API?

How to change Directshow filter properties C++

How to change Filter Properties programmatically?
I am using a filter AAC encoder, and I can manually change its bitrate in graphedit by right clicking on the filter and entering the bitrate value.
Is it possible to do the same through code?
Please give me valuable suggestions and if possible with code.
You do this via private filter-specific interface. You need to refer to filter documentation or SDK to get details on this (VSS Tech Support). Sometimes you can obtain the necessary information from type library.
See:
Controlling variables in filter remotely
with out property page, How can I input a value through codes?
Define a Mechanism for Setting the Property on MSDN
Your AAC Encoder will have some interface exposed through some IID's. Make sure you get that IID's interface, then access to its additional functions like bitrate, sampling rate, etc,.
Similar to Roman's answer, it seems there are two ways that a filter's "special properties" are typically set and/or saved.
One is to display its properties page "dialog" (ISpecifyPropertyPages), then allow the user to change things and close it, then afterward you get its IPersistStream interface, and save off its "current state" which you can then use later for basically settings its properties back to what they were saved to (this is how graphedit does it, ref: http://microsoft.public.multimedia.directx.dshow.programming.narkive.com/ldOko8Js/ispecifypropertypages-saving-and-restoring-settings) In addition, you can serialize "the whole graph" to a file by calling IPersistStream on the graph object itself. See https://stackoverflow.com/a/11781370/32453
The other way is to know "exactly what type of special filter it is" and cast it to some special interface that you know of, from the third party, which may expose getters and setters, etc. like the "avisynth" filter from the Windows SDK directshow examples exposes ISynth interface
See also here which lists a few more ways apparently...here also seems related. IPersist itself also has multiple interfaces that inherit from it, see comments here. By far in my experience for dshow devices, they typically implement only IPersist and IPersistStream (and IAMSpecificPropertyPages), though you could save away values yourself for other common interfaces as well (like IAMVideoProcAmp), then manually re-set properties as well...
Update: unfortunately though many filters implement IPersistStream, it seems that few of them actually use it for anything useful...