dxdiag.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. #undef INTERFACE
  2. /*
  3. * Copyright (C) 2004 Raphael Junqueira
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2.1 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  18. */
  19. #ifndef __WINE_DXDIAG_H
  20. #define __WINE_DXDIAG_H
  21. #include <ole2.h>
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif /* defined(__cplusplus) */
  25. /*****************************************************************************
  26. * #defines and error codes
  27. */
  28. #define DXDIAG_DX9_SDK_VERSION 111
  29. #define _FACDXDIAG 0x007
  30. #define MAKE_DXDIAGHRESULT( code ) MAKE_HRESULT( 1, _FACDXDIAG, code )
  31. /*
  32. * DXDiag Errors
  33. */
  34. #define DXDIAG_E_INSUFFICIENT_BUFFER MAKE_DXDIAGHRESULT(0x007A)
  35. /*****************************************************************************
  36. * DXDiag structures Typedefs
  37. */
  38. typedef struct _DXDIAG_INIT_PARAMS {
  39. DWORD dwSize;
  40. DWORD dwDxDiagHeaderVersion;
  41. WINBOOL bAllowWHQLChecks;
  42. VOID* pReserved;
  43. } DXDIAG_INIT_PARAMS;
  44. /*****************************************************************************
  45. * Predeclare the interfaces
  46. */
  47. /* CLSIDs */
  48. DEFINE_GUID(CLSID_DxDiagProvider, 0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7);
  49. /* IIDs */
  50. DEFINE_GUID(IID_IDxDiagProvider, 0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2);
  51. DEFINE_GUID(IID_IDxDiagContainer, 0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F);
  52. /* typedef definitions */
  53. typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER;
  54. typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER;
  55. /*****************************************************************************
  56. * IDxDiagContainer interface
  57. */
  58. #ifdef WINE_NO_UNICODE_MACROS
  59. #undef GetProp
  60. #endif
  61. #define INTERFACE IDxDiagContainer
  62. DECLARE_INTERFACE_(IDxDiagContainer,IUnknown)
  63. {
  64. /*** IUnknown methods ***/
  65. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  66. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  67. STDMETHOD_(ULONG,Release)(THIS) PURE;
  68. /*** IDxDiagContainer methods ***/
  69. STDMETHOD(GetNumberOfChildContainers)(THIS_ DWORD* pdwCount) PURE;
  70. STDMETHOD(EnumChildContainerNames)(THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE;
  71. STDMETHOD(GetChildContainer)(THIS_ LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) PURE;
  72. STDMETHOD(GetNumberOfProps)(THIS_ DWORD* pdwCount) PURE;
  73. STDMETHOD(EnumPropNames)(THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE;
  74. STDMETHOD(GetProp)(THIS_ LPCWSTR pwszPropName, VARIANT* pvarProp) PURE;
  75. };
  76. #undef INTERFACE
  77. #if !defined(__cplusplus) || defined(CINTERFACE)
  78. /*** IUnknown methods ***/
  79. #define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  80. #define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
  81. #define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p)
  82. /*** IDxDiagContainer methods ***/
  83. #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a)
  84. #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c)
  85. #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b)
  86. #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a)
  87. #define IDxDiagContainer_EnumPropNames(p,a,b,c) (p)->lpVtbl->EnumPropNames(p,a,b,c)
  88. #define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b)
  89. #else
  90. /*** IUnknown methods ***/
  91. #define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  92. #define IDxDiagContainer_AddRef(p) (p)->AddRef()
  93. #define IDxDiagContainer_Release(p) (p)->Release()
  94. /*** IDxDiagContainer methods ***/
  95. #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(a)
  96. #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(a,b,c)
  97. #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(a,b)
  98. #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(a)
  99. #define IDxDiagContainer_EnumPropNames(p,a,b,c) (p)->EnumPropNames(a,b,c)
  100. #define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(a,b)
  101. #endif
  102. /*****************************************************************************
  103. * IDxDiagProvider interface
  104. */
  105. #define INTERFACE IDxDiagProvider
  106. DECLARE_INTERFACE_(IDxDiagProvider,IUnknown)
  107. {
  108. /*** IUnknown methods ***/
  109. STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
  110. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  111. STDMETHOD_(ULONG,Release)(THIS) PURE;
  112. /*** IDxDiagProvider methods ***/
  113. STDMETHOD(Initialize)(THIS_ DXDIAG_INIT_PARAMS* pParams) PURE;
  114. STDMETHOD(GetRootContainer)(THIS_ IDxDiagContainer** ppInstance) PURE;
  115. };
  116. #undef INTERFACE
  117. #if !defined(__cplusplus) || defined(CINTERFACE)
  118. /*** IUnknown methods ***/
  119. #define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  120. #define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
  121. #define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p)
  122. /*** IDxDiagProvider methods ***/
  123. #define IDxDiagProvider_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
  124. #define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a)
  125. #else
  126. /*** IUnknown methods ***/
  127. #define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
  128. #define IDxDiagProvider_AddRef(p) (p)->AddRef()
  129. #define IDxDiagProvider_Release(p) (p)->Release()
  130. /*** IDxDiagProvider methods ***/
  131. #define IDxDiagProvider_Initialize(p,a) (p)->Initialize(a)
  132. #define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(a)
  133. #endif
  134. #ifdef __cplusplus
  135. }
  136. #endif
  137. #endif