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.

111 lines
2.4 KiB

  1. #include "pch.h"
  2. #pragma hdrstop
  3. #include "CNATDynamicPortMappingService.h"
  4. CNATDynamicPortMappingService::CNATDynamicPortMappingService()
  5. {
  6. m_pEventSink = NULL;
  7. m_pHNetConnection = NULL;
  8. }
  9. HRESULT CNATDynamicPortMappingService::FinalConstruct()
  10. {
  11. HRESULT hr = S_OK;
  12. return hr;
  13. }
  14. HRESULT CNATDynamicPortMappingService::FinalRelease()
  15. {
  16. HRESULT hr = S_OK;
  17. if(NULL != m_pHNetConnection)
  18. {
  19. m_pHNetConnection->Release();
  20. }
  21. return hr;
  22. }
  23. HRESULT CNATDynamicPortMappingService::Initialize(IHNetConnection* pHNetConnection)
  24. {
  25. HRESULT hr = S_OK;
  26. m_pHNetConnection = pHNetConnection;
  27. m_pHNetConnection->AddRef();
  28. return hr;
  29. }
  30. HRESULT CNATDynamicPortMappingService::Advise(IUPnPEventSink* pesSubscriber)
  31. {
  32. HRESULT hr = S_OK;
  33. m_pEventSink = pesSubscriber;
  34. m_pEventSink->AddRef();
  35. return hr;
  36. }
  37. HRESULT CNATDynamicPortMappingService::Unadvise(IUPnPEventSink* pesSubscriber)
  38. {
  39. HRESULT hr = S_OK;
  40. m_pEventSink->Release();
  41. m_pEventSink = NULL;
  42. return hr;
  43. }
  44. HRESULT CNATDynamicPortMappingService::get_DynamicPublicIP(BSTR* pDynamicPublicIP)
  45. {
  46. *pDynamicPublicIP = NULL;
  47. return E_UNEXPECTED;
  48. }
  49. HRESULT CNATDynamicPortMappingService::get_DynamicPort(ULONG* pulDynamicPort)
  50. {
  51. return E_UNEXPECTED;
  52. }
  53. HRESULT CNATDynamicPortMappingService::get_DynamicProtocol(BSTR* pDynamicProtocol)
  54. {
  55. *pDynamicProtocol = NULL;
  56. return E_UNEXPECTED;
  57. }
  58. HRESULT CNATDynamicPortMappingService::get_DynamicPrivateIP(BSTR* pDynamicPrivateIP)
  59. {
  60. *pDynamicPrivateIP = NULL;
  61. return E_UNEXPECTED;
  62. }
  63. HRESULT CNATDynamicPortMappingService::get_DynamicLeaseDuration(ULONG* pulDynamicLeaseDuration)
  64. {
  65. return E_UNEXPECTED;
  66. }
  67. HRESULT CNATDynamicPortMappingService::CreateDynamicPortMapping(BSTR DynamicPublicIP, ULONG ulDynamicPort, BSTR DynamicProtocol, BSTR DynamicPrivateIP, BSTR DynamicLeaseDuration)
  68. {
  69. HRESULT hr = S_OK;
  70. return hr;
  71. }
  72. HRESULT CNATDynamicPortMappingService::DeleteDynamicPortMapping(BSTR DynamicPublicIP, ULONG ulDynamicPort, BSTR DynamicProtocol)
  73. {
  74. HRESULT hr = S_OK;
  75. return hr;
  76. }
  77. HRESULT CNATDynamicPortMappingService::ExtendDynamicPortMapping(BSTR DynamicPublicIP, ULONG ulDynamicPort, BSTR DynamicProtocol, ULONG ulDynamicLeaseDuration)
  78. {
  79. HRESULT hr = S_OK;
  80. return hr;
  81. }