dxdiag.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*==========================================================================;
  2. *
  3. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dxdiag.h
  6. * Content: DirectX Diagnostic Tool include file
  7. *
  8. ****************************************************************************/
  9. #ifndef _DXDIAG_H_
  10. #define _DXDIAG_H_
  11. #include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
  12. // This identifier is passed to IDxDiagProvider::Initialize in order to ensure that an
  13. // application was built against the correct header files. This number is
  14. // incremented whenever a header (or other) change would require applications
  15. // to be rebuilt. If the version doesn't match, IDxDiagProvider::Initialize will fail.
  16. // (The number itself has no meaning.)
  17. #define DXDIAG_DX9_SDK_VERSION 111
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /****************************************************************************
  22. *
  23. * DxDiag Errors
  24. *
  25. ****************************************************************************/
  26. #define DXDIAG_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
  27. /****************************************************************************
  28. *
  29. * DxDiag CLSIDs
  30. *
  31. ****************************************************************************/
  32. // {A65B8071-3BFE-4213-9A5B-491DA4461CA7}
  33. DEFINE_GUID(CLSID_DxDiagProvider,
  34. 0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7);
  35. /****************************************************************************
  36. *
  37. * DxDiag Interface IIDs
  38. *
  39. ****************************************************************************/
  40. // {9C6B4CB0-23F8-49CC-A3ED-45A55000A6D2}
  41. DEFINE_GUID(IID_IDxDiagProvider,
  42. 0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2);
  43. // {0x7D0F462F-0x4064-0x4862-BC7F-933E5058C10F}
  44. DEFINE_GUID(IID_IDxDiagContainer,
  45. 0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F);
  46. /****************************************************************************
  47. *
  48. * DxDiag Interface Pointer definitions
  49. *
  50. ****************************************************************************/
  51. typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER;
  52. typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER;
  53. /****************************************************************************
  54. *
  55. * DxDiag Structures
  56. *
  57. ****************************************************************************/
  58. typedef struct _DXDIAG_INIT_PARAMS
  59. {
  60. DWORD dwSize; // Size of this structure.
  61. DWORD dwDxDiagHeaderVersion; // Pass in DXDIAG_DX9_SDK_VERSION. This verifies
  62. // the header and dll are correctly matched.
  63. BOOL bAllowWHQLChecks; // If true, allow dxdiag to check if drivers are
  64. // digital signed as logo'd by WHQL which may
  65. // connect via internet to update WHQL certificates.
  66. VOID* pReserved; // Reserved. Must be NULL.
  67. } DXDIAG_INIT_PARAMS;
  68. /****************************************************************************
  69. *
  70. * DxDiag Application Interfaces
  71. *
  72. ****************************************************************************/
  73. //
  74. // COM definition for IDxDiagProvider
  75. //
  76. #undef INTERFACE // External COM Implementation
  77. #define INTERFACE IDxDiagProvider
  78. DECLARE_INTERFACE_(IDxDiagProvider,IUnknown)
  79. {
  80. /*** IUnknown methods ***/
  81. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  82. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  83. STDMETHOD_(ULONG,Release) (THIS) PURE;
  84. /*** IDxDiagProvider methods ***/
  85. STDMETHOD(Initialize) (THIS_ DXDIAG_INIT_PARAMS* pParams) PURE;
  86. STDMETHOD(GetRootContainer) (THIS_ IDxDiagContainer **ppInstance) PURE;
  87. };
  88. //
  89. // COM definition for IDxDiagContainer
  90. //
  91. #undef INTERFACE // External COM Implementation
  92. #define INTERFACE IDxDiagContainer
  93. DECLARE_INTERFACE_(IDxDiagContainer,IUnknown)
  94. {
  95. /*** IUnknown methods ***/
  96. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
  97. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  98. STDMETHOD_(ULONG,Release) (THIS) PURE;
  99. /*** IDxDiagContainer methods ***/
  100. STDMETHOD(GetNumberOfChildContainers) (THIS_ DWORD *pdwCount) PURE;
  101. STDMETHOD(EnumChildContainerNames) (THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE;
  102. STDMETHOD(GetChildContainer) (THIS_ LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) PURE;
  103. STDMETHOD(GetNumberOfProps) (THIS_ DWORD *pdwCount) PURE;
  104. STDMETHOD(EnumPropNames) (THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE;
  105. STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE;
  106. };
  107. /****************************************************************************
  108. *
  109. * DxDiag application interface macros
  110. *
  111. ****************************************************************************/
  112. #if !defined(__cplusplus) || defined(CINTERFACE)
  113. #define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  114. #define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
  115. #define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p)
  116. #define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  117. #define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a)
  118. #define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  119. #define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
  120. #define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p)
  121. #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a)
  122. #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c)
  123. #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b)
  124. #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a)
  125. #define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c)
  126. #define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b)
  127. #else /* C++ */
  128. #define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
  129. #define IDxDiagProvider_AddRef(p) (p)->AddRef(p)
  130. #define IDxDiagProvider_Release(p) (p)->Release(p)
  131. #define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(p,a,b)
  132. #define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(p,a)
  133. #define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
  134. #define IDxDiagContainer_AddRef(p) (p)->AddRef(p)
  135. #define IDxDiagContainer_Release(p) (p)->Release(p)
  136. #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(p,a)
  137. #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(p,a,b,c)
  138. #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(p,a,b)
  139. #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(p,a)
  140. #define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(p,a,b,c)
  141. #define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(p,a,b)
  142. #endif
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146. #endif /* _DXDIAG_H_ */