[IPCONFIG] Add error messages for Release and Renew and fix magic values

This commit is contained in:
Eric Kohl 2023-07-03 12:28:39 +02:00
parent a5360f542f
commit eb30050e1b
21 changed files with 46 additions and 6 deletions

View file

@ -457,19 +457,19 @@ PrintNodeType(
{
switch (NodeType)
{
case 1:
case BROADCAST_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEBCAST);
break;
case 2:
case PEER_TO_PEER_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEP2P);
break;
case 4:
case MIXED_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEMIXED);
break;
case 8:
case HYBRID_NODETYPE:
ConResPrintf(StdOut, IDS_NODETYPEHYBRID);
break;
@ -890,7 +890,7 @@ Release(
ret = IpReleaseAddress(&AdapterMap);
if (ret != NO_ERROR)
{
_tprintf(_T("\nAn error occured while releasing interface %ls : \n"), szFriendlyName);
ConResPrintf(StdOut, IDS_DHCPRELEASEERROR, szFriendlyName);
DoFormatMessage(ret);
}
}
@ -988,7 +988,7 @@ Renew(
ret = IpRenewAddress(&AdapterMap);
if (ret != NO_ERROR)
{
_tprintf(_T("\nAn error occured while renew interface %ls : "), szFriendlyName);
ConResPrintf(StdOut, IDS_DHCPRENEWERROR, szFriendlyName);
DoFormatMessage(ret);
}
}

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -91,6 +91,8 @@ BEGIN
IDS_DHCPNOTENABLED "Der Adapter %ls ist nicht für DHCP aktiviert.\n"
IDS_DHCPNOADAPTER "Der Vorgang ist fehlgeschlagen, weil kein Adapter sich in einem für diesen\nVorgang zulässigen Zustand befindet.\n"
IDS_DHCPRELEASED "Die IP-Adresse für den Adapter %ls wurde bereits freigegeben.\n"
IDS_DHCPRELEASEERROR "Beim Freigeben der Schnittstellen %ls ist folgender Fehler aufgetreten: "
IDS_DHCPRENEWERROR "Beim Aktualisieren der Schnittstelle %ls ist folgender Fehler aufgetreten: "
END
STRINGTABLE

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -91,6 +91,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -68,6 +68,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Адаптер ""%ls"" не доступен для DHCP.\n"
IDS_DHCPNOADAPTER "Операция завершена с ошибкой, поскольку ни один адаптер\nне находился в состоянии, допустимом для её выполнения.\n"
IDS_DHCPRELEASED "IP-адрес для адаптера ""%ls"" уже освобождён.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -89,6 +89,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -90,6 +90,8 @@ BEGIN
IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
IDS_DHCPRELEASEERROR "An error occurred while releasing interface %ls: "
IDS_DHCPRENEWERROR "An error occurred while renewing interface %ls: "
END
STRINGTABLE

View file

@ -75,3 +75,5 @@
#define IDS_DHCPNOTENABLED 205
#define IDS_DHCPNOADAPTER 206
#define IDS_DHCPRELEASED 207
#define IDS_DHCPRELEASEERROR 208
#define IDS_DHCPRENEWERROR 209