don't try and display data if iphlpapi functions fail
Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c
_____
Modified: trunk/reactos/apps/utils/net/ipconfig/ipconfig.c
--- trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-11-11
17:28:13 UTC (rev 19133)
+++ trunk/reactos/apps/utils/net/ipconfig/ipconfig.c 2005-11-11
18:09:46 UTC (rev 19134)
@@ -127,9 +127,16 @@
}
if (! GetAdaptersInfo(pAdapterInfo, &adaptOutBufLen) == NO_ERROR)
- _tprintf(_T("GetAdaptersInfo failed %lu\n"), GetLastError());
+ {
+ _tprintf(_T("GetAdaptersInfo failed %lu\n"),
GetLastError());
+ return EXIT_FAILURE;
+ }
+
if (! GetNetworkParams(pFixedInfo, &netOutBufLen) == NO_ERROR)
+ {
_tprintf(_T("GetNetworkParams failed %lu\n"), GetLastError());
+ return EXIT_FAILURE;
+ }
pAdapter = pAdapterInfo;
//HKEY hKey;