[NETSH][IFMON] Make output windows compatible

- Help text string resources must be newline terminated.
- Format strings must not be newline terminated.
- Tested with WinXP ifmon.dll.
This commit is contained in:
Eric Kohl
2025-09-28 23:23:46 +02:00
parent f5204f85b1
commit 98a8996954
3 changed files with 18 additions and 18 deletions

View File

@@ -66,7 +66,7 @@ PrintShortCommands(
{
if (LoadStringW(pContext->hModule, pCommand->dwShortCmdHelpToken, szBuffer, 80) == 0)
szBuffer[0] = UNICODE_NULL;
ConPrintf(StdOut, L"%-15s - %s\n", pCommand->pwszCmdToken, szBuffer);
ConPrintf(StdOut, L"%-15s - %s", pCommand->pwszCmdToken, szBuffer);
pCommand = pCommand->pNext;
}
}
@@ -85,7 +85,7 @@ PrintShortGroups(
{
if (LoadStringW(pContext->hModule, pGroup->dwShortCmdHelpToken, szBuffer, 80) == 0)
szBuffer[0] = UNICODE_NULL;
ConPrintf(StdOut, L"%-15s - %s\n", pGroup->pwszCmdGroupToken, szBuffer);
ConPrintf(StdOut, L"%-15s - %s", pGroup->pwszCmdGroupToken, szBuffer);
pGroup = pGroup->pNext;
}
}
@@ -124,7 +124,7 @@ PrintShortGroupCommands(
swprintf(szBuffer1, L"%s %s", pGroup->pwszCmdGroupToken, pCommand->pwszCmdToken);
LoadStringW(pContext->hModule, pCommand->dwShortCmdHelpToken, szBuffer2, 80);
ConPrintf(StdOut, L"%-15s - %s\n", szBuffer1, szBuffer2);
ConPrintf(StdOut, L"%-15s - %s", szBuffer1, szBuffer2);
pCommand = pCommand->pNext;
}
}

View File

@@ -25,27 +25,27 @@ BEGIN
IDS_HELP_FOOTER "\nHelp Footer\n\n"
IDS_SUBCONTEXT_HEADER "\nThe following sub-contexts are available:\n"
IDS_HLP_UP "Goes up one context level."
IDS_HLP_UP "Goes up one context level.\n"
IDS_HLP_UP_EX "Syntax: ..\n\n Goes up one context level.\n\n"
IDS_HLP_EXIT "Exits the program."
IDS_HLP_EXIT "Exits the program.\n"
IDS_HLP_EXIT_EX "Syntax: exit\n\n Exits the program.\n\n"
IDS_HLP_HELP "Displays a list of commands."
IDS_HLP_HELP "Displays a list of commands.\n"
IDS_HLP_HELP_EX "Syntax: help\n\n Displays a list of commands.\n\n"
IDS_HLP_POPD "Changes to the context on the stack."
IDS_HLP_POPD "Changes to the context on the stack.\n"
IDS_HLP_POPD_EX "Syntax: popd\n\n Changes to the context on the stack.\n\n"
IDS_HLP_PUSHD "Stores the current context on the stack."
IDS_HLP_PUSHD "Stores the current context on the stack.\n"
IDS_HLP_PUSHD_EX "Syntax: pushd\n\n Stores the current context on the stack.\n\n"
IDS_HLP_ADD_HELPER "Installs a helper DLL."
IDS_HLP_ADD_HELPER "Installs a helper DLL.\n"
IDS_HLP_ADD_HELPER_EX "Syntax: add helper <dll file name>\n\n Installs the specified helper DLL in netsh.\n\n"
IDS_HLP_DEL_HELPER "Removes a helper DLL."
IDS_HLP_DEL_HELPER "Removes a helper DLL.\n"
IDS_HLP_DEL_HELPER_EX "Syntax: delete helper <dll file name>\n\n Removes the specified helper DLL from netsh.\n\n"
IDS_HLP_SHOW_HELPER "Lists all the top-level helpers."
IDS_HLP_SHOW_HELPER "Lists all the top-level helpers.\n"
IDS_HLP_SHOW_HELPER_EX "Syntax: show helper\n\n Lists all the top-level helpers.\n\n"
IDS_HLP_GROUP_ADD "Adds a configuration entry to a list of entries."
IDS_HLP_GROUP_DELETE "Deletes a configuration entry from a list of entries."
IDS_HLP_GROUP_SHOW "Displays information."
IDS_HLP_GROUP_ADD "Adds a configuration entry to a list of entries.\n"
IDS_HLP_GROUP_DELETE "Deletes a configuration entry from a list of entries.\n"
IDS_HLP_GROUP_SHOW "Displays information.\n"
END

View File

@@ -6,12 +6,12 @@ BEGIN
IDS_HLP_INTERFACE_SHOW_INTERFACE "Displays interfaces.\n"
IDS_HLP_INTERFACE_SHOW_INTERFACE_EX "\nUsage:\n"
IDS_HLP_IP_SHOW "Displays IP information."
IDS_HLP_ADDRESSES "Displays IP address configuration."
IDS_HLP_IP_SHOW "Displays IP information.\n"
IDS_HLP_ADDRESSES "Displays IP address configuration.\n"
IDS_HLP_ADDRESSES_EX "Usage: addresses [string]\n\n Display IP address configuration.\n"
IDS_HLP_CONFIG "Displays IP address and additional information."
IDS_HLP_CONFIG "Displays IP address and additional information.\n"
IDS_HLP_CONFIG_EX "Usage: config [string]\n\n Display IP address and additional information.\n"
IDS_HLP_DNS "Displays the DNS server addresses."
IDS_HLP_DNS "Displays the DNS server addresses.\n"
IDS_HLP_DNS_EX "Usage: dns [string]\n\n Display DNS server adresses.\n"
IDS_IP_HEADER "\nConfiguration for interface ""%s""\n"