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.

132 lines
4.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: manage.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #include "legacy.h"
  11. #include "cscomres.h"
  12. // LEGACY policy modules don't have a CCertManagePolicyModule -- create one for them!
  13. // They only have one name: "CertificateAuthority.Policy", so they only need one
  14. // manage: "CertificateAuthority.PolicyManage"
  15. // Once we create this, all legacy modules will be displayed through this managemodule.
  16. class CCertManagePolicyModule:
  17. public CComDualImpl<ICertManageModule, &IID_ICertManageModule, &LIBID_CERTPOLICYLib>,
  18. public CComObjectRoot,
  19. public CComCoClass<CCertManagePolicyModule, &CLSID_CCertManagePolicyModule>
  20. {
  21. public:
  22. CCertManagePolicyModule() {};
  23. ~CCertManagePolicyModule() {};
  24. BEGIN_COM_MAP(CCertManagePolicyModule)
  25. COM_INTERFACE_ENTRY(IDispatch)
  26. COM_INTERFACE_ENTRY(ICertManageModule)
  27. END_COM_MAP()
  28. DECLARE_NOT_AGGREGATABLE(CCertManagePolicyModule)
  29. // Remove the comment from the line above if you don't want your object to
  30. // support aggregation. The default is to support it
  31. #define WSZ_LEGACY_POLICYPREFIX L"CertificateAuthority"
  32. #define WSZ_LEGACY_POLICYMANAGE WSZ_LEGACY_POLICYPREFIX wszCERTMANAGEPOLICY_POSTFIX
  33. DECLARE_REGISTRY(
  34. CCertManagePolicyModule,
  35. WSZ_LEGACY_POLICYMANAGE TEXT(".1"),
  36. WSZ_LEGACY_POLICYMANAGE,
  37. IDS_CERTMANAGEPOLICYMODULE_DESC,
  38. THREADFLAGS_BOTH)
  39. // ICertManageModule
  40. public:
  41. STDMETHOD (GetProperty) (
  42. /* [in] */ const BSTR strConfig,
  43. /* [in] */ BSTR strStorageLocation,
  44. /* [in] */ BSTR strPropertyName,
  45. /* [in] */ LONG dwFlags,
  46. /* [retval][out] */ VARIANT __RPC_FAR *pvarProperty);
  47. STDMETHOD (SetProperty)(
  48. /* [in] */ const BSTR strConfig,
  49. /* [in] */ BSTR strStorageLocation,
  50. /* [in] */ BSTR strPropertyName,
  51. /* [in] */ LONG dwFlags,
  52. /* [in] */ VARIANT const __RPC_FAR *pvarProperty);
  53. STDMETHOD (Configure)(
  54. /* [in] */ const BSTR strConfig,
  55. /* [in] */ BSTR strStorageLocation,
  56. /* [in] */ LONG dwFlags);
  57. };
  58. // LEGACY exit modules don't have a CCertManageExitModule -- create one for them!
  59. // They only have one name: "CertificateAuthority.Exit", so they only need one
  60. // manage: "CertificateAuthority.ExitManage"
  61. // Once we create this, all legacy modules will be displayed through this managemodule.
  62. class CCertManageExitModule:
  63. public CComDualImpl<ICertManageModule, &IID_ICertManageModule, &LIBID_CERTPOLICYLib>,
  64. public CComObjectRoot,
  65. public CComCoClass<CCertManageExitModule, &CLSID_CCertManageExitModule>
  66. {
  67. public:
  68. CCertManageExitModule() {};
  69. ~CCertManageExitModule() {};
  70. BEGIN_COM_MAP(CCertManageExitModule)
  71. COM_INTERFACE_ENTRY(IDispatch)
  72. COM_INTERFACE_ENTRY(ICertManageModule)
  73. END_COM_MAP()
  74. DECLARE_NOT_AGGREGATABLE(CCertManageExitModule)
  75. // Remove the comment from the line above if you don't want your object to
  76. // support aggregation. The default is to support it
  77. #define WSZ_LEGACY_EXITPREFIX L"CertificateAuthority"
  78. #define WSZ_LEGACY_EXITMANAGE WSZ_LEGACY_EXITPREFIX wszCERTMANAGEEXIT_POSTFIX
  79. DECLARE_REGISTRY(
  80. CCertManageExitModule,
  81. WSZ_LEGACY_EXITMANAGE TEXT(".1"),
  82. WSZ_LEGACY_EXITMANAGE,
  83. IDS_CERTMANAGEEXITMODULE_DESC,
  84. THREADFLAGS_BOTH)
  85. // ICertManageModule
  86. public:
  87. STDMETHOD (GetProperty) (
  88. /* [in] */ const BSTR strConfig,
  89. /* [in] */ BSTR strStorageLocation,
  90. /* [in] */ BSTR strPropertyName,
  91. /* [in] */ LONG dwFlags,
  92. /* [retval][out] */ VARIANT __RPC_FAR *pvarProperty);
  93. STDMETHOD (SetProperty)(
  94. /* [in] */ const BSTR strConfig,
  95. /* [in] */ BSTR strStorageLocation,
  96. /* [in] */ BSTR strPropertyName,
  97. /* [in] */ LONG dwFlags,
  98. /* [in] */ VARIANT const __RPC_FAR *pvarProperty);
  99. STDMETHOD (Configure)(
  100. /* [in] */ const BSTR strConfig,
  101. /* [in] */ BSTR strStorageLocation,
  102. /* [in] */ LONG dwFlags);
  103. };