3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: lib/ntdll/dbg/print.c
6 * PURPOSE: Debug output
7 * PROGRAMMER: Eric Kohl
12 #include <ddk/ntddk.h>
18 /* FUNCTIONS ***************************************************************/
20 ULONG DbgService (ULONG Service, PVOID Context1, PVOID Context2);
21 __asm__ ("\n\t.global _DbgService\n\t"
23 "mov 4(%esp), %eax\n\t"
24 "mov 8(%esp), %ecx\n\t"
25 "mov 12(%esp), %edx\n\t"
30 DbgPrint(PCH Format, ...)
32 ANSI_STRING DebugString;
36 /* init ansi string */
37 DebugString.Buffer = Buffer;
38 DebugString.MaximumLength = sizeof(Buffer);
40 va_start (ap, Format);
41 DebugString.Length = _vsnprintf (Buffer, sizeof(Buffer), Format, ap);
44 DbgService (1, &DebugString, NULL);
46 return (ULONG)DebugString.Length;
62 Input.MaximumLength = InputSize;
63 Input.Buffer = InputString;
65 Output.Length = strlen (OutputString);
66 Output.MaximumLength = Output.Length + 1;
67 Output.Buffer = OutputString;