diff --git a/reactos/lib/kernel32/internal/dprintf.c b/reactos/lib/kernel32/internal/dprintf.c index ad0f79af06e..b5d46f14499 100644 --- a/reactos/lib/kernel32/internal/dprintf.c +++ b/reactos/lib/kernel32/internal/dprintf.c @@ -3,34 +3,36 @@ #include #include +ULONG DbgService( ULONG Service, PVOID Context1, PVOID Context2 ); + VOID STDCALL OutputDebugStringA(LPCSTR lpOutputString) { - WCHAR DebugStringW[161]; - int i,j; - i = 0; - j = 0; - while ( lpOutputString[i] != 0 ) - { - while ( j < 160 && lpOutputString[i] != 0 ) - { - DebugStringW[j] = (WCHAR)lpOutputString[i]; - i++; - j++; - } - DebugStringW[j] = 0; - OutputDebugStringW(DebugStringW); - j = 0; - } - return; + ANSI_STRING AnsiString; + AnsiString.Buffer = lpOutputString; + AnsiString.Length = AnsiString.MaximumLength = lstrlenA( lpOutputString ); + DbgService( 1, &AnsiString, NULL ); } VOID STDCALL OutputDebugStringW(LPCWSTR lpOutputString) { UNICODE_STRING UnicodeOutput; + ANSI_STRING AnsiString; + char buff[512]; UnicodeOutput.Buffer = (WCHAR *)lpOutputString; UnicodeOutput.Length = lstrlenW(lpOutputString)*sizeof(WCHAR); UnicodeOutput.MaximumLength = UnicodeOutput.Length; - - NtDisplayString(&UnicodeOutput); + AnsiString.Buffer = buff; + AnsiString.MaximumLength = 512; + AnsiString.Length = 0; + if( UnicodeOutput.Length > 512 ) + UnicodeOutput.Length = 512; + if( NT_SUCCESS( RtlUnicodeStringToAnsiString( &AnsiString, &UnicodeOutput, FALSE ) ) ) + DbgService( 1, &AnsiString, NULL ); } + + + + + + diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index b36af1bb9b2..c7e6d2f0f4f 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -1,4 +1,4 @@ -; $Id: ntdll.def,v 1.36 2000/01/10 20:33:50 ekohl Exp $ +; $Id: ntdll.def,v 1.37 2000/01/23 08:16:20 phreak Exp $ ; ; ReactOS Operating System ; @@ -7,6 +7,7 @@ LIBRARY ntdll.dll EXPORTS DbgBreakPoint DbgPrint +DbgService DbgUserBreakPoint NlsAnsiCodePage NlsMbCodePageTag diff --git a/reactos/lib/ntdll/def/ntdll.edf b/reactos/lib/ntdll/def/ntdll.edf index fc37188f15c..3076309b2fe 100644 --- a/reactos/lib/ntdll/def/ntdll.edf +++ b/reactos/lib/ntdll/def/ntdll.edf @@ -1,4 +1,4 @@ -; $Id: ntdll.edf,v 1.26 2000/01/10 20:33:50 ekohl Exp $ +; $Id: ntdll.edf,v 1.27 2000/01/23 08:16:20 phreak Exp $ ; ; ReactOS Operating System ; @@ -635,3 +635,4 @@ LdrUnloadDll LdrAccessResource LdrFindResource_U ;RtlCopyMemory=RtlCopyMemory@12 +DbgService diff --git a/reactos/lib/ntdll/makefile b/reactos/lib/ntdll/makefile index 30372338875..e0652bfe06a 100644 --- a/reactos/lib/ntdll/makefile +++ b/reactos/lib/ntdll/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.35 2000/01/14 02:22:17 ekohl Exp $ +# $Id: makefile,v 1.36 2000/01/23 08:16:20 phreak Exp $ # # ReactOS Operating System # @@ -6,6 +6,7 @@ TARGET=ntdll BASE_CFLAGS = -I../../include -D__NTDLL__ +include ../../rules.mak IMAGE_BASE = 0x77f60000 ifneq ($(HOST),mingw32-windows) @@ -130,5 +131,4 @@ else endif #WARNINGS_ARE_ERRORS = yes -include ../../rules.mak