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.

139 lines
4.1 KiB

  1. /*++
  2. Copyright (c) 2000-2001 Microsoft Corporation
  3. Module Name:
  4. SecConLib.h
  5. Abstract:
  6. Implementation of:
  7. CSecConLib
  8. Author:
  9. Brent R. Midwood Apr-2002
  10. Revision History:
  11. --*/
  12. #ifndef __secconlib_h__
  13. #define __secconlib_h__
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17. #include <iadmw.h>
  18. #include "SafeCS.h"
  19. #include <atlbase.h>
  20. class CSecConLib
  21. {
  22. private:
  23. CSafeAutoCriticalSection m_SafeCritSec;
  24. CComPtr<IMSAdminBase> m_spIABase;
  25. bool m_bInit;
  26. HRESULT InternalInitIfNecessary();
  27. HRESULT GetMultiSZPropVal(
  28. LPCWSTR wszPath,
  29. DWORD dwMetaID,
  30. WCHAR **ppBuffer,
  31. DWORD *dwBufSize);
  32. HRESULT SetMultiSZPropVal(
  33. LPCWSTR wszPath,
  34. DWORD dwMetaID,
  35. WCHAR *pBuffer,
  36. DWORD dwBufSize);
  37. HRESULT StatusExtensionFile(
  38. /* [in] */ bool bEnable,
  39. /* [in] */ LPCWSTR wszExFile,
  40. /* [in] */ LPCWSTR wszPath);
  41. HRESULT StatusWServEx(
  42. /* [in] */ bool bEnable,
  43. /* [in] */ LPCWSTR wszWServEx,
  44. /* [in] */ LPCWSTR wszPath);
  45. public:
  46. CSecConLib();
  47. CSecConLib(
  48. IMSAdminBase* pIABase);
  49. virtual ~CSecConLib();
  50. HRESULT STDMETHODCALLTYPE EnableApplication(
  51. /* [in] */ LPCWSTR wszApplication,
  52. /* [in] */ LPCWSTR wszPath);
  53. HRESULT STDMETHODCALLTYPE RemoveApplication(
  54. /* [in] */ LPCWSTR wszApplication,
  55. /* [in] */ LPCWSTR wszPath);
  56. HRESULT STDMETHODCALLTYPE ListApplications(
  57. /* [in] */ LPCWSTR wszPath,
  58. /* [out] */ WCHAR **pszBuffer, // MULTI_SZ - allocated inside ListApplications, caller should delete
  59. /* [out] */ DWORD *pdwBufferSize); // length includes ending double null
  60. HRESULT STDMETHODCALLTYPE QueryGroupIDStatus(
  61. /* [in] */ LPCWSTR wszPath,
  62. /* [in] */ LPCWSTR wszGroupID,
  63. /* [out] */ WCHAR **pszBuffer, // MULTI_SZ - allocated inside QueryGroupIDStatus, caller should delete
  64. /* [out] */ DWORD *pdwBufferSize); // length includes ending double null
  65. HRESULT STDMETHODCALLTYPE AddDependency(
  66. /* [in] */ LPCWSTR wszApplication,
  67. /* [in] */ LPCWSTR wszGroupID,
  68. /* [in] */ LPCWSTR wszPath);
  69. HRESULT STDMETHODCALLTYPE RemoveDependency(
  70. /* [in] */ LPCWSTR wszApplication,
  71. /* [in] */ LPCWSTR wszGroupID,
  72. /* [in] */ LPCWSTR wszPath);
  73. HRESULT STDMETHODCALLTYPE EnableWebServiceExtension(
  74. /* [in] */ LPCWSTR wszExtension,
  75. /* [in] */ LPCWSTR wszPath);
  76. HRESULT STDMETHODCALLTYPE DisableWebServiceExtension(
  77. /* [in] */ LPCWSTR wszExtension,
  78. /* [in] */ LPCWSTR wszPath);
  79. HRESULT STDMETHODCALLTYPE ListWebServiceExtensions(
  80. /* [in] */ LPCWSTR wszPath,
  81. /* [out] */ WCHAR **pszBuffer, // MULTI_SZ - allocated in here, caller should delete
  82. /* [out] */ DWORD *pdwBufferSize); // length includes double null
  83. HRESULT STDMETHODCALLTYPE EnableExtensionFile(
  84. /* [in] */ LPCWSTR wszExFile,
  85. /* [in] */ LPCWSTR wszPath);
  86. HRESULT STDMETHODCALLTYPE DisableExtensionFile(
  87. /* [in] */ LPCWSTR wszExFile,
  88. /* [in] */ LPCWSTR wszPath);
  89. HRESULT STDMETHODCALLTYPE AddExtensionFile(
  90. /* [in] */ LPCWSTR bstrExtensionFile,
  91. /* [in] */ bool bAccess,
  92. /* [in] */ LPCWSTR bstrGroupID,
  93. /* [in] */ bool bCanDelete,
  94. /* [in] */ LPCWSTR bstrDescription,
  95. /* [in] */ LPCWSTR wszPath);
  96. HRESULT STDMETHODCALLTYPE DeleteExtensionFileRecord(
  97. /* [in] */ LPCWSTR wszExFile,
  98. /* [in] */ LPCWSTR wszPath);
  99. HRESULT STDMETHODCALLTYPE ListExtensionFiles(
  100. /* [in] */ LPCWSTR wszPath,
  101. /* [out] */ WCHAR **pszBuffer, // MULTI_SZ - allocated in here, caller should delete
  102. /* [out] */ DWORD *pdwBufferSize); // length includes double null
  103. };
  104. #endif // __secconlib_h__