Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

234 lines
8.3 KiB

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. //***************************************************************************
  8. //
  9. // STDPROV.H
  10. //
  11. // Test instance provider
  12. //
  13. // raymcc 02-Dec-97
  14. //
  15. //***************************************************************************
  16. #ifndef _STDPROV_H_
  17. #define _STDPROV_H_
  18. class CStdProvider : public IWbemServices, public IWbemProviderInit
  19. {
  20. LONG m_lRef;
  21. IWbemClassObject *m_pClassDef;
  22. public:
  23. CStdProvider();
  24. ~CStdProvider();
  25. // Interface members.
  26. // ==================
  27. ULONG STDMETHODCALLTYPE AddRef();
  28. ULONG STDMETHODCALLTYPE Release();
  29. STDMETHODIMP QueryInterface(REFIID riid, void** ppv);
  30. // IWbemProviderInit method.
  31. // =========================
  32. virtual HRESULT STDMETHODCALLTYPE Initialize(
  33. /* [unique][in] */ LPWSTR wszUser,
  34. /* [in] */ LONG lFlags,
  35. /* [in] */ LPWSTR wszNamespace,
  36. /* [unique][in] */ LPWSTR wszLocale,
  37. /* [in] */ IWbemServices __RPC_FAR *pNamespace,
  38. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  39. /* [in] */ IWbemProviderInitSink __RPC_FAR *pInitSink
  40. );
  41. // IWbemServices methods.
  42. // ======================
  43. virtual HRESULT STDMETHODCALLTYPE OpenNamespace(
  44. /* [in] */ BSTR strNamespace,
  45. /* [in] */ long lFlags,
  46. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  47. /* [unique][in][out] */ IWbemServices __RPC_FAR *__RPC_FAR *ppWorkingNamespace,
  48. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppResult
  49. );
  50. virtual HRESULT STDMETHODCALLTYPE CancelAsyncCall(
  51. /* [in] */ IWbemObjectSink __RPC_FAR *pSink
  52. );
  53. virtual HRESULT STDMETHODCALLTYPE QueryObjectSink(
  54. /* [in] */ long lFlags,
  55. /* [out] */ IWbemObjectSink __RPC_FAR *__RPC_FAR *ppResponseHandler
  56. );
  57. virtual HRESULT STDMETHODCALLTYPE GetObject(
  58. /* [in] */ BSTR strObjectPath,
  59. /* [in] */ long lFlags,
  60. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  61. /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppObject,
  62. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
  63. );
  64. virtual HRESULT STDMETHODCALLTYPE GetObjectAsync(
  65. /* [in] */ BSTR strObjectPath,
  66. /* [in] */ long lFlags,
  67. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  68. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  69. );
  70. virtual HRESULT STDMETHODCALLTYPE PutClass(
  71. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  72. /* [in] */ long lFlags,
  73. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  74. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
  75. );
  76. virtual HRESULT STDMETHODCALLTYPE PutClassAsync(
  77. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  78. /* [in] */ long lFlags,
  79. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  80. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  81. );
  82. virtual HRESULT STDMETHODCALLTYPE DeleteClass(
  83. /* [in] */ BSTR strClass,
  84. /* [in] */ long lFlags,
  85. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  86. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
  87. );
  88. virtual HRESULT STDMETHODCALLTYPE DeleteClassAsync(
  89. /* [in] */ BSTR strClass,
  90. /* [in] */ long lFlags,
  91. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  92. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  93. );
  94. virtual HRESULT STDMETHODCALLTYPE CreateClassEnum(
  95. /* [in] */ BSTR strSuperclass,
  96. /* [in] */ long lFlags,
  97. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  98. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
  99. );
  100. virtual HRESULT STDMETHODCALLTYPE CreateClassEnumAsync(
  101. /* [in] */ BSTR strSuperclass,
  102. /* [in] */ long lFlags,
  103. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  104. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  105. );
  106. virtual HRESULT STDMETHODCALLTYPE PutInstance(
  107. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  108. /* [in] */ long lFlags,
  109. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  110. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
  111. );
  112. virtual HRESULT STDMETHODCALLTYPE PutInstanceAsync(
  113. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  114. /* [in] */ long lFlags,
  115. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  116. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  117. );
  118. virtual HRESULT STDMETHODCALLTYPE DeleteInstance(
  119. /* [in] */ BSTR strObjectPath,
  120. /* [in] */ long lFlags,
  121. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  122. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
  123. );
  124. virtual HRESULT STDMETHODCALLTYPE DeleteInstanceAsync(
  125. /* [in] */ BSTR strObjectPath,
  126. /* [in] */ long lFlags,
  127. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  128. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  129. );
  130. virtual HRESULT STDMETHODCALLTYPE CreateInstanceEnum(
  131. /* [in] */ BSTR strClass,
  132. /* [in] */ long lFlags,
  133. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  134. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
  135. );
  136. virtual HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync(
  137. /* [in] */ BSTR strClass,
  138. /* [in] */ long lFlags,
  139. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  140. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  141. );
  142. virtual HRESULT STDMETHODCALLTYPE ExecQuery(
  143. /* [in] */ BSTR strQueryLanguage,
  144. /* [in] */ BSTR strQuery,
  145. /* [in] */ long lFlags,
  146. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  147. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
  148. );
  149. virtual HRESULT STDMETHODCALLTYPE ExecQueryAsync(
  150. /* [in] */ BSTR strQueryLanguage,
  151. /* [in] */ BSTR strQuery,
  152. /* [in] */ long lFlags,
  153. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  154. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  155. );
  156. virtual HRESULT STDMETHODCALLTYPE ExecNotificationQuery(
  157. /* [in] */ BSTR strQueryLanguage,
  158. /* [in] */ BSTR strQuery,
  159. /* [in] */ long lFlags,
  160. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  161. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum
  162. );
  163. virtual HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync(
  164. /* [in] */ BSTR strQueryLanguage,
  165. /* [in] */ BSTR strQuery,
  166. /* [in] */ long lFlags,
  167. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  168. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  169. );
  170. virtual HRESULT STDMETHODCALLTYPE ExecMethod(
  171. /* [in] */ BSTR strObjectPath,
  172. /* [in] */ BSTR strMethodName,
  173. /* [in] */ long lFlags,
  174. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  175. /* [in] */ IWbemClassObject __RPC_FAR *pInParams,
  176. /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppOutParams,
  177. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult
  178. );
  179. virtual HRESULT STDMETHODCALLTYPE ExecMethodAsync(
  180. /* [in] */ BSTR strObjectPath,
  181. /* [in] */ BSTR strMethodName,
  182. /* [in] */ long lFlags,
  183. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  184. /* [in] */ IWbemClassObject __RPC_FAR *pInParams,
  185. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler
  186. );
  187. };
  188. void ObjectCreated();
  189. void ObjectDestroyed();
  190. #endif