kernel32: Always use ANSI version of OutputDebugString.
This commit is contained in:
parent
2be38232ea
commit
3eaecf0476
|
@ -118,7 +118,7 @@ BOOL WINAPI WaitForDebugEvent(
|
||||||
break;
|
break;
|
||||||
case OUTPUT_DEBUG_STRING_EVENT:
|
case OUTPUT_DEBUG_STRING_EVENT:
|
||||||
event->u.DebugString.lpDebugStringData = wine_server_get_ptr( data.output_string.string );
|
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;
|
event->u.DebugString.nDebugStringLength = data.output_string.length;
|
||||||
break;
|
break;
|
||||||
case RIP_EVENT:
|
case RIP_EVENT:
|
||||||
|
@ -243,7 +243,6 @@ void WINAPI OutputDebugStringA( LPCSTR str )
|
||||||
SERVER_START_REQ( output_debug_string )
|
SERVER_START_REQ( output_debug_string )
|
||||||
{
|
{
|
||||||
req->string = wine_server_client_ptr( str );
|
req->string = wine_server_client_ptr( str );
|
||||||
req->unicode = 0;
|
|
||||||
req->length = strlen(str) + 1;
|
req->length = strlen(str) + 1;
|
||||||
wine_server_call( req );
|
wine_server_call( req );
|
||||||
}
|
}
|
||||||
|
@ -267,15 +266,15 @@ void WINAPI OutputDebugStringA( LPCSTR str )
|
||||||
*/
|
*/
|
||||||
void WINAPI OutputDebugStringW( LPCWSTR 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 );
|
OutputDebugStringA( strA.Buffer );
|
||||||
req->unicode = 1;
|
RtlFreeAnsiString( &strA );
|
||||||
req->length = (lstrlenW(str) + 1) * sizeof(WCHAR);
|
|
||||||
wine_server_call( req );
|
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
|
||||||
WARN("%s\n", debugstr_w(str));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,6 @@ typedef union
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int code;
|
int code;
|
||||||
int unicode;
|
|
||||||
client_ptr_t string;
|
client_ptr_t string;
|
||||||
data_size_t length;
|
data_size_t length;
|
||||||
} output_string;
|
} output_string;
|
||||||
|
@ -2048,8 +2047,6 @@ struct output_debug_string_request
|
||||||
struct request_header __header;
|
struct request_header __header;
|
||||||
data_size_t length;
|
data_size_t length;
|
||||||
client_ptr_t string;
|
client_ptr_t string;
|
||||||
int unicode;
|
|
||||||
char __pad_28[4];
|
|
||||||
};
|
};
|
||||||
struct output_debug_string_reply
|
struct output_debug_string_reply
|
||||||
{
|
{
|
||||||
|
@ -5347,6 +5344,6 @@ union generic_reply
|
||||||
struct set_window_layered_info_reply set_window_layered_info_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 */
|
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||||
|
|
|
@ -699,7 +699,6 @@ DECL_HANDLER(output_debug_string)
|
||||||
debug_event_t data;
|
debug_event_t data;
|
||||||
|
|
||||||
data.output_string.string = req->string;
|
data.output_string.string = req->string;
|
||||||
data.output_string.unicode = req->unicode;
|
|
||||||
data.output_string.length = req->length;
|
data.output_string.length = req->length;
|
||||||
generate_debug_event( current, OUTPUT_DEBUG_STRING_EVENT, &data );
|
generate_debug_event( current, OUTPUT_DEBUG_STRING_EVENT, &data );
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,9 +131,8 @@ typedef union
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int code; /* OUTPUT_DEBUG_STRING_EVENT */
|
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 */
|
data_size_t length; /* string length */
|
||||||
|
client_ptr_t string; /* string to display (in debugged process address space) */
|
||||||
} output_string;
|
} output_string;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
@ -1580,7 +1579,6 @@ enum char_info_mode
|
||||||
@REQ(output_debug_string)
|
@REQ(output_debug_string)
|
||||||
data_size_t length; /* string length */
|
data_size_t length; /* string length */
|
||||||
client_ptr_t string; /* string to display (in debugged process address space) */
|
client_ptr_t string; /* string to display (in debugged process address space) */
|
||||||
int unicode; /* is it Unicode? */
|
|
||||||
@END
|
@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( 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, length) == 12 );
|
||||||
C_ASSERT( FIELD_OFFSET(struct output_debug_string_request, string) == 16 );
|
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) == 24 );
|
||||||
C_ASSERT( sizeof(struct output_debug_string_request) == 32 );
|
|
||||||
C_ASSERT( FIELD_OFFSET(struct continue_debug_event_request, pid) == 12 );
|
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, tid) == 16 );
|
||||||
C_ASSERT( FIELD_OFFSET(struct continue_debug_event_request, status) == 20 );
|
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:
|
case OUTPUT_DEBUG_STRING_EVENT:
|
||||||
fprintf( stderr, "%s{output_string", prefix );
|
fprintf( stderr, "%s{output_string", prefix );
|
||||||
dump_uint64( ",string=", &event.output_string.string );
|
dump_uint64( ",string=", &event.output_string.string );
|
||||||
fprintf( stderr, ",unicode=%d,len=%u}",
|
fprintf( stderr, ",len=%u}", event.output_string.length );
|
||||||
event.output_string.unicode, event.output_string.length );
|
|
||||||
break;
|
break;
|
||||||
case RIP_EVENT:
|
case RIP_EVENT:
|
||||||
fprintf( stderr, "%s{rip,err=%d,type=%d}", prefix,
|
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 );
|
fprintf( stderr, " length=%u", req->length );
|
||||||
dump_uint64( ", string=", &req->string );
|
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 )
|
static void dump_continue_debug_event_request( const struct continue_debug_event_request *req )
|
||||||
|
|
Loading…
Reference in New Issue