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.

78 lines
1.9 KiB

  1. /**********************************************************************/
  2. /** Microsoft Passport **/
  3. /** Copyright(c) Microsoft Corporation, 1999 - 2001 **/
  4. /**********************************************************************/
  5. /*
  6. PassportFactory.h
  7. defines the manager factory object
  8. FILE HISTORY:
  9. */
  10. // PassportFactory.h : Declaration of the CPassportFactory
  11. #ifndef __PASSPORTFACTORY_H_
  12. #define __PASSPORTFACTORY_H_
  13. #include "resource.h" // main symbols
  14. #include "Passport.h"
  15. #include "Manager.h"
  16. #include "PassportLock.hpp"
  17. #include "PassportGuard.hpp"
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CPassportFactory
  20. class ATL_NO_VTABLE CPassportFactory :
  21. public CComObjectRootEx<CComMultiThreadModel>,
  22. public CComCoClass<CPassportFactory, &CLSID_PassportFactory>,
  23. public ISupportErrorInfo,
  24. public IDispatchImpl<IPassportFactory, &IID_IPassportFactory, &LIBID_PASSPORTLib>
  25. {
  26. public:
  27. CPassportFactory()
  28. {
  29. m_pUnkMarshaler = NULL;
  30. }
  31. public:
  32. DECLARE_REGISTRY_RESOURCEID(IDR_PASSPORTFACTORY)
  33. DECLARE_PROTECT_FINAL_CONSTRUCT()
  34. DECLARE_GET_CONTROLLING_UNKNOWN()
  35. BEGIN_COM_MAP(CPassportFactory)
  36. COM_INTERFACE_ENTRY(IPassportFactory)
  37. COM_INTERFACE_ENTRY(IDispatch)
  38. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  39. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
  40. END_COM_MAP()
  41. HRESULT FinalConstruct()
  42. {
  43. return CoCreateFreeThreadedMarshaler(
  44. GetControllingUnknown(), &m_pUnkMarshaler.p);
  45. }
  46. void FinalRelease()
  47. {
  48. m_pUnkMarshaler.Release();
  49. }
  50. CComPtr<IUnknown> m_pUnkMarshaler;
  51. // ISupportsErrorInfo
  52. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  53. // IPassportFactory
  54. public:
  55. STDMETHOD(CreatePassportManager)(/*[out,retval]*/ IDispatch** pDisp);
  56. private:
  57. };
  58. #endif //__PASSPORTFACTORY_H_