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.

72 lines
2.1 KiB

  1. //
  2. // axhostwnd.h: TscActiveX control host window
  3. //
  4. // Copyright Microsoft Corportation 2000
  5. // (nadima)
  6. //
  7. #ifndef _axhostwnd_h_
  8. #define _axhostwnd_h_
  9. #include "olecli.h"
  10. #include "evsink.h"
  11. #define AXHOST_SUCCESS 1
  12. #define ERR_AXHOST_DLLNOTFOUND -1
  13. #define ERR_AXHOST_VERSIONMISMATCH -2
  14. #define ERR_AXHOST_ERROR -3
  15. typedef DWORD (STDAPICALLTYPE * LPFNGETTSCCTLVER) (VOID);
  16. class CAxHostWnd : public IUnknown
  17. {
  18. public:
  19. CAxHostWnd(CContainerWnd* pParentWnd);
  20. ~CAxHostWnd();
  21. // IUnknown methods
  22. STDMETHODIMP QueryInterface(THIS_ REFIID riid, LPVOID *ppvObj);
  23. STDMETHODIMP_(ULONG) AddRef(THIS);
  24. STDMETHODIMP_(ULONG) Release(THIS);
  25. BOOL Init();
  26. BOOL CreateHostWnd(HWND hwndParent, HINSTANCE hInst);
  27. INT CreateControl(IMsRdpClient** ppTscCtl);
  28. BOOL Cleanup();
  29. HWND GetHwnd();
  30. IMsRdpClient* GetTscCtl();
  31. static LRESULT CALLBACK StaticAxHostWndProc(HWND hwnd,
  32. UINT uMsg,
  33. WPARAM wParam,
  34. LPARAM lParam);
  35. LRESULT CALLBACK AxHostWndProc(HWND hwnd,
  36. UINT uMsg,
  37. WPARAM wParam,
  38. LPARAM lParam);
  39. private:
  40. LONG _cRef;// Reference count
  41. HWND _hWnd;
  42. IMsRdpClient* _pTsc;
  43. DWORD _dwConCookie;
  44. // Module handle for the control library
  45. HMODULE _hLib;
  46. // pointer to EventSink for this container
  47. CEventSink* _piEventSink;
  48. // pointer to OleClientSite for this container
  49. COleClientSite* _piOleClientSite;
  50. // pointer to OleInPlaceSiteEx for this container
  51. COleInPlaceSiteEx* _piOleInPlaceSiteEx;
  52. // pointer to object's IOleObject
  53. IOleObject* _piOleObject;
  54. // pointer to object's IOleInPlaceActiveObject
  55. IOleInPlaceActiveObject* _piOleInPlaceActiveObject;
  56. // pointer to object's IOleInPlaceObject
  57. IOleInPlaceObject* _piOleInPlaceObject;
  58. CContainerWnd* _pParentWnd;
  59. };
  60. #endif //_axhostwnd_h_