Enumerating Specific Items You Care About

If you've run DxDiag, or even the sample app from the DirectX SDK, you know that enumerating everything that DxDiag knows about can take quite some time. What if you don't care about the vast majority of the stuff listed, and only want to maintain information on a small subset of items? Luckily, the diagnostic namespace can be used for this as well.

Let's say the first thing you wanted to know was what version of DirectX the system running your application was using. No need to go through all of the work enumerating everything when you only care about something so simple. Here is the code you would use to determine this:

 Container parent = new Container(false); Container child = parent.GetContainer("DxDiag_SystemInfo").Container; ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.