Author: tfaber Date: Fri Nov 27 01:41:09 2015 New Revision: 70142
URL: http://svn.reactos.org/svn/reactos?rev=70142&view=rev Log: [NETCFGX] - Enable debug prints on failure in InstallNetDevice
Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c
Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.c... ============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.c [iso-8859-1] Fri Nov 27 01:41:09 2015 @@ -290,14 +290,14 @@ rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\CurrentControlSet\Services", 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; }
rc = RegCreateKeyExW(hKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hNetworkKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hKey); @@ -306,7 +306,7 @@ rc = RegCreateKeyExW(hNetworkKey, L"Parameters\Tcpip", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hNetworkKey); @@ -315,21 +315,21 @@ 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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; }
@@ -337,7 +337,7 @@ rc = RegSetValueExW(hKey, L"EnableDHCP", 0, REG_DWORD, (const BYTE*)&dwValue, sizeof(DWORD)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hKey); @@ -355,21 +355,21 @@ { hKey = NULL; rc = GetLastError(); - DPRINT("SetupDiCreateDevRegKeyW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; }
@@ -378,7 +378,7 @@ rc = RegSetValueExW(hKey, L"BusType", 0, REG_SZ, (const BYTE*)BusType, (wcslen(BusType) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } } @@ -386,28 +386,28 @@ rc = RegCreateKeyExW(hKey, L"Linkage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hLinkageKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } RegCloseKey(hKey); @@ -417,14 +417,14 @@ rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}", 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hNetworkKey, NULL); if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; }
@@ -433,7 +433,7 @@ hKey = NULL; if (rc != ERROR_SUCCESS) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; }
@@ -445,14 +445,14 @@ rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("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) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; }
@@ -460,7 +460,7 @@ rc = RegSetValueExW(hConnectionKey, L"ShowIcon", 0, REG_DWORD, (const BYTE*)&dwShowIcon, sizeof(dwShowIcon)); if (rc != ERROR_SUCCESS) { - DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + DPRINT1("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; }
@@ -468,25 +468,25 @@ 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) { - DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + DPRINT1("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } rc = AppendStringToMultiSZ(hKey, L"Bind", DeviceName); if (rc != ERROR_SUCCESS) { - DPRINT("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); + DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); goto cleanup; } rc = AppendStringToMultiSZ(hKey, L"Export", ExportName); if (rc != ERROR_SUCCESS) { - DPRINT("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); + DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); goto cleanup; } rc = AppendStringToMultiSZ(hKey, L"Route", UuidString); if (rc != ERROR_SUCCESS) { - DPRINT("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); + DPRINT1("AppendStringToMultiSZ() failed with error 0x%lx\n", rc); goto cleanup; }