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.

96 lines
2.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // DataChannel.h : Declaration of the CDataChannel
  4. //
  5. // JPDup 2000.12.10
  6. #pragma once
  7. #include "resource.h" // main symbols
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CDataChannel
  10. //
  11. class ATL_NO_VTABLE CDataChannel :
  12. public CComObjectRootEx<CComMultiThreadModel>,
  13. public CComCoClass<CDataChannel, &CLSID_DataChannel>,
  14. public IDataChannel
  15. {
  16. public:
  17. CDataChannel()
  18. {
  19. MYTRACE_ENTER_NOSHOWEXIT("CDataChannel::NEW");
  20. m_hCreateEvent=NULL;
  21. m_hDeleteEvent=NULL;
  22. }
  23. ~CDataChannel()
  24. {
  25. MYTRACE_ENTER_NOSHOWEXIT("CDataChannel::DELETE");
  26. if ( m_hCreateEvent )
  27. CloseHandle((HANDLE)m_hCreateEvent);
  28. if ( m_hDeleteEvent )
  29. CloseHandle((HANDLE)m_hDeleteEvent);
  30. }
  31. DECLARE_REGISTRY_RESOURCEID(IDR_DATACHANNEL)
  32. DECLARE_NOT_AGGREGATABLE(CDataChannel)
  33. BEGIN_COM_MAP(CDataChannel)
  34. COM_INTERFACE_ENTRY(IDataChannel)
  35. END_COM_MAP()
  36. //
  37. // IDataChannel
  38. //
  39. public:
  40. STDMETHODIMP GetSessionDeletionEventHandle(
  41. OUT HANDLE* pHandle
  42. );
  43. STDMETHODIMP GetSessionCreationEventHandle(
  44. OUT HANDLE* pHandle
  45. );
  46. STDMETHODIMP GetChannelProperties(
  47. OUT ALG_DATA_CHANNEL_PROPERTIES** ppProperties
  48. );
  49. STDMETHODIMP Cancel();
  50. //
  51. // Properties
  52. //
  53. ALG_DATA_CHANNEL_PROPERTIES m_Properties;
  54. //
  55. // Used to cache the last arguments used to create the redirect
  56. // will be use to cancel the redirect
  57. //
  58. ULONG m_ulFlags;
  59. ULONG m_ulSourceAddress;
  60. USHORT m_usSourcePort;
  61. ULONG m_ulDestinationAddress;
  62. USHORT m_usDestinationPort;
  63. ULONG m_ulNewSourceAddress;
  64. USHORT m_usNewSourcePort;
  65. ULONG m_ulNewDestinationAddress;
  66. USHORT m_usNewDestinationPort;
  67. ULONG m_ulRestrictAdapterIndex;
  68. HANDLE m_hCreateEvent;
  69. HANDLE m_hDeleteEvent;
  70. };