[KBSWITCH] Unlink ntdll and add vDbgPrintExWithPrefix

CORE-18546
This commit is contained in:
Katayama Hirofumi MZ
2025-05-24 23:23:22 +09:00
parent 2041f3c7a1
commit 57981ed025
2 changed files with 23 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ add_rc_deps(kbswitch.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/kbswitch.ico)
add_executable(kbswitch kbswitch.c kbswitch.rc)
set_module_type(kbswitch win32gui UNICODE)
target_link_libraries(kbswitch wine)
add_importlibs(kbswitch advapi32 imm32 user32 shell32 shlwapi gdi32 msvcrt kernel32 ntdll)
add_importlibs(kbswitch advapi32 imm32 user32 shell32 shlwapi gdi32 msvcrt kernel32)
add_cd_file(TARGET kbswitch DESTINATION reactos/system32 FOR all)
add_subdirectory(kbsdll)

View File

@@ -45,6 +45,28 @@ HWND g_hwndLastActive = NULL;
INT g_cKLs = 0;
HKL g_ahKLs[64];
ULONG
NTAPI
vDbgPrintExWithPrefix(IN PCCH Prefix,
IN ULONG ComponentId,
IN ULONG Level,
IN PCCH Format,
IN va_list ap)
{
CHAR Buffer[512];
SIZE_T PrefixLength = strlen(Prefix);
strncpy(Buffer, Prefix, PrefixLength);
_vsnprintf(Buffer + PrefixLength,
sizeof(Buffer) - PrefixLength,
Format,
ap);
OutputDebugStringA(Buffer);
return 0;
}
typedef struct
{
DWORD dwLayoutId;