From d080afd5a60f4f701229ad922b75f1c930b94fcd Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sat, 26 Feb 2005 23:18:27 +0000 Subject: [PATCH] DbgPrint calls DbgPrintEx (which runs the code previously belonging to DbgPrint). svn path=/trunk/; revision=13759 --- reactos/lib/ntdll/dbg/print.c | 32 ++++++++++++++++++++++++++++++-- reactos/lib/ntdll/def/ntdll.def | 1 + 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/reactos/lib/ntdll/dbg/print.c b/reactos/lib/ntdll/dbg/print.c index 60a8d5cc202..7e4e211aa36 100644 --- a/reactos/lib/ntdll/dbg/print.c +++ b/reactos/lib/ntdll/dbg/print.c @@ -26,6 +26,35 @@ __asm__ ("\n\t.global _DbgService\n\t" "int $0x2D\n\t" "ret\n\t"); +/* + * @unimplemented + */ +ULONG +DbgPrintEx( + IN ULONG ComponentId, + IN ULONG Level, + IN PCH Format, + ... + ) +{ + ANSI_STRING DebugString; + CHAR Buffer[4096]; + va_list ap; + + /* init ansi string */ + DebugString.Buffer = Buffer; + DebugString.MaximumLength = sizeof(Buffer); + + va_start (ap, Format); + DebugString.Length = _vsnprintf (Buffer, sizeof(Buffer), Format, ap); + va_end (ap); + + DbgService (1, &DebugString, NULL); + + return (ULONG)DebugString.Length; +} + + /* * @implemented */ @@ -44,9 +73,8 @@ DbgPrint(PCH Format, ...) DebugString.Length = _vsnprintf (Buffer, sizeof(Buffer), Format, ap); va_end (ap); - DbgService (1, &DebugString, NULL); - return (ULONG)DebugString.Length; + return DbgPrintEx (0, 0, DebugString.Buffer); } diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index 42357752c2c..f9101bae979 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -23,6 +23,7 @@ CsrProbeForWrite@12 CsrSetPriorityClass@8 DbgBreakPoint@0 DbgPrint +DbgPrintEx DbgPrompt@12 DbgSsHandleKmApiMsg@8 DbgSsInitialize@16