user32: Move PostQuitMessage() implementation to win32u.

This commit is contained in:
Alexandre Julliard 2024-11-19 14:48:17 +01:00
parent babb7fbc62
commit c66b27557d
5 changed files with 25 additions and 6 deletions

View file

@ -746,12 +746,7 @@ BOOL WINAPI PostThreadMessageA( DWORD thread, UINT msg, WPARAM wparam, LPARAM lp
*/ */
void WINAPI PostQuitMessage( INT exit_code ) void WINAPI PostQuitMessage( INT exit_code )
{ {
SERVER_START_REQ( post_quit_message ) NtUserPostQuitMessage( exit_code );
{
req->exit_code = exit_code;
wine_server_call( req );
}
SERVER_END_REQ;
} }
/*********************************************************************** /***********************************************************************

View file

@ -3649,6 +3649,20 @@ NTSTATUS send_hardware_message( HWND hwnd, UINT flags, const INPUT *input, LPARA
return ret; return ret;
} }
/***********************************************************************
* post_quit_message
*/
BOOL post_quit_message( int exit_code )
{
SERVER_START_REQ( post_quit_message )
{
req->exit_code = exit_code;
wine_server_call( req );
}
SERVER_END_REQ;
return TRUE;
}
/********************************************************************** /**********************************************************************
* NtUserDispatchMessage (win32u.@) * NtUserDispatchMessage (win32u.@)
*/ */

View file

@ -7006,6 +7006,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
case NtUserCallOneParam_MessageBeep: case NtUserCallOneParam_MessageBeep:
return message_beep( arg ); return message_beep( arg );
case NtUserCallOneParam_PostQuitMessage:
return post_quit_message( arg );
case NtUserCallOneParam_ReplyMessage: case NtUserCallOneParam_ReplyMessage:
return reply_message_result( arg ); return reply_message_result( arg );

View file

@ -132,6 +132,7 @@ extern void track_mouse_menu_bar( HWND hwnd, INT ht, int x, int y );
/* message.c */ /* message.c */
extern BOOL kill_system_timer( HWND hwnd, UINT_PTR id ); extern BOOL kill_system_timer( HWND hwnd, UINT_PTR id );
extern BOOL reply_message_result( LRESULT result ); extern BOOL reply_message_result( LRESULT result );
extern BOOL post_quit_message( int exit_code );
extern NTSTATUS send_hardware_message( HWND hwnd, UINT flags, const INPUT *input, LPARAM lparam ); extern NTSTATUS send_hardware_message( HWND hwnd, UINT flags, const INPUT *input, LPARAM lparam );
extern LRESULT send_internal_message_timeout( DWORD dest_pid, DWORD dest_tid, UINT msg, WPARAM wparam, extern LRESULT send_internal_message_timeout( DWORD dest_pid, DWORD dest_tid, UINT msg, WPARAM wparam,
LPARAM lparam, UINT flags, UINT timeout, LPARAM lparam, UINT flags, UINT timeout,

View file

@ -1035,6 +1035,7 @@ enum
NtUserCallOneParam_GetSystemMetrics, NtUserCallOneParam_GetSystemMetrics,
NtUserCallOneParam_GetVirtualScreenRect, NtUserCallOneParam_GetVirtualScreenRect,
NtUserCallOneParam_MessageBeep, NtUserCallOneParam_MessageBeep,
NtUserCallOneParam_PostQuitMessage,
NtUserCallOneParam_RealizePalette, NtUserCallOneParam_RealizePalette,
NtUserCallOneParam_ReplyMessage, NtUserCallOneParam_ReplyMessage,
NtUserCallOneParam_SetCaretBlinkTime, NtUserCallOneParam_SetCaretBlinkTime,
@ -1141,6 +1142,11 @@ static inline BOOL NtUserMessageBeep( UINT i )
return NtUserCallOneParam( i, NtUserCallOneParam_MessageBeep ); return NtUserCallOneParam( i, NtUserCallOneParam_MessageBeep );
} }
static inline void NtUserPostQuitMessage( INT exit_code )
{
NtUserCallOneParam( exit_code, NtUserCallOneParam_PostQuitMessage );
}
static inline UINT NtUserRealizePalette( HDC hdc ) static inline UINT NtUserRealizePalette( HDC hdc )
{ {
return NtUserCallOneParam( HandleToUlong(hdc), NtUserCallOneParam_RealizePalette ); return NtUserCallOneParam( HandleToUlong(hdc), NtUserCallOneParam_RealizePalette );