Skip to content

Commit ace5f8b

Browse files
committed
[NETSH][IFMON] PrintMessageFromModule must use ConResMsgPrintfExV to print messages
- Update the format strings in ifmon.dll.
1 parent 40a1951 commit ace5f8b

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

base/applications/network/netsh/netsh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ PrintMessageFromModule(
604604
va_list ap;
605605

606606
va_start(ap, dwMsgId);
607-
Length = ConResPrintfExV(StdOut, hModule, dwMsgId,
608-
LANG_USER_DEFAULT, ap);
607+
Length = ConResMsgPrintfExV(StdOut, hModule, 0, dwMsgId,
608+
LANG_USER_DEFAULT, &ap);
609609
va_end(ap);
610610

611611
return (DWORD)Length;

dll/win32/ifmon/lang/en-US.rc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,31 +98,31 @@ Remarks: Resets the Winsock Catalog to a clean state.\n"
9898
Parameters:\n\n\
9999
\n"
100100

101-
IDS_IP_HEADER "\nConfiguration for interface ""%s""\n"
101+
IDS_IP_HEADER "\nConfiguration for interface ""%1!s!""\n"
102102
IDS_DHCP_ON " DHCP enabled: Yes\n"
103103
IDS_DHCP_OFF " DHCP enabled: No\n"
104104
IDS_NOIPADDRESS " IP Address: None\n"
105-
IDS_IPADDRESS " IP Address: %s\n"
106-
IDS_IPADDRESSES " IP Addresses: %s\n"
105+
IDS_IPADDRESS " IP Address: %1!s!\n"
106+
IDS_IPADDRESSES " IP Addresses: %1!s!\n"
107107
IDS_NOSUBNETMASK " Subnet Mask: None\n"
108-
IDS_SUBNETMASK " Subnet Mask: %s\n"
109-
IDS_SUBNETMASKS " Subnet Masks: %s\n"
110-
IDS_DEFAULTGATEWAY " Default Gateway: %s\n"
111-
IDS_GATEWAYMETRIC " Gateway Metric: %s\n"
112-
IDS_INTERFACEMETRIC " Interface Metric: %s\n"
113-
IDS_STATICNAMESERVER " Statically configured DNS Servers: %s\n"
114-
IDS_DHCPNAMESERVER " DNS servers configured through DHCP: %s\n"
115-
IDS_EMPTYLINE " %s\n"
108+
IDS_SUBNETMASK " Subnet Mask: %1!s!\n"
109+
IDS_SUBNETMASKS " Subnet Masks: %1!s!\n"
110+
IDS_DEFAULTGATEWAY " Default Gateway: %1!s!\n"
111+
IDS_GATEWAYMETRIC " Gateway Metric: %1!s!\n"
112+
IDS_INTERFACEMETRIC " Interface Metric: %1!s!\n"
113+
IDS_STATICNAMESERVER " Statically configured DNS Servers: %1!s!\n"
114+
IDS_DHCPNAMESERVER " DNS servers configured through DHCP: %1!s!\n"
115+
IDS_EMPTYLINE " %1!s!\n"
116116

117117
IDS_DUMP_NEWLINE "\n"
118118
IDS_DUMP_HEADERLINE "# ----------------------------------\n"
119119

120120
IDS_DUMP_IP_HEADER "# Interface IP Configuration\n"
121-
IDS_DUMP_IP_INTERFACE "# Interface IP Configuration for ""%s""\n"
121+
IDS_DUMP_IP_INTERFACE "# Interface IP Configuration for ""%1!s!""\n"
122122
IDS_DUMP_IP_FOOTER "# End of Interface IP Configuration\n"
123123

124-
IDS_ERROR_INVALID_INTERFACE "\nInvalid interface %s specified.\n"
125-
IDS_ERROR_BAD_VALUE "\n%s is not an acceptable value for %s.\n"
124+
IDS_ERROR_INVALID_INTERFACE "\nInvalid interface %1!s! specified.\n"
125+
IDS_ERROR_BAD_VALUE "\n%1!s! is not an acceptable value for %1!s!.\n"
126126
IDS_ERROR_ALREADY_DHCP "\nDhcp is already enabled on this interface.\n"
127-
IDS_ERROR_GET_PROPERTIES "\nError obtaining configuration for interface %s.\n"
127+
IDS_ERROR_GET_PROPERTIES "\nError obtaining configuration for interface %1!s!.\n"
128128
END

0 commit comments

Comments
 (0)