Commit 2d7465eb authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Remove no longer needed result pointer from win_proc_params.

We may always use NtCallbackReturn now.
parent 0958278f
......@@ -1181,8 +1181,7 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
{
LRESULT result, *result_ptr = params->result;
params->result = &result;
LRESULT result;
if (params->needs_unpack)
{
......@@ -1213,14 +1212,8 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
else
{
result = dispatch_win_proc_params( params );
if (result_ptr)
{
*result_ptr = result;
return TRUE;
}
NtCallbackReturn( &result, sizeof(result), TRUE );
}
return TRUE;
return NtCallbackReturn( &result, sizeof(result), TRUE );
}
BOOL WINAPI User32CallSendAsyncCallback( const struct send_async_params *params, ULONG size )
......
......@@ -248,7 +248,6 @@ static BOOL init_window_call_params( struct win_proc_params *params, HWND hwnd,
params->msg = msg;
params->wparam = wParam;
params->lparam = lParam;
params->result = NULL;
params->ansi = ansi;
params->needs_unpack = FALSE;
params->mapping = mapping;
......@@ -267,7 +266,6 @@ static LRESULT dispatch_win_proc_params( struct win_proc_params *params, size_t
if (thread_info->recursion_count > MAX_WINPROC_RECURSION) return 0;
thread_info->recursion_count++;
params->result = &result;
KeUserModeCallback( NtUserCallWinProc, params, size, &ret_ptr, &ret_len );
if (ret_len == sizeof(result)) result = *(LRESULT *)ret_ptr;
......
......@@ -285,7 +285,6 @@ struct win_proc_params32
UINT msg;
ULONG wparam;
ULONG lparam;
ULONG result;
BOOL ansi;
BOOL ansi_dst;
BOOL needs_unpack;
......@@ -376,15 +375,13 @@ static struct client_menu_name32 *client_menu_name_64to32( const struct client_m
return name32;
}
static void win_proc_params_64to32( const struct win_proc_params *src, struct win_proc_params32 *dst,
ULONG *result )
static void win_proc_params_64to32( const struct win_proc_params *src, struct win_proc_params32 *dst )
{
dst->func = PtrToUlong( src->func );
dst->hwnd = HandleToUlong( src->hwnd );
dst->msg = src->msg;
dst->wparam = src->wparam;
dst->lparam = src->lparam;
dst->result = PtrToUlong( result );
dst->ansi = src->ansi;
dst->ansi_dst = src->ansi_dst;
dst->needs_unpack = src->needs_unpack;
......@@ -543,8 +540,7 @@ static NTSTATUS WINAPI wow64_NtUserCallWinProc( void *arg, ULONG size )
{
struct win_proc_params *params = arg;
struct win_proc_params32 params32_buf, *params32 = &params32_buf;
LONG result32 = 0;
LRESULT result;
LRESULT result = 0;
void *ret_ptr;
ULONG ret_len;
NTSTATUS status;
......@@ -555,19 +551,13 @@ static NTSTATUS WINAPI wow64_NtUserCallWinProc( void *arg, ULONG size )
return 0;
memcpy( params32 + 1, params + 1, size - sizeof(*params) );
}
win_proc_params_64to32( params, params32, NULL );
win_proc_params_64to32( params, params32 );
status = Wow64KiUserCallbackDispatcher( NtUserCallWinProc, params32,
size - sizeof(*params) + sizeof(*params32),
&ret_ptr, &ret_len );
if (ret_len == sizeof(result32)) result32 = *(LONG *)ret_ptr;
result = result32;
if (params->result)
{
*params->result = result;
return status;
}
if (ret_len == sizeof(LONG)) result = *(LONG *)ret_ptr;
return NtCallbackReturn( &result, sizeof(result), status );
}
......@@ -3083,15 +3073,13 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args )
{
struct win_proc_params32 *params32 = result_info;
struct win_proc_params params;
ULONG *result32;
result32 = UlongToPtr( params32->result );
if (type == NtUserCallWindowProc) params.func = UlongToPtr( params32->func );
if (!NtUserMessageCall( hwnd, msg, wparam, lparam, &params, type, ansi ))
return FALSE;
win_proc_params_64to32( &params, params32, result32 );
win_proc_params_64to32( &params, params32 );
return TRUE;
}
......@@ -3106,7 +3094,7 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args )
params.hwnd = 0;
ret = message_call_32to64( hwnd, msg, wparam, lparam, &params, type, ansi );
if (params.hwnd) win_proc_params_64to32( &params, params32, NULL );
if (params.hwnd) win_proc_params_64to32( &params, params32 );
return ret;
}
......
......@@ -147,7 +147,6 @@ struct win_proc_params
UINT msg;
WPARAM wparam;
LPARAM lparam;
LRESULT *result;
BOOL ansi;
BOOL ansi_dst;
BOOL needs_unpack;
......
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