1 /* $Id: print.c,v 1.5 2002/09/07 15:12:39 chorns Exp $
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 /* INCLUDES ***************************************************************/
14 #define NTOS_USER_MODE
23 /* FUNCTIONS ***************************************************************/
25 ULONG
DbgService (ULONG Service
, PVOID Context1
, PVOID Context2
);
26 __asm__ ("\n\t.global _DbgService\n\t"
28 "mov 4(%esp), %eax\n\t"
29 "mov 8(%esp), %ecx\n\t"
30 "mov 12(%esp), %edx\n\t"
35 DbgPrint(PCH Format
, ...)
37 ANSI_STRING DebugString
;
41 /* init ansi string */
42 DebugString
.Buffer
= Buffer
;
43 DebugString
.MaximumLength
= sizeof(Buffer
);
45 va_start (ap
, Format
);
46 DebugString
.Length
= _vsnprintf (Buffer
, sizeof(Buffer
), Format
, ap
);
49 DbgService (1, &DebugString
, NULL
);
51 return (ULONG
)DebugString
.Length
;
67 Input
.MaximumLength
= InputSize
;
68 Input
.Buffer
= InputString
;
70 Output
.Length
= strlen (OutputString
);
71 Output
.MaximumLength
= Output
.Length
+ 1;
72 Output
.Buffer
= OutputString
;