Commit 3eaecf04 authored by Andrey Turkin's avatar Andrey Turkin Committed by Alexandre Julliard

kernel32: Always use ANSI version of OutputDebugString.

parent 2be38232
......@@ -118,7 +118,7 @@ BOOL WINAPI WaitForDebugEvent(
break;
case OUTPUT_DEBUG_STRING_EVENT:
event->u.DebugString.lpDebugStringData = wine_server_get_ptr( data.output_string.string );
event->u.DebugString.fUnicode = data.output_string.unicode;
event->u.DebugString.fUnicode = FALSE;
event->u.DebugString.nDebugStringLength = data.output_string.length;
break;
case RIP_EVENT:
......@@ -243,7 +243,6 @@ void WINAPI OutputDebugStringA( LPCSTR str )
SERVER_START_REQ( output_debug_string )
{
req->string = wine_server_client_ptr( str );
req->unicode = 0;
req->length = strlen(str) + 1;
wine_server_call( req );
}
......@@ -267,15 +266,15 @@ void WINAPI OutputDebugStringA( LPCSTR str )
*/
void WINAPI OutputDebugStringW( LPCWSTR str )
{
SERVER_START_REQ( output_debug_string )
UNICODE_STRING strW;
STRING strA;
RtlInitUnicodeString( &strW, str );
if (!RtlUnicodeStringToAnsiString( &strA, &strW, TRUE ))
{
req->string = wine_server_client_ptr( str );
req->unicode = 1;
req->length = (lstrlenW(str) + 1) * sizeof(WCHAR);
wine_server_call( req );
OutputDebugStringA( strA.Buffer );
RtlFreeAnsiString( &strA );
}
SERVER_END_REQ;
WARN("%s\n", debugstr_w(str));
}
......
......@@ -115,7 +115,6 @@ typedef union
struct
{
int code;
int unicode;
client_ptr_t string;
data_size_t length;
} output_string;
......@@ -2048,8 +2047,6 @@ struct output_debug_string_request
struct request_header __header;
data_size_t length;
client_ptr_t string;
int unicode;
char __pad_28[4];
};
struct output_debug_string_reply
{
......@@ -5347,6 +5344,6 @@ union generic_reply
struct set_window_layered_info_reply set_window_layered_info_reply;
};
#define SERVER_PROTOCOL_VERSION 390
#define SERVER_PROTOCOL_VERSION 391
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
......@@ -699,7 +699,6 @@ DECL_HANDLER(output_debug_string)
debug_event_t data;
data.output_string.string = req->string;
data.output_string.unicode = req->unicode;
data.output_string.length = req->length;
generate_debug_event( current, OUTPUT_DEBUG_STRING_EVENT, &data );
}
......
......@@ -131,9 +131,8 @@ typedef union
struct
{
int code; /* OUTPUT_DEBUG_STRING_EVENT */
int unicode; /* is it Unicode? */
client_ptr_t string; /* string to display (in debugged process address space) */
data_size_t length; /* string length */
client_ptr_t string; /* string to display (in debugged process address space) */
} output_string;
struct
{
......@@ -1580,7 +1579,6 @@ enum char_info_mode
@REQ(output_debug_string)
data_size_t length; /* string length */
client_ptr_t string; /* string to display (in debugged process address space) */
int unicode; /* is it Unicode? */
@END
......
......@@ -1102,8 +1102,7 @@ C_ASSERT( FIELD_OFFSET(struct get_exception_status_request, handle) == 12 );
C_ASSERT( sizeof(struct get_exception_status_reply) == 8 );
C_ASSERT( FIELD_OFFSET(struct output_debug_string_request, length) == 12 );
C_ASSERT( FIELD_OFFSET(struct output_debug_string_request, string) == 16 );
C_ASSERT( FIELD_OFFSET(struct output_debug_string_request, unicode) == 24 );
C_ASSERT( sizeof(struct output_debug_string_request) == 32 );
C_ASSERT( sizeof(struct output_debug_string_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct continue_debug_event_request, pid) == 12 );
C_ASSERT( FIELD_OFFSET(struct continue_debug_event_request, tid) == 16 );
C_ASSERT( FIELD_OFFSET(struct continue_debug_event_request, status) == 20 );
......
......@@ -656,8 +656,7 @@ static void dump_varargs_debug_event( const char *prefix, data_size_t size )
case OUTPUT_DEBUG_STRING_EVENT:
fprintf( stderr, "%s{output_string", prefix );
dump_uint64( ",string=", &event.output_string.string );
fprintf( stderr, ",unicode=%d,len=%u}",
event.output_string.unicode, event.output_string.length );
fprintf( stderr, ",len=%u}", event.output_string.length );
break;
case RIP_EVENT:
fprintf( stderr, "%s{rip,err=%d,type=%d}", prefix,
......@@ -1994,7 +1993,6 @@ static void dump_output_debug_string_request( const struct output_debug_string_r
{
fprintf( stderr, " length=%u", req->length );
dump_uint64( ", string=", &req->string );
fprintf( stderr, ", unicode=%d", req->unicode );
}
static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment