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.

103 lines
2.5 KiB

  1. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Microsoft Windows
  3. Copyright (C) Microsoft Corporation, 1995 - 1999.
  4. File: EKUs.h
  5. Content: Declaration of CEKUs.
  6. History: 11-15-99 dsie created
  7. ------------------------------------------------------------------------------*/
  8. #ifndef __EKUs_H_
  9. #define __EKUs_H_
  10. #include "Resource.h"
  11. #include "Debug.h"
  12. #include "CopyItem.h"
  13. #include "EKU.h"
  14. //
  15. // typdefs to make life easier.
  16. //
  17. typedef std::map<CComBSTR, CComPtr<IEKU> > EKUMap;
  18. typedef CComEnumOnSTL<IEnumVARIANT, &IID_IEnumVARIANT, VARIANT, _CopyMapItem<IEKU>, EKUMap> EKUEnum;
  19. typedef ICollectionOnSTLImpl<IEKUs, EKUMap, VARIANT, _CopyMapItem<IEKU>, EKUEnum> IEKUsCollection;
  20. ////////////////////////////////////////////////////////////////////////////////
  21. //
  22. // Exported functions.
  23. //
  24. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  25. Function : CreateEKUsObject
  26. Synopsis : Create a IEKUs collection object and populate the collection with
  27. EKUs from the specified certificate.
  28. Parameter: PCERT_ENHKEY_USAGE pUsage - Pointer to CERT_ENHKEY_USAGE.
  29. IEKUs ** ppIEKUs - Pointer to pointer IEKUs object.
  30. Remark :
  31. ------------------------------------------------------------------------------*/
  32. HRESULT CreateEKUsObject (PCERT_ENHKEY_USAGE pUsage,
  33. IEKUs ** ppIEKUs);
  34. ////////////////////////////////////////////////////////////////////////////////
  35. //
  36. // CEKUs
  37. //
  38. class ATL_NO_VTABLE CEKUs :
  39. public CComObjectRootEx<CComMultiThreadModel>,
  40. public CComCoClass<CEKUs, &CLSID_EKUs>,
  41. public ICAPICOMError<CEKUs, &IID_IEKUs>,
  42. public IDispatchImpl<IEKUsCollection, &IID_IEKUs, &LIBID_CAPICOM,
  43. CAPICOM_MAJOR_VERSION, CAPICOM_MINOR_VERSION>
  44. {
  45. public:
  46. CEKUs()
  47. {
  48. }
  49. DECLARE_NO_REGISTRY()
  50. DECLARE_GET_CONTROLLING_UNKNOWN()
  51. DECLARE_PROTECT_FINAL_CONSTRUCT()
  52. BEGIN_COM_MAP(CEKUs)
  53. COM_INTERFACE_ENTRY(IEKUs)
  54. COM_INTERFACE_ENTRY(IDispatch)
  55. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  56. END_COM_MAP()
  57. BEGIN_CATEGORY_MAP(CEKUs)
  58. END_CATEGORY_MAP()
  59. //
  60. // IEKUs
  61. //
  62. public:
  63. //
  64. // These are the only ones that we need to implemented, others will be
  65. // handled by ATL ICollectionOnSTLImpl.
  66. //
  67. //
  68. // None COM functions.
  69. //
  70. STDMETHOD(Init)
  71. (PCERT_ENHKEY_USAGE pUsage);
  72. };
  73. #endif //__EKUs_H_