mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[KBSWITCH] Unlink ntdll and add vDbgPrintExWithPrefix
CORE-18546
This commit is contained in:
@@ -3,7 +3,7 @@ add_rc_deps(kbswitch.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/kbswitch.ico)
|
|||||||
add_executable(kbswitch kbswitch.c kbswitch.rc)
|
add_executable(kbswitch kbswitch.c kbswitch.rc)
|
||||||
set_module_type(kbswitch win32gui UNICODE)
|
set_module_type(kbswitch win32gui UNICODE)
|
||||||
target_link_libraries(kbswitch wine)
|
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_cd_file(TARGET kbswitch DESTINATION reactos/system32 FOR all)
|
||||||
|
|
||||||
add_subdirectory(kbsdll)
|
add_subdirectory(kbsdll)
|
||||||
|
|||||||
@@ -45,6 +45,28 @@ HWND g_hwndLastActive = NULL;
|
|||||||
INT g_cKLs = 0;
|
INT g_cKLs = 0;
|
||||||
HKL g_ahKLs[64];
|
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
|
typedef struct
|
||||||
{
|
{
|
||||||
DWORD dwLayoutId;
|
DWORD dwLayoutId;
|
||||||
|
|||||||
Reference in New Issue
Block a user