The DirectX Diagnostic Tool exposes a COM interface to allow developers to programmatically query the information gathered by the tool.
Examples using the diagnostic tool can be found in: