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.

54 lines
1.3 KiB

  1. // Copyright (c) Microsoft Corporation
  2. // CFreeThreaded.h : Declaration of the CFreeThreaded
  3. #ifndef CFREETHREADED_H_
  4. #define CFREETHREADED_H_
  5. #pragma once
  6. #include "resource.h" // main symbols
  7. #include "sxstest_idl.h"
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CFreeThreaded
  10. class ATL_NO_VTABLE CFreeThreaded :
  11. public CComObjectRootEx<CComMultiThreadModel>,
  12. public CComCoClass<CFreeThreaded, &CLSID_CSxsTest_FreeThreaded>,
  13. public ISxsTest_FreeThreaded
  14. {
  15. public:
  16. CFreeThreaded()
  17. {
  18. m_pUnkMarshaler = NULL;
  19. PrintComctl32Path("CFreeThreaded");
  20. }
  21. DECLARE_REGISTRY_RESOURCEID(IDR_CFREETHREADED)
  22. DECLARE_AGGREGATABLE(CFreeThreaded)
  23. DECLARE_GET_CONTROLLING_UNKNOWN()
  24. DECLARE_PROTECT_FINAL_CONSTRUCT()
  25. BEGIN_COM_MAP(CFreeThreaded)
  26. COM_INTERFACE_ENTRY(ISxsTest_FreeThreaded)
  27. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
  28. END_COM_MAP()
  29. HRESULT FinalConstruct()
  30. {
  31. return CoCreateFreeThreadedMarshaler(
  32. GetControllingUnknown(), &m_pUnkMarshaler.p);
  33. }
  34. void FinalRelease()
  35. {
  36. m_pUnkMarshaler.Release();
  37. }
  38. CComPtr<IUnknown> m_pUnkMarshaler;
  39. // ICFreeThreaded
  40. public:
  41. };
  42. #endif //CFREETHREADED_H_