mirror of
https://github.com/reactos/reactos.git
synced 2024-08-28 22:28:36 +00:00
Use TRACE/WARN/ERR/FIXME macros for debugging, so they can be enabled at runtime
svn path=/trunk/; revision=31367
This commit is contained in:
parent
0099292d68
commit
ab3c6601b7
|
@ -53,7 +53,13 @@
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <cpl.h>
|
#include <cpl.h>
|
||||||
|
|
||||||
#include <debug.h>
|
#include <wine/debug.h>
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(ncpa);
|
||||||
|
#ifndef _UNICODE
|
||||||
|
#define debugstr_aw debugstr_a
|
||||||
|
#else
|
||||||
|
#define debugstr_aw debugstr_w
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "ncpa.h"
|
#include "ncpa.h"
|
||||||
|
@ -96,7 +102,7 @@ EnumRegKeys(ENUMREGKEYCALLBACK *pCallback,PVOID pCookie,HKEY hBaseKey,TCHAR *tps
|
||||||
|
|
||||||
if(RegOpenKeyEx(hBaseKey,tpszRegPath,0,KEY_ENUMERATE_SUB_KEYS,&hKey)!=ERROR_SUCCESS)
|
if(RegOpenKeyEx(hBaseKey,tpszRegPath,0,KEY_ENUMERATE_SUB_KEYS,&hKey)!=ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DPRINT("EnumRegKeys failed (key not found): %S\n", tpszRegPath);
|
WARN("EnumRegKeys failed (key not found): %S\n", tpszRegPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,12 +112,12 @@ EnumRegKeys(ENUMREGKEYCALLBACK *pCallback,PVOID pCookie,HKEY hBaseKey,TCHAR *tps
|
||||||
ret = RegEnumKeyEx(hKey,i,tpszName,&dwNameLen,NULL,NULL,NULL,NULL);
|
ret = RegEnumKeyEx(hKey,i,tpszName,&dwNameLen,NULL,NULL,NULL,NULL);
|
||||||
if(ret != ERROR_SUCCESS)
|
if(ret != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DPRINT("EnumRegKeys: RegEnumKeyEx failed for %S (rc 0x%lx)\n", tpszName, ret);
|
WARN("EnumRegKeys: RegEnumKeyEx failed for %S (rc 0x%lx)\n", tpszName, ret);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_stprintf(pszNewPath,_T("%s\\%s"),tpszRegPath,tpszName);
|
_stprintf(pszNewPath,_T("%s\\%s"),tpszRegPath,tpszName);
|
||||||
DPRINT("EnumRegKeys: Calling user supplied enum function\n");
|
TRACE("EnumRegKeys: Calling user supplied enum function\n");
|
||||||
pCallback(pCookie,hBaseKey,pszNewPath);
|
pCallback(pCookie,hBaseKey,pszNewPath);
|
||||||
|
|
||||||
dwNameLen = sizeof(tpszName);
|
dwNameLen = sizeof(tpszName);
|
||||||
|
@ -262,6 +268,7 @@ NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if(!FindNICClassKeyForCfgInstance(pGlobalData->CurrentAdapterName, tpszSubKey))
|
if(!FindNICClassKeyForCfgInstance(pGlobalData->CurrentAdapterName, tpszSubKey))
|
||||||
{
|
{
|
||||||
|
WARN("NIC Entry not found for '%s'\n", debugstr_w(pGlobalData->CurrentAdapterName));
|
||||||
MessageBox(hwndDlg,_T("NIC Entry not found"),_T("Registry error"),MB_ICONSTOP);
|
MessageBox(hwndDlg,_T("NIC Entry not found"),_T("Registry error"),MB_ICONSTOP);
|
||||||
MessageBox(hwndDlg,pGlobalData->CurrentAdapterName,tpszSubKey,MB_ICONSTOP);
|
MessageBox(hwndDlg,pGlobalData->CurrentAdapterName,tpszSubKey,MB_ICONSTOP);
|
||||||
}
|
}
|
||||||
|
@ -309,7 +316,6 @@ NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
RegCloseKey(hNDIKey);
|
RegCloseKey(hNDIKey);
|
||||||
|
|
||||||
SetDlgItemText(hwndDlg,IDC_DESCRIPTION,tpszHelpText);
|
SetDlgItemText(hwndDlg,IDC_DESCRIPTION,tpszHelpText);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(HIWORD(wParam)!=LBN_DBLCLK)
|
if(HIWORD(wParam)!=LBN_DBLCLK)
|
||||||
break;
|
break;
|
||||||
|
@ -322,6 +328,7 @@ NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
FIXME("If you see this, then the IPHLPAPI.DLL probably needs more work because GetAdaptersInfo did not return the expected data.\n");
|
||||||
MessageBox(NULL,_T("If you see this, then the IPHLPAPI.DLL probably needs more work because GetAdaptersInfo did not return the expected data."),_T("Error"),MB_ICONSTOP);
|
MessageBox(NULL,_T("If you see this, then the IPHLPAPI.DLL probably needs more work because GetAdaptersInfo did not return the expected data."),_T("Error"),MB_ICONSTOP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +368,6 @@ DisplayNICProperties(HWND hParent, GLOBAL_NCPA_DATA* pGlobalData)
|
||||||
_tcscat(tpszName,_T(" Properties"));
|
_tcscat(tpszName,_T(" Properties"));
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
|
||||||
|
|
||||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
||||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||||
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW;
|
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_NOAPPLYNOW;
|
||||||
|
@ -374,7 +380,6 @@ DisplayNICProperties(HWND hParent, GLOBAL_NCPA_DATA* pGlobalData)
|
||||||
psh.ppsp = psp;
|
psh.ppsp = psp;
|
||||||
psh.pfnCallback = NULL;
|
psh.pfnCallback = NULL;
|
||||||
|
|
||||||
|
|
||||||
InitPropSheetPage(&psp[0], IDD_NETPROPERTIES, NICPropertyPageProc, (LPARAM)pGlobalData);
|
InitPropSheetPage(&psp[0], IDD_NETPROPERTIES, NICPropertyPageProc, (LPARAM)pGlobalData);
|
||||||
PropertySheet(&psh);
|
PropertySheet(&psh);
|
||||||
return;
|
return;
|
||||||
|
@ -399,6 +404,7 @@ void RefreshNICInfo(HWND hwndDlg, PGLOBAL_NCPA_DATA pGlobalData)
|
||||||
|
|
||||||
if ((ErrRet = GetAdaptersInfo(pGlobalData->pFirstAdapterInfo, &BufferSize)) != NO_ERROR)
|
if ((ErrRet = GetAdaptersInfo(pGlobalData->pFirstAdapterInfo, &BufferSize)) != NO_ERROR)
|
||||||
{
|
{
|
||||||
|
ERR("error adapterinfo\n");
|
||||||
MessageBox(hwndDlg, _T("error adapterinfo") ,_T("ncpa.cpl"),MB_ICONSTOP);
|
MessageBox(hwndDlg, _T("error adapterinfo") ,_T("ncpa.cpl"),MB_ICONSTOP);
|
||||||
|
|
||||||
if (pGlobalData->pFirstAdapterInfo)
|
if (pGlobalData->pFirstAdapterInfo)
|
||||||
|
@ -449,9 +455,9 @@ void UpdateCurrentAdapterInfo(HWND hwndDlg, PGLOBAL_NCPA_DATA pGlobalData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ERROR_NO_DATA == dwRetVal)
|
else if (ERROR_NO_DATA == dwRetVal)
|
||||||
DPRINT("There are no network adapters with IPv4 enabled on the local system\n");
|
WARN("There are no network adapters with IPv4 enabled on the local system\n");
|
||||||
else
|
else
|
||||||
DPRINT1("GetInterfaceInfo failed.\n");
|
ERR("GetInterfaceInfo failed.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
|
@ -471,7 +477,7 @@ UpdateNICStatusData(HWND hwndDlg, PGLOBAL_NCPA_DATA pGlobalData)
|
||||||
if (firstError)
|
if (firstError)
|
||||||
{
|
{
|
||||||
firstError = FALSE;
|
firstError = FALSE;
|
||||||
DPRINT1("Out of memory - could not allocate MIB_IFTABLE(1)");
|
WARN("Out of memory - could not allocate MIB_IFTABLE(1)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -490,7 +496,7 @@ UpdateNICStatusData(HWND hwndDlg, PGLOBAL_NCPA_DATA pGlobalData)
|
||||||
if (firstError)
|
if (firstError)
|
||||||
{
|
{
|
||||||
firstError = FALSE;
|
firstError = FALSE;
|
||||||
DPRINT1("Out of memory - could not allocate MIB_IFTABLE(2)");
|
WARN("Out of memory - could not allocate MIB_IFTABLE(2)");
|
||||||
}
|
}
|
||||||
|
|
||||||
pGlobalData->IfTableSize = 0;
|
pGlobalData->IfTableSize = 0;
|
||||||
|
@ -593,7 +599,7 @@ UpdateNICStatusData(HWND hwndDlg, PGLOBAL_NCPA_DATA pGlobalData)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("Unknown operation status: %d\n", OperStatus);
|
WARN("Unknown operation status: %d\n", OperStatus);
|
||||||
OperStatus = IDS_STATUS_OPERATIONAL;
|
OperStatus = IDS_STATUS_OPERATIONAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -630,7 +636,7 @@ UpdateNICStatusData(HWND hwndDlg, PGLOBAL_NCPA_DATA pGlobalData)
|
||||||
if (firstError)
|
if (firstError)
|
||||||
{
|
{
|
||||||
firstError = FALSE;
|
firstError = FALSE;
|
||||||
DPRINT1("GetIfTable failed with error code: %d\n", dwRet);
|
ERR("GetIfTable failed with error code: %d\n", dwRet);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -733,10 +739,10 @@ NICSupportPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
case IDC_DETAILS:
|
case IDC_DETAILS:
|
||||||
{
|
{
|
||||||
|
FIXME("Not implemented: show detail window\n");
|
||||||
MessageBox(hwndDlg,_T("not implemented: show detail window"),_T("ncpa.cpl"),MB_ICONSTOP);
|
MessageBox(hwndDlg,_T("not implemented: show detail window"),_T("ncpa.cpl"),MB_ICONSTOP);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -828,6 +834,7 @@ EnumAdapters(HWND hwndDlg)
|
||||||
size=sizeof(Info);
|
size=sizeof(Info);
|
||||||
if(GetAdaptersInfo(Info,&size)!=ERROR_SUCCESS)
|
if(GetAdaptersInfo(Info,&size)!=ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
WARN("IPHLPAPI.DLL failed to provide Adapter information\n");
|
||||||
MessageBox(hwndDlg,L"IPHLPAPI.DLL failed to provide Adapter information",L"Error",MB_ICONSTOP);
|
MessageBox(hwndDlg,L"IPHLPAPI.DLL failed to provide Adapter information",L"Error",MB_ICONSTOP);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -859,33 +866,33 @@ NetAdapterCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
||||||
HWND hwndDlg = (HWND)pCookie;
|
HWND hwndDlg = (HWND)pCookie;
|
||||||
DWORD dwCharacteristics;
|
DWORD dwCharacteristics;
|
||||||
|
|
||||||
DPRINT("NetAdapterCallback: %S\n", tpszSubKey);
|
TRACE("NetAdapterCallback: %s\n", debugstr_aw(tpszSubKey));
|
||||||
|
|
||||||
if(RegOpenKeyEx(hBaseKey,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!=ERROR_SUCCESS)
|
if(RegOpenKeyEx(hBaseKey,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!=ERROR_SUCCESS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DPRINT("NetAdapterCallback: Reading Characteristics\n");
|
TRACE("NetAdapterCallback: Reading Characteristics\n");
|
||||||
dwType = REG_DWORD;
|
dwType = REG_DWORD;
|
||||||
dwSize = sizeof(dwCharacteristics);
|
dwSize = sizeof(dwCharacteristics);
|
||||||
if(RegQueryValueEx(hKey,_T("Characteristics"),NULL,&dwType,(BYTE*)&dwCharacteristics,&dwSize)!=ERROR_SUCCESS)
|
if(RegQueryValueEx(hKey,_T("Characteristics"),NULL,&dwType,(BYTE*)&dwCharacteristics,&dwSize)!=ERROR_SUCCESS)
|
||||||
dwCharacteristics = 0;
|
dwCharacteristics = 0;
|
||||||
|
|
||||||
if (dwCharacteristics & NCF_HIDDEN)
|
if (dwCharacteristics & NCF_HIDDEN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(dwCharacteristics & NCF_VIRTUAL) && !(dwCharacteristics & NCF_PHYSICAL))
|
if (!(dwCharacteristics & NCF_VIRTUAL) && !(dwCharacteristics & NCF_PHYSICAL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DPRINT("NetAdapterCallback: Reading DriverDesc\n");
|
TRACE("NetAdapterCallback: Reading DriverDesc\n");
|
||||||
dwType = REG_SZ;
|
dwType = REG_SZ;
|
||||||
dwSize = sizeof(tpszDisplayName);
|
dwSize = sizeof(tpszDisplayName);
|
||||||
if (RegQueryValueEx(hKey,_T("DriverDesc"),NULL,&dwType,(BYTE*)tpszDisplayName,&dwSize)!= ERROR_SUCCESS)
|
if (RegQueryValueEx(hKey,_T("DriverDesc"),NULL,&dwType,(BYTE*)tpszDisplayName,&dwSize)!= ERROR_SUCCESS)
|
||||||
_tcscpy(tpszDisplayName,_T("Unnamed Adapter"));
|
_tcscpy(tpszDisplayName,_T("Unnamed Adapter"));
|
||||||
|
TRACE("Network card: '%s'\n", debugstr_aw(tpszDisplayName));
|
||||||
|
|
||||||
// get the link to the Enum Subkey (currently unused)
|
// get the link to the Enum Subkey (currently unused)
|
||||||
//dwType = REG_SZ;
|
//dwType = REG_SZ;
|
||||||
//dwSize = sizeof(tpszDeviceID);
|
//dwSize = sizeof(tpszDeviceID);
|
||||||
//if(RegQueryValueEx(hKey,_T("MatchingDeviceId"),NULL,&dwType,(BYTE*)tpszDeviceID,&dwSize) != ERROR_SUCCESS) {
|
//if(RegQueryValueEx(hKey,_T("MatchingDeviceId"),NULL,&dwType,(BYTE*)tpszDeviceID,&dwSize) != ERROR_SUCCESS) {
|
||||||
|
// WARN("Missing MatchingDeviceId Entry\n");
|
||||||
// MessageBox(hwndDlg,_T("Missing MatchingDeviceId Entry"),_T("Registry Problem"),MB_ICONSTOP);
|
// MessageBox(hwndDlg,_T("Missing MatchingDeviceId Entry"),_T("Registry Problem"),MB_ICONSTOP);
|
||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
|
@ -893,7 +900,9 @@ NetAdapterCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
||||||
// get the card configuration GUID
|
// get the card configuration GUID
|
||||||
dwType = REG_SZ;
|
dwType = REG_SZ;
|
||||||
dwSize = sizeof(tpszCfgInstanceID);
|
dwSize = sizeof(tpszCfgInstanceID);
|
||||||
if(RegQueryValueEx(hKey,_T("NetCfgInstanceId"),NULL,&dwType,(BYTE*)tpszCfgInstanceID,&dwSize) != ERROR_SUCCESS) {
|
if(RegQueryValueEx(hKey,_T("NetCfgInstanceId"),NULL,&dwType,(BYTE*)tpszCfgInstanceID,&dwSize) != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
ERR("Missing NetCfgInstanceId Entry\n");
|
||||||
MessageBox(hwndDlg,_T("Missing NetCfgInstanceId Entry"),_T("Registry Problem"),MB_ICONSTOP);
|
MessageBox(hwndDlg,_T("Missing NetCfgInstanceId Entry"),_T("Registry Problem"),MB_ICONSTOP);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -906,7 +915,6 @@ NetAdapterCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
|
||||||
//
|
//
|
||||||
// How is this done properly ?
|
// How is this done properly ?
|
||||||
|
|
||||||
|
|
||||||
nIndex = (int) SendDlgItemMessage(hwndDlg,IDC_NETCARDLIST,LB_ADDSTRING,0,(LPARAM)tpszDisplayName);
|
nIndex = (int) SendDlgItemMessage(hwndDlg,IDC_NETCARDLIST,LB_ADDSTRING,0,(LPARAM)tpszDisplayName);
|
||||||
SendDlgItemMessage(hwndDlg,IDC_NETCARDLIST,LB_SETITEMDATA,nIndex,(LPARAM)ptpszCfgInstanceID);
|
SendDlgItemMessage(hwndDlg,IDC_NETCARDLIST,LB_SETITEMDATA,nIndex,(LPARAM)ptpszCfgInstanceID);
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
@ -1078,6 +1086,3 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ typedef struct
|
||||||
|
|
||||||
extern HINSTANCE hApplet;
|
extern HINSTANCE hApplet;
|
||||||
|
|
||||||
extern ULONG DbgPrint(PCCH Fmt, ...);
|
|
||||||
|
|
||||||
#endif // __NCPA_H
|
#endif // __NCPA_H
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<include base="ncpa">.</include>
|
<include base="ncpa">.</include>
|
||||||
<define name="_WIN32_IE">0x600</define>
|
<define name="_WIN32_IE">0x600</define>
|
||||||
<define name="_WIN32_WINNT">0x501</define>
|
<define name="_WIN32_WINNT">0x501</define>
|
||||||
|
<library>wine</library>
|
||||||
<library>kernel32</library>
|
<library>kernel32</library>
|
||||||
<library>advapi32</library>
|
<library>advapi32</library>
|
||||||
<library>user32</library>
|
<library>user32</library>
|
||||||
|
@ -12,8 +13,6 @@
|
||||||
<library>iphlpapi</library>
|
<library>iphlpapi</library>
|
||||||
<library>ws2_32</library>
|
<library>ws2_32</library>
|
||||||
<library>dhcpcsvc</library>
|
<library>dhcpcsvc</library>
|
||||||
<library>ntdll</library>
|
|
||||||
<library>msvcrt</library>
|
|
||||||
<file>ncpa.c</file>
|
<file>ncpa.c</file>
|
||||||
<file>tcpip_properties.c</file>
|
<file>tcpip_properties.c</file>
|
||||||
<file>ncpa.rc</file>
|
<file>ncpa.rc</file>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
* Copyright 2006 Ge van Geldorp <gvg@reactos.org>
|
* Copyright 2006 Ge van Geldorp <gvg@reactos.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -21,20 +22,13 @@
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <cpl.h>
|
#include <cpl.h>
|
||||||
#else
|
|
||||||
|
|
||||||
// this is missing on reactos...
|
|
||||||
#ifndef IPM_SETADDRESS
|
|
||||||
#define IPM_SETADDRESS (WM_USER+101)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "ncpa.h"
|
#include "ncpa.h"
|
||||||
|
|
||||||
#define NDEBUG
|
#include <wine/debug.h>
|
||||||
#include <debug.h>
|
WINE_DEFAULT_DEBUG_CHANNEL(ncpa);
|
||||||
|
|
||||||
typedef struct _TCPIP_PROPERTIES_DATA {
|
typedef struct _TCPIP_PROPERTIES_DATA {
|
||||||
DWORD AdapterIndex;
|
DWORD AdapterIndex;
|
||||||
|
@ -135,6 +129,7 @@ ShowError(HWND Parent, UINT MsgId)
|
||||||
MsgId, Msg, sizeof(Msg) / sizeof(Msg[0]))) {
|
MsgId, Msg, sizeof(Msg) / sizeof(Msg[0]))) {
|
||||||
wcscpy(Msg, L"Unknown error");
|
wcscpy(Msg, L"Unknown error");
|
||||||
}
|
}
|
||||||
|
ERR("%s\n", debugstr_w(Msg));
|
||||||
MessageBoxW(Parent, Msg, Error, MB_OK | MB_ICONSTOP);
|
MessageBoxW(Parent, Msg, Error, MB_OK | MB_ICONSTOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +199,7 @@ ValidateAndStore(HWND Dlg, PTCPIP_PROPERTIES_DATA DlgData)
|
||||||
RowToAdd.dwForwardNextHop = DlgData->Gateway;
|
RowToAdd.dwForwardNextHop = DlgData->Gateway;
|
||||||
|
|
||||||
CreateIpForwardEntry( &RowToAdd );
|
CreateIpForwardEntry( &RowToAdd );
|
||||||
ASSERT(BST_CHECKED == IsDlgButtonChecked(Dlg, IDC_FIXEDDNS));
|
assert(BST_CHECKED == IsDlgButtonChecked(Dlg, IDC_FIXEDDNS));
|
||||||
} else {
|
} else {
|
||||||
DlgData->IpAddress = INADDR_NONE;
|
DlgData->IpAddress = INADDR_NONE;
|
||||||
DlgData->SubnetMask = INADDR_NONE;
|
DlgData->SubnetMask = INADDR_NONE;
|
||||||
|
@ -250,7 +245,7 @@ InternTCPIPSettings(HWND Dlg, PTCPIP_PROPERTIES_DATA DlgData) {
|
||||||
|
|
||||||
if (! ValidateAndStore(Dlg, DlgData)) {
|
if (! ValidateAndStore(Dlg, DlgData)) {
|
||||||
/* Should never happen, we should have validated at PSN_KILLACTIVE */
|
/* Should never happen, we should have validated at PSN_KILLACTIVE */
|
||||||
ASSERT(FALSE);
|
assert(FALSE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,8 +295,6 @@ InternTCPIPSettings(HWND Dlg, PTCPIP_PROPERTIES_DATA DlgData) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
// arty ... Not needed anymore ... We update the address live now
|
|
||||||
//MessageBox(NULL, TEXT("You need to reboot before the new parameters take effect."), TEXT("Reboot required"), MB_OK | MB_ICONWARNING);
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
Loading…
Reference in a new issue