Leaked source code of windows server 2003
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.

212 lines
9.1 KiB

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. INTPROV.H
  5. Abstract:
  6. History:
  7. raymcc 06-May-97 Created.
  8. raymcc 17-Jul-97 NTLM authentication support
  9. --*/
  10. #ifndef _INTPROV_H_
  11. #define _INTPROV_H_
  12. #ifndef PPVOID
  13. #define PPVOID void **
  14. #endif
  15. // generally useful utilities
  16. BSTR GetBSTR(char * pInput);
  17. HRESULT GetDateTime(FILETIME * ft, bool bLocalTime, LPWSTR pBuff);
  18. class CIntProv : public IWbemServices, public IWbemProviderInit
  19. {
  20. protected:
  21. ULONG m_cRef; //Object reference count
  22. IWbemServices * m_pNamespace;
  23. LIST_ENTRY m_Entry;
  24. public:
  25. CIntProv();
  26. ~CIntProv(void);
  27. // operator struct IUnknown * (){return (IWbemServices*)this;};
  28. //Non-delegating object IUnknown
  29. STDMETHODIMP QueryInterface(REFIID, PPVOID);
  30. STDMETHODIMP_(ULONG) AddRef(void);
  31. STDMETHODIMP_(ULONG) Release(void);
  32. //IWbemProviderInit
  33. HRESULT STDMETHODCALLTYPE Initialize(
  34. /* [in] */ LPWSTR pszUser,
  35. /* [in] */ LONG lFlags,
  36. /* [in] */ LPWSTR pszNamespace,
  37. /* [in] */ LPWSTR pszLocale,
  38. /* [in] */ IWbemServices *pNamespace,
  39. /* [in] */ IWbemContext *pCtx,
  40. /* [in] */ IWbemProviderInitSink *pInitSink
  41. );
  42. SCODE CreateWMISetting(IWbemClassObject FAR* FAR* ppObj, IWbemContext *pCtx);
  43. SCODE CreateWMIElementSetting(IWbemClassObject FAR* FAR* ppObj, IWbemContext *pCtx);
  44. SCODE SaveWMISetting(IWbemClassObject FAR*);
  45. SCODE CreateInstance(LPWSTR pwcClassName, IWbemClassObject FAR* FAR* ppObj, IWbemContext *pCtx);
  46. SCODE GetRegStrProp(Registry & reg, LPTSTR pRegValueName, LPWSTR pwsPropName,
  47. CWbemObject * pObj);
  48. SCODE GetRegUINTProp(Registry & reg, LPTSTR pRegValueName, LPWSTR pwsPropName,
  49. CWbemObject * pObj);
  50. SCODE PutRegStrProp(Registry & reg, LPTSTR pRegValueName, LPWSTR pwsPropName,
  51. CWbemObject * pObj);
  52. SCODE PutRegUINTProp(Registry & reg, LPTSTR pRegValueName, LPWSTR pwsPropName,
  53. CWbemObject * pObj);
  54. SCODE ReadAutoMofs(CWbemObject * pObj);
  55. SCODE ReadLastBackup(Registry & reg, CWbemObject * pObj);
  56. //IWbemServices
  57. HRESULT STDMETHODCALLTYPE OpenNamespace(
  58. /* [in] */ const BSTR Namespace,
  59. /* [in] */ long lFlags,
  60. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  61. /* [unique][in][out] */ IWbemServices __RPC_FAR *__RPC_FAR *ppWorkingNamespace,
  62. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppResult) {return WBEM_E_NOT_SUPPORTED;};
  63. HRESULT STDMETHODCALLTYPE CancelAsyncCall(
  64. /* [in] */ IWbemObjectSink __RPC_FAR *pSink) {return WBEM_E_NOT_SUPPORTED;};
  65. HRESULT STDMETHODCALLTYPE QueryObjectSink(
  66. /* [in] */ long lFlags,
  67. /* [out] */ IWbemObjectSink __RPC_FAR *__RPC_FAR *ppResponseHandler) {return WBEM_E_NOT_SUPPORTED;};
  68. HRESULT STDMETHODCALLTYPE GetObject(
  69. /* [in] */ const BSTR ObjectPath,
  70. /* [in] */ long lFlags,
  71. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  72. /* [unique][in][out] */ IWbemClassObject __RPC_FAR *__RPC_FAR *ppObject,
  73. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) {return WBEM_E_NOT_SUPPORTED;};
  74. HRESULT STDMETHODCALLTYPE GetObjectAsync(
  75. /* [in] */ const BSTR ObjectPath,
  76. /* [in] */ long lFlags,
  77. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  78. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler);
  79. HRESULT STDMETHODCALLTYPE PutClass(
  80. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  81. /* [in] */ long lFlags,
  82. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  83. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) {return WBEM_E_NOT_SUPPORTED;};
  84. HRESULT STDMETHODCALLTYPE PutClassAsync(
  85. /* [in] */ IWbemClassObject __RPC_FAR *pObject,
  86. /* [in] */ long lFlags,
  87. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  88. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) {return WBEM_E_NOT_SUPPORTED;};
  89. HRESULT STDMETHODCALLTYPE DeleteClass(
  90. /* [in] */ const BSTR Class,
  91. /* [in] */ long lFlags,
  92. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  93. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) {return WBEM_E_NOT_SUPPORTED;};
  94. HRESULT STDMETHODCALLTYPE DeleteClassAsync(
  95. /* [in] */ const BSTR Class,
  96. /* [in] */ long lFlags,
  97. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  98. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) {return WBEM_E_NOT_SUPPORTED;};
  99. HRESULT STDMETHODCALLTYPE CreateClassEnum(
  100. /* [in] */ const BSTR Superclass,
  101. /* [in] */ long lFlags,
  102. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  103. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) {return WBEM_E_NOT_SUPPORTED;};
  104. HRESULT STDMETHODCALLTYPE CreateClassEnumAsync(
  105. /* [in] */ const BSTR Superclass,
  106. /* [in] */ long lFlags,
  107. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  108. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) {return WBEM_E_NOT_SUPPORTED;};
  109. HRESULT STDMETHODCALLTYPE PutInstance(
  110. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  111. /* [in] */ long lFlags,
  112. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  113. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) {return WBEM_E_NOT_SUPPORTED;};
  114. HRESULT STDMETHODCALLTYPE PutInstanceAsync(
  115. /* [in] */ IWbemClassObject __RPC_FAR *pInst,
  116. /* [in] */ long lFlags,
  117. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  118. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler);
  119. HRESULT STDMETHODCALLTYPE DeleteInstance(
  120. /* [in] */ const BSTR ObjectPath,
  121. /* [in] */ long lFlags,
  122. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  123. /* [unique][in][out] */ IWbemCallResult __RPC_FAR *__RPC_FAR *ppCallResult) {return WBEM_E_NOT_SUPPORTED;};
  124. HRESULT STDMETHODCALLTYPE DeleteInstanceAsync(
  125. /* [in] */ const BSTR ObjectPath,
  126. /* [in] */ long lFlags,
  127. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  128. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) {return WBEM_E_NOT_SUPPORTED;};
  129. HRESULT STDMETHODCALLTYPE CreateInstanceEnum(
  130. /* [in] */ const BSTR Class,
  131. /* [in] */ long lFlags,
  132. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  133. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) {return WBEM_E_NOT_SUPPORTED;};
  134. HRESULT STDMETHODCALLTYPE CreateInstanceEnumAsync(
  135. /* [in] */ const BSTR Class,
  136. /* [in] */ long lFlags,
  137. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  138. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler);
  139. HRESULT STDMETHODCALLTYPE ExecQuery(
  140. /* [in] */ const BSTR QueryLanguage,
  141. /* [in] */ const BSTR Query,
  142. /* [in] */ long lFlags,
  143. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  144. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) {return WBEM_E_NOT_SUPPORTED;};
  145. HRESULT STDMETHODCALLTYPE ExecQueryAsync(
  146. /* [in] */ const BSTR QueryLanguage,
  147. /* [in] */ const BSTR Query,
  148. /* [in] */ long lFlags,
  149. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  150. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) {return WBEM_E_NOT_SUPPORTED;};
  151. HRESULT STDMETHODCALLTYPE ExecNotificationQuery(
  152. /* [in] */ const BSTR QueryLanguage,
  153. /* [in] */ const BSTR Query,
  154. /* [in] */ long lFlags,
  155. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  156. /* [out] */ IEnumWbemClassObject __RPC_FAR *__RPC_FAR *ppEnum) {return WBEM_E_NOT_SUPPORTED;};
  157. HRESULT STDMETHODCALLTYPE ExecNotificationQueryAsync(
  158. /* [in] */ const BSTR QueryLanguage,
  159. /* [in] */ const BSTR Query,
  160. /* [in] */ long lFlags,
  161. /* [in] */ IWbemContext __RPC_FAR *pCtx,
  162. /* [in] */ IWbemObjectSink __RPC_FAR *pResponseHandler) {return WBEM_E_NOT_SUPPORTED;};
  163. HRESULT STDMETHODCALLTYPE ExecMethod( const BSTR, const BSTR, long, IWbemContext*,
  164. IWbemClassObject*, IWbemClassObject**, IWbemCallResult**) {return WBEM_E_NOT_SUPPORTED;}
  165. HRESULT STDMETHODCALLTYPE ExecMethodAsync( const BSTR, const BSTR, long,
  166. IWbemContext*, IWbemClassObject*, IWbemObjectSink*) {return WBEM_E_NOT_SUPPORTED;}
  167. };
  168. #endif