ndhelper.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_NDHELPER
  7. #define _INC_NDHELPER
  8. #include <ndattrib.h>
  9. #if (_WIN32_WINNT >= 0x0600)
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. typedef struct tagDiagnosticsInfo {
  14. __LONG32 cost;
  15. ULONG flags;
  16. } DiagnosticsInfo, *PDiagnosticsInfo;
  17. typedef struct tagHYPOTHESIS {
  18. LPWSTR pwszClassName;
  19. LPWSTR pwszDescription;
  20. ULONG celt;
  21. PHELPER_ATTRIBUTE rgAttributes[ ];
  22. } HYPOTHESIS, *PHYPOTHESIS;
  23. typedef struct tagHelperAttributeInfo {
  24. LPWSTR pwszName;
  25. ATTRIBUTE_TYPE type;
  26. } HelperAttributeInfo, *PHelperAttributeInfo;
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #undef INTERFACE
  31. #define INTERFACE INetDiagHelperInfo
  32. #ifdef __GNUC__
  33. #warning COM interfaces layout in this header has not been verified.
  34. #warning COM interfaces with incorrect layout may not work at all.
  35. __MINGW_BROKEN_INTERFACE(INTERFACE)
  36. #endif
  37. DECLARE_INTERFACE_(INetDiagHelperInfo,IUnknown)
  38. {
  39. BEGIN_INTERFACE
  40. /* IUnknown methods */
  41. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  42. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  43. STDMETHOD_(ULONG, Release)(THIS) PURE;
  44. /* INetDiagHelperInfo methods */
  45. STDMETHOD_(HRESULT,GetAttributeInfo)(THIS_ ULONG *pcelt,HelperAttributeInfo **pprgAttributeInfos) PURE;
  46. END_INTERFACE
  47. };
  48. #ifdef COBJMACROS
  49. #define INetDiagHelperInfo_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  50. #define INetDiagHelperInfo_AddRef(This) (This)->lpVtbl->AddRef(This)
  51. #define INetDiagHelperInfo_Release(This) (This)->lpVtbl->Release(This)
  52. #define INetDiagHelperInfo_GetAttributeInfo(This,pcelt,pprgAttributeInfos) (This)->lpVtbl->GetAttributeInfo(This,pcelt,pprgAttributeInfos)
  53. #endif /*COBJMACROS*/
  54. #undef INTERFACE
  55. #define INTERFACE INetDiagHelper
  56. DECLARE_INTERFACE_(INetDiagHelper,IUnknown)
  57. {
  58. BEGIN_INTERFACE
  59. /* IUnknown methods */
  60. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  61. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  62. STDMETHOD_(ULONG, Release)(THIS) PURE;
  63. /* INetDiagHelper methods */
  64. STDMETHOD_(HRESULT,Cancel)(THIS) PURE;
  65. STDMETHOD_(HRESULT,Cleanup)(THIS) PURE;
  66. STDMETHOD_(HRESULT,GetAttributes)(THIS_ ULONG *pcelt,HELPER_ATTRIBUTE **pprgAttributes) PURE;
  67. STDMETHOD_(HRESULT,GetCacheTime)(THIS_ FILETIME *pCacheTime) PURE;
  68. STDMETHOD_(HRESULT,GetDiagnosticsInfo)(THIS_ RETVAL DiagnosticsInfo **ppInfo) PURE;
  69. STDMETHOD_(HRESULT,GetDownStreamHypotheses)(THIS_ ULONG *pcelt,HYPOTHESIS **pprgHypotheses) PURE;
  70. STDMETHOD_(HRESULT,GetHigherHypotheses)(THIS_ ULONG *pcelt,HYPOTHESIS **pprgHypotheses) PURE;
  71. STDMETHOD_(HRESULT,GetKeyAttributes)(THIS_ ULONG *pcelt,HELPER_ATTRIBUTE **pprgAttributes) PURE;
  72. STDMETHOD_(HRESULT,GetLifeTime)(THIS_ LIFE_TIME *pLifeTime) PURE;
  73. STDMETHOD_(HRESULT,GetLowerHypotheses)(THIS_ ULONG *pcelt,HYPOTHESIS **pprgHypotheses) PURE;
  74. STDMETHOD_(HRESULT,GetRepairInfo)(THIS_ PROBLEM_TYPE problem,ULONG pcelt,RepairInfo **ppInfo) PURE;
  75. STDMETHOD_(HRESULT,GetUpStreamHypotheses)(THIS_ ULONG *pcelt,HYPOTHESIS **pprgHypotheses) PURE;
  76. STDMETHOD_(HRESULT,HighUtilization)(THIS_ STRING LPWSTR pwszInstanceDescription,STRING LPWSTR *ppwszDescription,LONG *pDeferredTime,DIAGNOSTICS_STATUS *pStatus) PURE;
  77. STDMETHOD_(HRESULT,Initialize)(THIS_ ULONG celt,HELPER_ATTRIBUTE rgAttributes) PURE;
  78. STDMETHOD_(HRESULT,LowHealth)(THIS_ STRING LPWSTR pwszInstanceDescription,STRING LPWSTR *ppwszDescription,LONG *pDeferredTime,DIAGNOSTICS_STATUS *pStatus) PURE;
  79. STDMETHOD_(HRESULT,Repair)(THIS_ REPAIRINFO *pInfo,LONG *pDeferredTime,REPAIR_STATUS *pStatus) PURE;
  80. STDMETHOD_(HRESULT,SetLifeTime)(THIS_ LIFE_TIME lifeTime) PURE;
  81. STDMETHOD_(HRESULT,Validate)(THIS_ PROBLEM_TYPE problem,ULONG *pDeferredTime,REPAIR_STATUS *pStatus) PURE;
  82. END_INTERFACE
  83. };
  84. #ifdef COBJMACROS
  85. #define INetDiagHelper_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  86. #define INetDiagHelper_AddRef(This) (This)->lpVtbl->AddRef(This)
  87. #define INetDiagHelper_Release(This) (This)->lpVtbl->Release(This)
  88. #define INetDiagHelper_Cancel() (This)->lpVtbl->Cancel(This)
  89. #define INetDiagHelper_Cleanup() (This)->lpVtbl->Cleanup(This)
  90. #define INetDiagHelper_GetAttributes(This,pcelt,pprgAttributes) (This)->lpVtbl->GetAttributes(This,pcelt,pprgAttributes)
  91. #define INetDiagHelper_GetCacheTime(This,pCacheTime) (This)->lpVtbl->GetCacheTime(This,pCacheTime)
  92. #define INetDiagHelper_GetDiagnosticsInfo(This,ppInfo) (This)->lpVtbl->GetDiagnosticsInfo(This,ppInfo)
  93. #define INetDiagHelper_GetDownStreamHypotheses(This,pcelt,pprgHypotheses) (This)->lpVtbl->GetDownStreamHypotheses(This,pcelt,pprgHypotheses)
  94. #define INetDiagHelper_GetHigherHypotheses(This,pcelt,pprgHypotheses) (This)->lpVtbl->GetHigherHypotheses(This,pcelt,pprgHypotheses)
  95. #define INetDiagHelper_GetKeyAttributes(This,pcelt,pprgAttributes) (This)->lpVtbl->GetKeyAttributes(This,pcelt,pprgAttributes)
  96. #define INetDiagHelper_GetLifeTime(This,pLifeTime) (This)->lpVtbl->GetLifeTime(This,pLifeTime)
  97. #define INetDiagHelper_GetLowerHypotheses(This,pcelt,pprgHypotheses) (This)->lpVtbl->GetLowerHypotheses(This,pcelt,pprgHypotheses)
  98. #define INetDiagHelper_GetRepairInfo(This,problem,pcelt,ppInfo) (This)->lpVtbl->GetRepairInfo(This,problem,pcelt,ppInfo)
  99. #define INetDiagHelper_GetUpStreamHypotheses(This,pcelt,pprgHypotheses) (This)->lpVtbl->GetUpStreamHypotheses(This,pcelt,pprgHypotheses)
  100. #define INetDiagHelper_HighUtilization(This,pwszInstanceDescription,ppwszDescription,pDeferredTime,pStatus) (This)->lpVtbl->HighUtilization(This,pwszInstanceDescription,ppwszDescription,pDeferredTime,pStatus)
  101. #define INetDiagHelper_Initialize(This,celt,rgAttributes) (This)->lpVtbl->Initialize(This,celt,rgAttributes)
  102. #define INetDiagHelper_LowHealth(This,pwszInstanceDescription,ppwszDescription,pDeferredTime,pStatus) (This)->lpVtbl->LowHealth(This,pwszInstanceDescription,ppwszDescription,pDeferredTime,pStatus)
  103. #define INetDiagHelper_Repair(This,pInfo,pDeferredTime,pStatus) (This)->lpVtbl->Repair(This,pInfo,pDeferredTime,pStatus)
  104. #define INetDiagHelper_SetLifeTime(This,lifeTime) (This)->lpVtbl->SetLifeTime(This,lifeTime)
  105. #define INetDiagHelper_Validate(This,problem,pDeferredTime,pStatus) (This)->lpVtbl->Validate(This,problem,pDeferredTime,pStatus)
  106. #endif /*COBJMACROS*/
  107. #if (_WIN32_WINNT >= 0x0601)
  108. typedef struct tagHypothesisResult {
  109. HYPOTHESIS hypothesis;
  110. DIAGNOSIS_STATUS pathStatus;
  111. } HypothesisResult;
  112. #undef INTERFACE
  113. #define INTERFACE INetDiagHelperUtilFactory
  114. #ifdef __GNUC__
  115. #warning COM interfaces layout in this header has not been verified.
  116. #warning COM interfaces with incorrect layout may not work at all.
  117. __MINGW_BROKEN_INTERFACE(INTERFACE)
  118. #endif
  119. DECLARE_INTERFACE_(INetDiagHelperUtilFactory,IUnknown)
  120. {
  121. BEGIN_INTERFACE
  122. /* IUnknown methods */
  123. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  124. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  125. STDMETHOD_(ULONG, Release)(THIS) PURE;
  126. /* INetDiagHelperUtilFactory methods */
  127. STDMETHOD(CreateUtilityInstance)(THIS_ REFIID *riid,void **ppvObject) PURE;
  128. END_INTERFACE
  129. };
  130. #ifdef COBJMACROS
  131. #define INetDiagHelperUtilFactory_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  132. #define INetDiagHelperUtilFactory_AddRef(This) (This)->lpVtbl->AddRef(This)
  133. #define INetDiagHelperUtilFactory_Release(This) (This)->lpVtbl->Release(This)
  134. #define INetDiagHelperUtilFactory_CreateUtilityInstance(This,riid,ppvObject) (This)->lpVtbl->CreateUtilityInstance(This,riid,ppvObject)
  135. #endif /*COBJMACROS*/
  136. #undef INTERFACE
  137. #define INTERFACE INetDiagHelperEx
  138. #ifdef __GNUC__
  139. #warning COM interfaces layout in this header has not been verified.
  140. #warning COM interfaces with incorrect layout may not work at all.
  141. __MINGW_BROKEN_INTERFACE(INTERFACE)
  142. #endif
  143. DECLARE_INTERFACE_(INetDiagHelperEx,IUnknown)
  144. {
  145. BEGIN_INTERFACE
  146. /* IUnknown methods */
  147. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  148. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  149. STDMETHOD_(ULONG, Release)(THIS) PURE;
  150. /* INetDiagHelperEx methods */
  151. STDMETHOD_(HRESULT,ReconfirmLowHealth)(THIS_ ULONG celt,HypothesisResult *pResults,string LPWSTR *ppwszUpdatedDescription,DIAGNOSIS_STATUS *pUpdatedStatus) PURE;
  152. STDMETHOD(ReproduceFailure)(THIS) PURE;
  153. STDMETHOD(SetUtilities)(THIS_ INetDiagHelperUtilFactory *pUtilities) PURE;
  154. END_INTERFACE
  155. };
  156. #ifdef COBJMACROS
  157. #define INetDiagHelperEx_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  158. #define INetDiagHelperEx_AddRef(This) (This)->lpVtbl->AddRef(This)
  159. #define INetDiagHelperEx_Release(This) (This)->lpVtbl->Release(This)
  160. #define INetDiagHelperEx_ReconfirmLowHealth(This,celt,pResults,ppwszUpdatedDescription,pUpdatedStatus) (This)->lpVtbl->ReconfirmLowHealth(This,celt,pResults,ppwszUpdatedDescription,pUpdatedStatus)
  161. #define INetDiagHelperEx_ReproduceFailure() (This)->lpVtbl->ReproduceFailure(This)
  162. #define INetDiagHelperEx_SetUtilities(This,pUtilities) (This)->lpVtbl->SetUtilities(This,pUtilities)
  163. #endif /*COBJMACROS*/
  164. #endif /*(_WIN32_WINNT >= 0x0601)*/
  165. #endif /*(_WIN32_WINNT >= 0x0600)*/
  166. #endif /*_INC_NDHELPER*/