[LOGONUI] Make Logon UI compilable again (#4684)

Logon UI was excluded from CMake build, probably for not being compliant
with 'warnings are errors' standard introduced at some point.
In the future, I would probably try to make Logon UI usable
alongside with the classic msgina interface.

- Add logonui back to CMakeLists
- Replace 'wcscpy_s' Vista+ function with StringCchCopyW
- Exclude some unused functions

Signed-off-by: Vitaly Orekhov <crce2000@mail.ru>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
This commit is contained in:
Vitaly Orekhov 2022-09-14 15:10:37 +03:00 committed by GitHub
parent c8f4e4de62
commit 3647f6a5eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View file

@ -6,6 +6,7 @@ add_subdirectory(diskpart)
add_subdirectory(dllhost)
add_subdirectory(expand)
add_subdirectory(format)
add_subdirectory(logonui)
add_subdirectory(lsass)
add_subdirectory(msiexec)
add_subdirectory(regsvr32)

View file

@ -0,0 +1,5 @@
add_executable(logonui logonui.c NT5design.c logonui.rc)
set_module_type(logonui win32gui UNICODE)
add_importlibs(logonui gdi32 user32 msimg32 shell32 msvcrt kernel32)
add_cd_file(TARGET logonui DESTINATION reactos/system32 FOR all)

View file

@ -6,6 +6,7 @@
*/
#include "logonui.h"
#include <strsafe.h>
/* GLOBALS ******************************************************************/
@ -30,7 +31,7 @@ NT5_DrawLogoffCaptionText(LPWSTR lpText,
LogFont.lfCharSet = DEFAULT_CHARSET;
LogFont.lfHeight = 22;
LogFont.lfWeight = 109; // From WinXP disassembly
wcscpy_s(LogFont.lfFaceName, LF_FACESIZE, L"Arial");
StringCchCopyW(LogFont.lfFaceName, _countof(LogFont.lfFaceName), L"Arial");
/* Create it */
hFont = CreateFontIndirectW(&LogFont);
@ -136,8 +137,6 @@ NT5_DrawBaseBackground(HDC hdcDesktop)
{
HBITMAP hBitmap = NULL;
HDC hdcMem = NULL;
BOOL bRet = FALSE;
/* Create an an off screen DC to match the desktop DC */
hdcMem = CreateCompatibleDC(hdcDesktop);

View file

@ -37,6 +37,7 @@ DrawLogoffScreen(HDC hdcMem)
NT5_CreateLogoffScreen(L"Saving your settings...", hdcMem);
}
#if 0
static ULONG
GetULONG(LPWSTR String)
{
@ -81,6 +82,7 @@ GetULONG2(LPWSTR String1, LPWSTR String2, PINT i)
return Value;
}
#endif
static BOOL
ParseCmdline(int argc, WCHAR* argv[])