[NETCFGX] Add the most simple property sheet provider for network adapters
authorEric Kohl <eric.kohl@reactos.org>
Wed, 26 Sep 2018 21:48:01 +0000 (23:48 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Wed, 26 Sep 2018 21:49:02 +0000 (23:49 +0200)
- Switch to WINE debug code.
- Build the UNICODE version of the DLL by default.
- Add the most simple property sheet provider.

31 files changed:
dll/win32/netcfgx/CMakeLists.txt
dll/win32/netcfgx/lang/bg-BG.rc
dll/win32/netcfgx/lang/cs-CZ.rc
dll/win32/netcfgx/lang/da-DK.rc
dll/win32/netcfgx/lang/de-DE.rc
dll/win32/netcfgx/lang/el-GR.rc
dll/win32/netcfgx/lang/en-US.rc
dll/win32/netcfgx/lang/es-ES.rc
dll/win32/netcfgx/lang/fr-FR.rc
dll/win32/netcfgx/lang/he-IL.rc
dll/win32/netcfgx/lang/hu-HU.rc
dll/win32/netcfgx/lang/id-ID.rc
dll/win32/netcfgx/lang/it-IT.rc
dll/win32/netcfgx/lang/ja-JP.rc
dll/win32/netcfgx/lang/nl-NL.rc
dll/win32/netcfgx/lang/no-NO.rc
dll/win32/netcfgx/lang/pl-PL.rc
dll/win32/netcfgx/lang/ro-RO.rc
dll/win32/netcfgx/lang/ru-RU.rc
dll/win32/netcfgx/lang/sk-SK.rc
dll/win32/netcfgx/lang/sq-AL.rc
dll/win32/netcfgx/lang/sv-SE.rc
dll/win32/netcfgx/lang/tr-TR.rc
dll/win32/netcfgx/lang/uk-UA.rc
dll/win32/netcfgx/lang/zh-CN.rc
dll/win32/netcfgx/lang/zh-TW.rc
dll/win32/netcfgx/netcfgx.c
dll/win32/netcfgx/netcfgx.spec
dll/win32/netcfgx/precomp.h
dll/win32/netcfgx/propertypage.c [new file with mode: 0644]
dll/win32/netcfgx/resource.h

index a2816b2..f192cc8 100644 (file)
@@ -10,6 +10,7 @@ list(APPEND SOURCE
     netcfg_iface.c
     inetcfgcomp_iface.c
     tcpipconf_notify.c
+    propertypage.c
     precomp.h
     ${CMAKE_CURRENT_BINARY_DIR}/netcfgx_stubs.c)
 
@@ -18,7 +19,7 @@ add_library(netcfgx SHARED
     netcfgx.rc
     ${CMAKE_CURRENT_BINARY_DIR}/netcfgx.def)
 
-set_module_type(netcfgx win32dll)
+set_module_type(netcfgx win32dll UNICODE)
 target_link_libraries(netcfgx uuid wine)
 add_importlibs(netcfgx rpcrt4 setupapi advapi32 iphlpapi dhcpcsvc ole32 user32 comctl32 ws2_32 msvcrt kernel32 ntdll)
 add_pch(netcfgx precomp.h SOURCE)
index 2220322..03b8e8a 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Отказ", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Мрежoвo свързване"
index 3dee4ad..007a4e1 100644 (file)
@@ -201,6 +201,13 @@ BEGIN
     PUSHBUTTON "Storno", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Síťové připojení"
index 702a991..5c0d0a5 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index 9824687..19479ce 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Abbrechen", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Erweitert"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "LAN-Verbindung"
index dc577ad..3bb1fc0 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index 1ae3d47..feea171 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index 924a0b0..6ea5be2 100644 (file)
@@ -197,6 +197,13 @@ BEGIN
     PUSHBUTTON "Cancelar", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Conexión de red"
index 946d51f..b696364 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Annuler", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Connexion réseau"
index 97ebe3d..3471618 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "ביטול", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "חיבור רשת"
index d3d1d50..d89e15d 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index dbe7dae..5bf8d0b 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index c5a3e95..1be24d1 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Annulla", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Connessioni di rete"
index 7a0f935..f546e31 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index 5d50ce1..299c0fe 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index 6a6d195..4b6b0d5 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Avbryt", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Nettverk tilkobling"
index df75350..8ea8cf1 100644 (file)
@@ -202,6 +202,13 @@ BEGIN
     PUSHBUTTON "Anuluj", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Połączenie sieciowe"
index e9e0ce8..299eaec 100644 (file)
@@ -201,6 +201,13 @@ BEGIN
     PUSHBUTTON "A&nulează", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Conexiune de rețea"
index 590ad88..cfecc1b 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Отмена", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Сетевое подключение"
index a43de31..7ea1f8e 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Zrušiť", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index 21138cf..261a22a 100644 (file)
@@ -200,6 +200,13 @@ BEGIN
     PUSHBUTTON "Anulo", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Lidhje rrjeti"
index f7cf0fe..dd2c350 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Network Connection"
index 8e5edda..3dcaa7a 100644 (file)
@@ -197,6 +197,13 @@ BEGIN
     PUSHBUTTON "İptal", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Ağ Bağlantısı"
index 2cbd712..c4a0d1d 100644 (file)
@@ -195,6 +195,13 @@ BEGIN
     PUSHBUTTON "Скасувати", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "Мережне підключення"
index aa7c70f..755762a 100644 (file)
@@ -203,6 +203,13 @@ BEGIN
     PUSHBUTTON "取消", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "网络连接"
index ec52ad4..82f1cc5 100644 (file)
@@ -203,6 +203,13 @@ BEGIN
     PUSHBUTTON "取消", IDCANCEL, 120, 30, 50, 14, WS_TABSTOP
 END
 
+IDD_NET_PROPERTY_DLG DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Advanced"
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
 STRINGTABLE
 BEGIN
     IDS_NET_CONNECT "網路連線"
index 13ae094..7438632 100644 (file)
@@ -15,8 +15,6 @@
 #include <ndk/iofuncs.h>
 #include <ndk/rtlfuncs.h>
 
-#define NDEBUG
-#include <debug.h>
 
 HINSTANCE netcfgx_hInstance;
 const GUID CLSID_TcpipConfigNotifyObject      = {0xA907657F, 0x6FDF, 0x11D0, {0x8E, 0xFB, 0x00, 0xC0, 0x4F, 0xD9, 0x12, 0xB2}};
@@ -244,7 +242,7 @@ InstallNetDevice(
     /* Get Instance ID */
     if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, &dwLength))
     {
-        DPRINT("SetupDiGetDeviceInstanceIdW() returned TRUE. FALSE expected\n");
+        ERR("SetupDiGetDeviceInstanceIdW() returned TRUE. FALSE expected\n");
         rc = ERROR_GEN_FAILURE;
         goto cleanup;
     }
@@ -252,7 +250,7 @@ InstallNetDevice(
     InstanceId = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR));
     if (!InstanceId)
     {
-        DPRINT("HeapAlloc() failed\n");
+        ERR("HeapAlloc() failed\n");
         rc = ERROR_NOT_ENOUGH_MEMORY;
         goto cleanup;
     }
@@ -260,7 +258,7 @@ InstallNetDevice(
     if (!SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, InstanceId, dwLength, NULL))
     {
         rc = GetLastError();
-        DPRINT("SetupDiGetDeviceInstanceIdW() failed with error 0x%lx\n", rc);
+        ERR("SetupDiGetDeviceInstanceIdW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -268,7 +266,7 @@ InstallNetDevice(
     DeviceName = HeapAlloc(GetProcessHeap(), 0, (wcslen(L"\\Device\\") + wcslen(UuidString)) * sizeof(WCHAR) + sizeof(UNICODE_NULL));
     if (!DeviceName)
     {
-        DPRINT("HeapAlloc() failed\n");
+        ERR("HeapAlloc() failed\n");
         rc = ERROR_NOT_ENOUGH_MEMORY;
         goto cleanup;
     }
@@ -279,7 +277,7 @@ InstallNetDevice(
     ExportName = HeapAlloc(GetProcessHeap(), 0, (wcslen(L"\\Device\\Tcpip_") + wcslen(UuidString)) * sizeof(WCHAR) + sizeof(UNICODE_NULL));
     if (!ExportName)
     {
-        DPRINT("HeapAlloc() failed\n");
+        ERR("HeapAlloc() failed\n");
         rc = ERROR_NOT_ENOUGH_MEMORY;
         goto cleanup;
     }
@@ -290,14 +288,14 @@ InstallNetDevice(
     rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hKey, NULL);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegCreateKeyExW(hKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hNetworkKey, NULL);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
     RegCloseKey(hKey);
@@ -306,7 +304,7 @@ InstallNetDevice(
     rc = RegCreateKeyExW(hNetworkKey, L"Parameters\\Tcpip", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, NULL);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
     RegCloseKey(hNetworkKey);
@@ -315,21 +313,21 @@ InstallNetDevice(
     rc = RegSetValueExW(hKey, L"DefaultGateway", 0, REG_SZ, (const BYTE*)L"0.0.0.0", (wcslen(L"0.0.0.0") + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hKey, L"IPAddress", 0, REG_SZ, (const BYTE*)L"0.0.0.0", (wcslen(L"0.0.0.0") + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hKey, L"SubnetMask", 0, REG_SZ, (const BYTE*)L"0.0.0.0", (wcslen(L"0.0.0.0") + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -337,7 +335,7 @@ InstallNetDevice(
     rc = RegSetValueExW(hKey, L"EnableDHCP", 0, REG_DWORD, (const BYTE*)&dwValue, sizeof(DWORD));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
     RegCloseKey(hKey);
@@ -355,21 +353,21 @@ InstallNetDevice(
     {
         hKey = NULL;
         rc = GetLastError();
-        DPRINT1("SetupDiCreateDevRegKeyW() failed with error 0x%lx\n", rc);
+        ERR("SetupDiCreateDevRegKeyW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hKey, L"NetCfgInstanceId", 0, REG_SZ, (const BYTE*)UuidString, (wcslen(UuidString) + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hKey, L"Characteristics", 0, REG_DWORD, (const BYTE*)&Characteristics, sizeof(DWORD));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -378,7 +376,7 @@ InstallNetDevice(
         rc = RegSetValueExW(hKey, L"BusType", 0, REG_SZ, (const BYTE*)BusType, (wcslen(BusType) + 1) * sizeof(WCHAR));
         if (rc != ERROR_SUCCESS)
         {
-            DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+            ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
             goto cleanup;
         }
     }
@@ -386,28 +384,28 @@ InstallNetDevice(
     rc = RegCreateKeyExW(hKey, L"Linkage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hLinkageKey, NULL);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hLinkageKey, L"Export", 0, REG_SZ, (const BYTE*)DeviceName, (wcslen(DeviceName) + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hLinkageKey, L"RootDevice", 0, REG_SZ, (const BYTE*)UuidString, (wcslen(UuidString) + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hLinkageKey, L"UpperBind", 0, REG_SZ, (const BYTE*)L"Tcpip", (wcslen(L"Tcpip") + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
     RegCloseKey(hKey);
@@ -417,14 +415,14 @@ InstallNetDevice(
     rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hNetworkKey, NULL);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegCreateKeyExW(hNetworkKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hKey, NULL);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -433,7 +431,7 @@ InstallNetDevice(
     hKey = NULL;
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -445,14 +443,14 @@ InstallNetDevice(
     rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer) + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     rc = RegSetValueExW(hConnectionKey, L"PnpInstanceId", 0, REG_SZ, (const BYTE*)InstanceId, (wcslen(InstanceId) + 1) * sizeof(WCHAR));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -460,7 +458,7 @@ InstallNetDevice(
     rc = RegSetValueExW(hConnectionKey, L"ShowIcon", 0, REG_DWORD, (const BYTE*)&dwShowIcon, sizeof(dwShowIcon));
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc);
+        ERR("RegSetValueExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -468,25 +466,25 @@ InstallNetDevice(
     rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE | KEY_SET_VALUE, NULL, &hKey, NULL);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc);
+        ERR("RegCreateKeyExW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
     rc = AppendStringToMultiSZ(hKey, L"Bind", DeviceName);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc);
+        ERR("AppendStringToMultiSZ() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
     rc = AppendStringToMultiSZ(hKey, L"Export", ExportName);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc);
+        ERR("AppendStringToMultiSZ() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
     rc = AppendStringToMultiSZ(hKey, L"Route", UuidString);
     if (rc != ERROR_SUCCESS)
     {
-        DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc);
+        ERR("AppendStringToMultiSZ() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -511,7 +509,7 @@ static
 DWORD
 InstallNetClient(VOID)
 {
-    DPRINT1("Installation of network clients is not yet supported\n");
+    FIXME("Installation of network clients is not yet supported\n");
     return ERROR_GEN_FAILURE;
 }
 
@@ -519,7 +517,7 @@ static
 DWORD
 InstallNetService(VOID)
 {
-    DPRINT1("Installation of network services is not yet supported\n");
+    FIXME("Installation of network services is not yet supported\n");
     return ERROR_GEN_FAILURE;
 }
 
@@ -527,7 +525,7 @@ static
 DWORD
 InstallNetTransport(VOID)
 {
-    DPRINT1("Installation of network protocols is not yet supported\n");
+    FIXME("Installation of network protocols is not yet supported\n");
     return ERROR_GEN_FAILURE;
 }
 
@@ -557,14 +555,14 @@ NetClassInstaller(
     if (InstallFunction != DIF_INSTALLDEVICE)
         return ERROR_DI_DO_DEFAULT;
 
-    DPRINT("%lu %p %p\n", InstallFunction, DeviceInfoSet, DeviceInfoData);
+    TRACE("%lu %p %p\n", InstallFunction, DeviceInfoSet, DeviceInfoData);
 
     /* Get driver info details */
     DriverInfoData.cbSize = sizeof(SP_DRVINFO_DATA_W);
     if (!SetupDiGetSelectedDriverW(DeviceInfoSet, DeviceInfoData, &DriverInfoData))
     {
         rc = GetLastError();
-        DPRINT("SetupDiGetSelectedDriverW() failed with error 0x%lx\n", rc);
+        ERR("SetupDiGetSelectedDriverW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -573,7 +571,7 @@ NetClassInstaller(
      && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
     {
         rc = GetLastError();
-        DPRINT("SetupDiGetDriverInfoDetailW() failed with error 0x%lx\n", rc);
+        ERR("SetupDiGetDriverInfoDetailW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -581,14 +579,14 @@ NetClassInstaller(
     if (hInf == INVALID_HANDLE_VALUE)
     {
         rc = GetLastError();
-        DPRINT("SetupOpenInfFileW() failed with error 0x%lx\n", rc);
+        ERR("SetupOpenInfFileW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
     if (!SetupDiGetActualSectionToInstallW(hInf, DriverInfoDetail.SectionName, SectionName, LINE_LEN, NULL, NULL))
     {
         rc = GetLastError();
-        DPRINT("SetupDiGetActualSectionToInstallW() failed with error 0x%lx\n", rc);
+        ERR("SetupDiGetActualSectionToInstallW() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -596,7 +594,7 @@ NetClassInstaller(
     if (!SetupFindFirstLineW(hInf, SectionName, L"Characteristics", &InfContext))
     {
         rc = GetLastError();
-        DPRINT("Unable to find key %S in section %S of file %S (error 0x%lx)\n",
+        ERR("Unable to find key %S in section %S of file %S (error 0x%lx)\n",
             L"Characteristics", SectionName, DriverInfoDetail.InfFileName, rc);
         goto cleanup;
     }
@@ -604,7 +602,7 @@ NetClassInstaller(
     if (!SetupGetIntField(&InfContext, 1, &CharacteristicsInt))
     {
         rc = GetLastError();
-        DPRINT("SetupGetIntField() failed with error 0x%lx\n", rc);
+        ERR("SetupGetIntField() failed with error 0x%lx\n", rc);
         goto cleanup;
     }
 
@@ -616,14 +614,14 @@ NetClassInstaller(
             if (!SetupGetStringFieldW(&InfContext, 1, NULL, 0, &dwLength))
             {
                 rc = GetLastError();
-                DPRINT("SetupGetStringFieldW() failed with error 0x%lx\n", rc);
+                ERR("SetupGetStringFieldW() failed with error 0x%lx\n", rc);
                 goto cleanup;
             }
 
             BusType = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR));
             if (!BusType)
             {
-                DPRINT("HeapAlloc() failed\n");
+                ERR("HeapAlloc() failed\n");
                 rc = ERROR_NOT_ENOUGH_MEMORY;
                 goto cleanup;
             }
@@ -631,7 +629,7 @@ NetClassInstaller(
             if (!SetupGetStringFieldW(&InfContext, 1, BusType, dwLength, NULL))
             {
                 rc = GetLastError();
-                DPRINT("SetupGetStringFieldW() failed with error 0x%lx\n", rc);
+                ERR("SetupGetStringFieldW() failed with error 0x%lx\n", rc);
                 goto cleanup;
             }
         }
@@ -641,7 +639,7 @@ NetClassInstaller(
     RpcStatus = UuidCreate(&Uuid);
     if (RpcStatus != RPC_S_OK && RpcStatus != RPC_S_UUID_LOCAL_ONLY)
     {
-        DPRINT("UuidCreate() failed with RPC status 0x%lx\n", RpcStatus);
+        ERR("UuidCreate() failed with RPC status 0x%lx\n", RpcStatus);
         rc = ERROR_GEN_FAILURE;
         goto cleanup;
     }
@@ -649,7 +647,7 @@ NetClassInstaller(
     RpcStatus = UuidToStringW(&Uuid, &UuidRpcString);
     if (RpcStatus != RPC_S_OK)
     {
-        DPRINT("UuidToStringW() failed with RPC status 0x%lx\n", RpcStatus);
+        ERR("UuidToStringW() failed with RPC status 0x%lx\n", RpcStatus);
         rc = ERROR_GEN_FAILURE;
         goto cleanup;
     }
@@ -658,7 +656,7 @@ NetClassInstaller(
     UuidString = HeapAlloc(GetProcessHeap(), 0, (2 + wcslen(UuidRpcString)) * sizeof(WCHAR) + sizeof(UNICODE_NULL));
     if (!UuidString)
     {
-        DPRINT("HeapAlloc() failed\n");
+        ERR("HeapAlloc() failed\n");
         rc = ERROR_NOT_ENOUGH_MEMORY;
         goto cleanup;
     }
@@ -677,7 +675,7 @@ NetClassInstaller(
         rc = InstallNetTransport();
     else
     {
-        DPRINT("Invalid class guid\n");
+        ERR("Invalid class guid\n");
         rc = ERROR_GEN_FAILURE;
     }
 
@@ -691,6 +689,6 @@ cleanup:
 
     if (rc == ERROR_SUCCESS)
         rc = ERROR_DI_DO_DEFAULT;
-    DPRINT("Returning 0x%lx\n", rc);
+    TRACE("Returning 0x%lx\n", rc);
     return rc;
 }
index 6a09c9d..73261e4 100644 (file)
@@ -7,8 +7,8 @@
 8 stub ModemClassCoInstaller
 9 stub NetCfgDiagFromCommandArgs
 10 stub NetCfgDiagRepairRegistryBindings
-11 stdcall NetClassInstaller (long ptr ptr)
-12 stub NetPropPageProvider
+11 stdcall NetClassInstaller(long ptr ptr)
+12 stdcall NetPropPageProvider(ptr ptr long)
 13 stub RasAddBindings
 14 stub RasCountBindings
 15 stub RasRemoveBindings
index cda83aa..b8c69a5 100644 (file)
 #include <devguid.h>
 #include <commctrl.h>
 
+#include <wine/debug.h>
+
 #include "resource.h"
 
+WINE_DEFAULT_DEBUG_CHANNEL(netcfgx);
+
 typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject);
 typedef struct {
     REFIID riid;
diff --git a/dll/win32/netcfgx/propertypage.c b/dll/win32/netcfgx/propertypage.c
new file mode 100644 (file)
index 0000000..65f6678
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * PROJECT:     ReactOS system libraries
+ * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
+ * PURPOSE:     Network property page provider
+ * COPYRIGHT:   Copyright 2018 Eric Kohl (eric.kohl@reactos.org)
+ */
+
+#include "precomp.h"
+
+static
+INT_PTR
+CALLBACK
+NetPropertyPageDlgProc(
+    HWND hwnd,
+    UINT uMsg,
+    WPARAM wParam,
+    LPARAM lParam)
+{
+    switch (uMsg)
+    {
+        case WM_INITDIALOG:
+            ERR("NetPropertyPageDlgProc: WM_INITDIALOG\n");
+            return TRUE;
+//            return OnInitDialog(hwnd, wParam, lParam);
+
+//        case WM_DESTROY:
+//            OnDestroy(hwnd);
+//            break;
+
+        default:
+            break;
+    }
+
+    return FALSE;
+}
+
+
+BOOL
+WINAPI
+NetPropPageProvider(
+    PSP_PROPSHEETPAGE_REQUEST lpPropSheetPageRequest,
+    LPFNADDPROPSHEETPAGE lpfnAddPropSheetPageProc,
+    LPARAM lParam)
+{
+    PROPSHEETPAGEW PropSheetPage;
+    HPROPSHEETPAGE hPropSheetPage;
+
+    ERR("NetPropPageProvider(%p %p %lx)\n",
+          lpPropSheetPageRequest, lpfnAddPropSheetPageProc, lParam);
+
+    if (lpPropSheetPageRequest->PageRequested == SPPSR_ENUM_ADV_DEVICE_PROPERTIES)
+    {
+        ERR("SPPSR_ENUM_ADV_DEVICE_PROPERTIES\n");
+
+        PropSheetPage.dwSize = sizeof(PROPSHEETPAGEW);
+        PropSheetPage.dwFlags = 0;
+        PropSheetPage.hInstance = netcfgx_hInstance;
+        PropSheetPage.u.pszTemplate = MAKEINTRESOURCE(IDD_NET_PROPERTY_DLG);
+        PropSheetPage.pfnDlgProc = NetPropertyPageDlgProc;
+        PropSheetPage.lParam = 0;
+        PropSheetPage.pfnCallback = NULL;
+
+        hPropSheetPage = CreatePropertySheetPageW(&PropSheetPage);
+        if (hPropSheetPage == NULL)
+        {
+            ERR("CreatePropertySheetPageW() failed!\n");
+            return FALSE;
+        }
+
+        if (!(*lpfnAddPropSheetPageProc)(hPropSheetPage, lParam))
+        {
+            ERR("lpfnAddPropSheetPageProc() failed!\n");
+            DestroyPropertySheetPage(hPropSheetPage);
+            return FALSE;
+        }
+    }
+
+    ERR("Done!\n");
+
+    return TRUE;
+}
+
+/* EOF */
index f8795d3..cb32ceb 100644 (file)
@@ -12,6 +12,7 @@
 #define IDD_TCPIPDNS_DLG     108
 #define IDD_TCPIPSUFFIX_DLG  109
 #define IDD_TCPIP_PORT_DLG   110
+#define IDD_NET_PROPERTY_DLG 111
 
 
 /* controls */