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.

91 lines
2.0 KiB

  1. // PrimaryControlChannel.h : Declaration of the CPrimaryControlChannel
  2. #pragma once
  3. #include "CollectionRedirects.h"
  4. #include "resource.h" // main symbols
  5. #include <list>
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CPrimaryControlChannel
  8. class ATL_NO_VTABLE CPrimaryControlChannel :
  9. public CComObjectRootEx<CComMultiThreadModel>,
  10. public CComCoClass<CPrimaryControlChannel, &CLSID_PrimaryControlChannel>,
  11. public IPrimaryControlChannel
  12. {
  13. public:
  14. DECLARE_REGISTRY_RESOURCEID(IDR_PRIMARYCONTROLCHANNEL)
  15. DECLARE_NOT_AGGREGATABLE(CPrimaryControlChannel)
  16. DECLARE_PROTECT_FINAL_CONSTRUCT()
  17. BEGIN_COM_MAP(CPrimaryControlChannel)
  18. COM_INTERFACE_ENTRY(IPrimaryControlChannel)
  19. END_COM_MAP()
  20. //
  21. // IPrimaryControlChannel - Methods
  22. //
  23. public:
  24. STDMETHODIMP Cancel();
  25. STDMETHODIMP GetChannelProperties(
  26. ALG_PRIMARY_CHANNEL_PROPERTIES ** ppProperties
  27. );
  28. STDMETHODIMP GetOriginalDestinationInformation(
  29. ULONG ulSourceAddress,
  30. USHORT usSourcePort,
  31. ULONG * pulOriginalDestinationAddress,
  32. USHORT * pusOriginalDestinationPort,
  33. IAdapterInfo ** ppReceiveAdapter
  34. );
  35. //
  36. // Methods not part of the Interface
  37. //
  38. // Set the redirect and return the hCookie associated with the new redirect
  39. HRESULT
  40. SetRedirect(
  41. ALG_ADAPTER_TYPE eAdapterType,
  42. ULONG nAdapterIndex,
  43. ULONG nAdapterAddress
  44. );
  45. //
  46. HRESULT
  47. CancelRedirects()
  48. {
  49. return m_CollectionRedirects.RemoveAll();
  50. }
  51. //
  52. HRESULT
  53. CancelRedirectsForAdapter(
  54. ULONG nAdapterIndex
  55. );
  56. HRESULT
  57. CreateInboundRedirect(
  58. ULONG nAdapterIndex
  59. );
  60. //
  61. // Properties
  62. //
  63. ALG_PRIMARY_CHANNEL_PROPERTIES m_Properties;
  64. CCollectionRedirects m_CollectionRedirects;
  65. };