Source code of Windows XP (NT5)
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.

92 lines
2.7 KiB

  1. #include <stdio.h>
  2. #ifdef DBG
  3. #undef DBG
  4. #endif
  5. //#ifdef ASSERT
  6. //#undef ASSERT
  7. //#endif
  8. //#define ASSERT(a)
  9. //#ifdef _ASSERT
  10. //#undef _ASSERT
  11. //#endif
  12. //#define _ASSERT(a)
  13. #include <nt.h>
  14. #include <ntrtl.h>
  15. #include <nturtl.h>
  16. #include <windows.h>
  17. #include <commctrl.h> // added to "Fusionized"
  18. #include <windowsx.h>
  19. #include <wbemidl.h>
  20. #include <netcon.h>
  21. #include <netconp.h>
  22. #include <devguid.h>
  23. #include <iphlpapi.h>
  24. #include <ipnathlp.h>
  25. #include <lmerr.h>
  26. #include "hncbase.h"
  27. #include "hncdbg.h"
  28. #include "hnetcfg.h"
  29. #include "hncres.h"
  30. #include "hncstrs.h"
  31. #include "hncutil.h"
  32. #include "hncenum.h"
  33. #include "hncaenum.h"
  34. #include "hnappprt.h"
  35. #include "hnprtmap.h"
  36. #include "hnprtbnd.h"
  37. #include "hnetconn.h"
  38. #include "hnbridge.h"
  39. #include "hnbrgcon.h"
  40. #include "hnicspub.h"
  41. #include "hnicsprv.h"
  42. #include "hnfwconn.h"
  43. #include "hncfgmgr.h"
  44. #include "hnapi.h"
  45. #include "icsdclt.h"
  46. #include <NATUPnP.h>
  47. #include "UPnPNAT.h"
  48. #define DOWNLEVEL_CLIENT
  49. #include "..\..\config\dll\resourc2.h"
  50. #include "..\..\config\dll\sadlg.cpp"
  51. #include "..\..\config\dll\sautil.cpp"
  52. HINSTANCE g_hinstDll = NULL;
  53. extern HRESULT GetWANConnectionService(IInternetGateway* pInternetGateway, IUPnPService** ppWANConnectionService);
  54. HPROPSHEETPAGE GetSharedAccessPropertyPage (IInternetGateway* pInternetGateway, HWND hwndOwner)
  55. {
  56. g_hinstDll = _Module.GetResourceInstance();
  57. HPROPSHEETPAGE hpsp = NULL;
  58. CComPtr<IUPnPService> spUPS;
  59. HRESULT hr = GetWANConnectionService (pInternetGateway, &spUPS);
  60. if (spUPS) {
  61. PROPSHEETPAGE psp;
  62. ZeroMemory (&psp, sizeof(psp));
  63. psp.dwSize = sizeof(PROPSHEETPAGE);
  64. psp.lParam = (LPARAM)hwndOwner; // double-secret place to hang owner (will get wiped)
  65. hr = HNetGetSharingServicesPage (spUPS, &psp);
  66. if (SUCCEEDED(hr))
  67. hpsp = CreatePropertySheetPage (&psp);
  68. }
  69. return hpsp;
  70. }
  71. // stubs (these are referenced, but not called via this code path)
  72. HRESULT CFirewallLoggingDialog_FinalRelease(CFirewallLoggingDialog* pThis) { return S_OK; }
  73. HRESULT CICMPSettingsDialog_FinalRelease(CICMPSettingsDialog* pThis) { return S_OK; }
  74. INT_PTR CALLBACK CFirewallLoggingDialog_StaticDlgProc(HWND hwnd, UINT unMsg, WPARAM wparam, LPARAM lparam) { return 0; }
  75. INT_PTR CALLBACK CICMPSettingsDialog_StaticDlgProc(HWND hwnd, UINT unMsg, WPARAM wparam, LPARAM lparam ) { return 0; }
  76. HRESULT CFirewallLoggingDialog_Init(CFirewallLoggingDialog* pThis, IHNetCfgMgr* pHomenetConfigManager) { return S_OK; }
  77. HRESULT CICMPSettingsDialog_Init(CICMPSettingsDialog* pThis, IHNetConnection* pHomenetConnection) { return S_OK; }
  78. STDAPI_(VOID) NcFreeNetconProperties (NETCON_PROPERTIES* pProps) { return; }
  79. DWORD RasGetErrorString(UINT uErrorValue, LPTSTR lpszErrorString, DWORD cBufSize) { return -1; }