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"
33 DbgPrint(PCH Format, ...)
35 ANSI_STRING DebugString;
39 /* init ansi string */
40 DebugString.Buffer = Buffer;
41 DebugString.MaximumLength = sizeof(Buffer);
43 va_start (ap, Format);
44 DebugString.Length = _vsnprintf (Buffer, sizeof(Buffer), Format, ap);
47 DbgService (1, &DebugString, NULL);
49 return (ULONG)DebugString.Length;
68 Input.MaximumLength = InputSize;
69 Input.Buffer = InputString;
71 Output.Length = strlen (OutputString);
72 Output.MaximumLength = Output.Length + 1;
73 Output.Buffer = OutputString;