mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 00:23:10 +00:00
[NET][MC] Replace strings for the ACCOUNTS, GROUP and LOCALGROUP commands by netmsg.dll messages.
This commit is contained in:
parent
5d4d48a850
commit
9f95e35ff3
15 changed files with 160 additions and 230 deletions
|
@ -78,6 +78,84 @@ PrintPadding(
|
|||
}
|
||||
|
||||
|
||||
VOID
|
||||
PrintMessageStringV(
|
||||
DWORD dwMessage,
|
||||
...)
|
||||
{
|
||||
PWSTR pBuffer;
|
||||
va_list args = NULL;
|
||||
|
||||
va_start(args, dwMessage);
|
||||
|
||||
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE,
|
||||
hModuleNetMsg,
|
||||
dwMessage,
|
||||
LANG_USER_DEFAULT,
|
||||
(LPWSTR)&pBuffer,
|
||||
0,
|
||||
&args);
|
||||
va_end(args);
|
||||
|
||||
if (pBuffer)
|
||||
{
|
||||
ConPuts(StdOut, pBuffer);
|
||||
LocalFree(pBuffer);
|
||||
pBuffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
PrintMessageString(
|
||||
DWORD dwMessage)
|
||||
{
|
||||
PWSTR pBuffer;
|
||||
|
||||
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
hModuleNetMsg,
|
||||
dwMessage,
|
||||
LANG_USER_DEFAULT,
|
||||
(LPWSTR)&pBuffer,
|
||||
0,
|
||||
NULL);
|
||||
if (pBuffer)
|
||||
{
|
||||
ConPuts(StdOut, pBuffer);
|
||||
LocalFree(pBuffer);
|
||||
pBuffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
PrintPaddedMessageString(
|
||||
DWORD dwMessage,
|
||||
INT nPaddedLength)
|
||||
{
|
||||
PWSTR pBuffer;
|
||||
DWORD dwLength;
|
||||
|
||||
dwLength = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
hModuleNetMsg,
|
||||
dwMessage,
|
||||
LANG_USER_DEFAULT,
|
||||
(LPWSTR)&pBuffer,
|
||||
0,
|
||||
NULL);
|
||||
if (pBuffer)
|
||||
{
|
||||
ConPuts(StdOut, pBuffer);
|
||||
LocalFree(pBuffer);
|
||||
pBuffer = NULL;
|
||||
}
|
||||
|
||||
if (dwLength < (DWORD)nPaddedLength)
|
||||
PrintPadding(L' ', (DWORD)nPaddedLength - dwLength);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
PrintErrorMessage(
|
||||
DWORD dwError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue