Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a53330b9
Commit
a53330b9
authored
Jul 09, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use syscall interface for message functions.
parent
0d6d8f38
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
45 deletions
+67
-45
gdiobj.c
dlls/win32u/gdiobj.c
+0
-5
syscall.c
dlls/win32u/syscall.c
+5
-0
win32u.spec
dlls/win32u/win32u.spec
+5
-5
win32u_private.h
dlls/win32u/win32u_private.h
+0
-5
wrappers.c
dlls/win32u/wrappers.c
+0
-30
syscall.h
dlls/wow64win/syscall.h
+5
-0
user.c
dlls/wow64win/user.c
+52
-0
No files found.
dlls/win32u/gdiobj.c
View file @
a53330b9
...
...
@@ -1197,9 +1197,6 @@ static struct unix_funcs unix_funcs =
NtUserMapVirtualKeyEx
,
NtUserMoveWindow
,
NtUserOpenClipboard
,
NtUserPeekMessage
,
NtUserPostMessage
,
NtUserPostThreadMessage
,
NtUserRedrawWindow
,
NtUserRegisterClassExWOW
,
NtUserRegisterHotKey
,
...
...
@@ -1242,12 +1239,10 @@ static struct unix_funcs unix_funcs =
NtUserToUnicodeEx
,
NtUserTrackMouseEvent
,
NtUserTranslateAccelerator
,
NtUserTranslateMessage
,
NtUserUnregisterClass
,
NtUserUnregisterHotKey
,
NtUserUpdateLayeredWindow
,
NtUserVkKeyScanEx
,
NtUserWaitForInputIdle
,
NtUserWindowFromPoint
,
SetDIBits
,
...
...
dlls/win32u/syscall.c
View file @
a53330b9
...
...
@@ -170,6 +170,9 @@ static void * const syscalls[] =
NtUserOpenDesktop
,
NtUserOpenInputDesktop
,
NtUserOpenWindowStation
,
NtUserPeekMessage
,
NtUserPostMessage
,
NtUserPostThreadMessage
,
NtUserQueryInputContext
,
NtUserRegisterRawInputDevices
,
NtUserRemoveClipboardFormatListener
,
...
...
@@ -190,9 +193,11 @@ static void * const syscalls[] =
NtUserThunkedMenuInfo
,
NtUserThunkedMenuItemInfo
,
NtUserTrackPopupMenuEx
,
NtUserTranslateMessage
,
NtUserUnhookWinEvent
,
NtUserUnhookWindowsHookEx
,
NtUserUpdateInputContext
,
NtUserWaitForInputIdle
,
NtUserWindowFromDC
,
};
...
...
dlls/win32u/win32u.spec
View file @
a53330b9
...
...
@@ -1098,13 +1098,13 @@
@ stub NtUserPaintDesktop
@ stub NtUserPaintMenuBar
@ stub NtUserPaintMonitor
@ stdcall NtUserPeekMessage(ptr long long long long)
@ stdcall
-syscall
NtUserPeekMessage(ptr long long long long)
@ stub NtUserPerMonitorDPIPhysicalToLogicalPoint
@ stub NtUserPhysicalToLogicalDpiPointForWindow
@ stub NtUserPhysicalToLogicalPoint
@ stub NtUserPostKeyboardInputMessage
@ stdcall NtUserPostMessage(long long long long)
@ stdcall NtUserPostThreadMessage(long long long long)
@ stdcall
-syscall
NtUserPostMessage(long long long long)
@ stdcall
-syscall
NtUserPostThreadMessage(long long long long)
@ stub NtUserPrintWindow
@ stub NtUserProcessConnect
@ stub NtUserProcessInkFeedbackCommand
...
...
@@ -1282,7 +1282,7 @@
@ stub NtUserTransformPoint
@ stub NtUserTransformRect
@ stdcall NtUserTranslateAccelerator(long long ptr)
@ stdcall NtUserTranslateMessage(ptr long)
@ stdcall
-syscall
NtUserTranslateMessage(ptr long)
@ stub NtUserUndelegateInput
@ stdcall -syscall NtUserUnhookWinEvent(long)
@ stdcall -syscall NtUserUnhookWindowsHookEx(long)
...
...
@@ -1305,7 +1305,7 @@
@ stdcall NtUserVkKeyScanEx(long long)
@ stub NtUserWOWCleanup
@ stub NtUserWaitAvailableMessageEx
@ stdcall NtUserWaitForInputIdle(long long long)
@ stdcall
-syscall
NtUserWaitForInputIdle(long long long)
@ stub NtUserWaitForMsgAndEvent
@ stub NtUserWaitForRedirectionStartComplete
@ stub NtUserWaitMessage
...
...
dlls/win32u/win32u_private.h
View file @
a53330b9
...
...
@@ -261,9 +261,6 @@ struct unix_funcs
UINT
(
WINAPI
*
pNtUserMapVirtualKeyEx
)(
UINT
code
,
UINT
type
,
HKL
layout
);
BOOL
(
WINAPI
*
pNtUserMoveWindow
)(
HWND
hwnd
,
INT
x
,
INT
y
,
INT
cx
,
INT
cy
,
BOOL
repaint
);
BOOL
(
WINAPI
*
pNtUserOpenClipboard
)(
HWND
hwnd
,
ULONG
unk
);
BOOL
(
WINAPI
*
pNtUserPeekMessage
)(
MSG
*
msg_out
,
HWND
hwnd
,
UINT
first
,
UINT
last
,
UINT
flags
);
BOOL
(
WINAPI
*
pNtUserPostMessage
)(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
BOOL
(
WINAPI
*
pNtUserPostThreadMessage
)(
DWORD
thread
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
);
BOOL
(
WINAPI
*
pNtUserRedrawWindow
)(
HWND
hwnd
,
const
RECT
*
rect
,
HRGN
hrgn
,
UINT
flags
);
ATOM
(
WINAPI
*
pNtUserRegisterClassExWOW
)(
const
WNDCLASSEXW
*
wc
,
UNICODE_STRING
*
name
,
UNICODE_STRING
*
version
,
...
...
@@ -316,7 +313,6 @@ struct unix_funcs
WCHAR
*
str
,
int
size
,
UINT
flags
,
HKL
layout
);
BOOL
(
WINAPI
*
pNtUserTrackMouseEvent
)(
TRACKMOUSEEVENT
*
info
);
INT
(
WINAPI
*
pNtUserTranslateAccelerator
)(
HWND
hwnd
,
HACCEL
accel
,
MSG
*
msg
);
BOOL
(
WINAPI
*
pNtUserTranslateMessage
)(
const
MSG
*
msg
,
UINT
flags
);
BOOL
(
WINAPI
*
pNtUserUnregisterClass
)(
UNICODE_STRING
*
name
,
HINSTANCE
instance
,
struct
client_menu_name
*
client_menu_name
);
BOOL
(
WINAPI
*
pNtUserUnregisterHotKey
)(
HWND
hwnd
,
INT
id
);
...
...
@@ -325,7 +321,6 @@ struct unix_funcs
COLORREF
key
,
const
BLENDFUNCTION
*
blend
,
DWORD
flags
,
const
RECT
*
dirty
);
WORD
(
WINAPI
*
pNtUserVkKeyScanEx
)(
WCHAR
chr
,
HKL
layout
);
DWORD
(
WINAPI
*
pNtUserWaitForInputIdle
)(
HANDLE
process
,
DWORD
timeout
,
BOOL
wow
);
HWND
(
WINAPI
*
pNtUserWindowFromPoint
)(
LONG
x
,
LONG
y
);
/* Wine-specific functions */
...
...
dlls/win32u/wrappers.c
View file @
a53330b9
...
...
@@ -1103,24 +1103,6 @@ BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk )
return
unix_funcs
->
pNtUserOpenClipboard
(
hwnd
,
unk
);
}
BOOL
WINAPI
NtUserPeekMessage
(
MSG
*
msg_out
,
HWND
hwnd
,
UINT
first
,
UINT
last
,
UINT
flags
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtUserPeekMessage
(
msg_out
,
hwnd
,
first
,
last
,
flags
);
}
BOOL
WINAPI
NtUserPostMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtUserPostMessage
(
hwnd
,
msg
,
wparam
,
lparam
);
}
BOOL
WINAPI
NtUserPostThreadMessage
(
DWORD
thread
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
if
(
!
unix_funcs
)
return
FALSE
;
return
unix_funcs
->
pNtUserPostThreadMessage
(
thread
,
msg
,
wparam
,
lparam
);
}
BOOL
WINAPI
NtUserRedrawWindow
(
HWND
hwnd
,
const
RECT
*
rect
,
HRGN
hrgn
,
UINT
flags
)
{
if
(
!
unix_funcs
)
return
FALSE
;
...
...
@@ -1381,12 +1363,6 @@ INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg )
return
unix_funcs
->
pNtUserTranslateAccelerator
(
hwnd
,
accel
,
msg
);
}
BOOL
WINAPI
NtUserTranslateMessage
(
const
MSG
*
msg
,
UINT
flags
)
{
if
(
!
unix_funcs
)
return
0
;
return
unix_funcs
->
pNtUserTranslateMessage
(
msg
,
flags
);
}
BOOL
WINAPI
NtUserUnregisterClass
(
UNICODE_STRING
*
name
,
HINSTANCE
instance
,
struct
client_menu_name
*
client_menu_name
)
{
...
...
@@ -1415,12 +1391,6 @@ WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout )
return
unix_funcs
->
pNtUserVkKeyScanEx
(
chr
,
layout
);
}
DWORD
WINAPI
NtUserWaitForInputIdle
(
HANDLE
process
,
DWORD
timeout
,
BOOL
wow
)
{
if
(
!
unix_funcs
)
return
0
;
return
unix_funcs
->
pNtUserWaitForInputIdle
(
process
,
timeout
,
wow
);
}
HWND
WINAPI
NtUserWindowFromPoint
(
LONG
x
,
LONG
y
)
{
if
(
!
unix_funcs
)
return
0
;
...
...
dlls/wow64win/syscall.h
View file @
a53330b9
...
...
@@ -157,6 +157,9 @@
SYSCALL_ENTRY( NtUserOpenDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
SYSCALL_ENTRY( NtUserOpenWindowStation ) \
SYSCALL_ENTRY( NtUserPeekMessage ) \
SYSCALL_ENTRY( NtUserPostMessage ) \
SYSCALL_ENTRY( NtUserPostThreadMessage ) \
SYSCALL_ENTRY( NtUserQueryInputContext ) \
SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \
SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \
...
...
@@ -177,9 +180,11 @@
SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \
SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \
SYSCALL_ENTRY( NtUserTrackPopupMenuEx ) \
SYSCALL_ENTRY( NtUserTranslateMessage ) \
SYSCALL_ENTRY( NtUserUnhookWinEvent ) \
SYSCALL_ENTRY( NtUserUnhookWindowsHookEx ) \
SYSCALL_ENTRY( NtUserUpdateInputContext ) \
SYSCALL_ENTRY( NtUserWaitForInputIdle ) \
SYSCALL_ENTRY( NtUserWindowFromDC )
#endif
/* __WOW64WIN_SYSCALL_H */
dlls/wow64win/user.c
View file @
a53330b9
...
...
@@ -927,6 +927,40 @@ NTSTATUS WINAPI wow64_NtUserOpenWindowStation( UINT *args )
return
HandleToUlong
(
NtUserOpenWindowStation
(
objattr_32to64
(
&
attr
,
attr32
),
access
));
}
NTSTATUS
WINAPI
wow64_NtUserPeekMessage
(
UINT
*
args
)
{
MSG32
*
msg32
=
get_ptr
(
&
args
);
HWND
hwnd
=
get_handle
(
&
args
);
UINT
first
=
get_ulong
(
&
args
);
UINT
last
=
get_ulong
(
&
args
);
UINT
flags
=
get_ulong
(
&
args
);
MSG
msg
;
if
(
!
NtUserPeekMessage
(
&
msg
,
hwnd
,
first
,
last
,
flags
))
return
FALSE
;
msg_64to32
(
&
msg
,
msg32
);
return
TRUE
;
}
NTSTATUS
WINAPI
wow64_NtUserPostMessage
(
UINT
*
args
)
{
HWND
hwnd
=
get_handle
(
&
args
);
UINT
msg
=
get_ulong
(
&
args
);
WPARAM
wparam
=
get_ulong
(
&
args
);
LPARAM
lparam
=
get_ulong
(
&
args
);
return
NtUserPostMessage
(
hwnd
,
msg
,
wparam
,
lparam
);
}
NTSTATUS
WINAPI
wow64_NtUserPostThreadMessage
(
UINT
*
args
)
{
DWORD
thread
=
get_ulong
(
&
args
);
UINT
msg
=
get_ulong
(
&
args
);
WPARAM
wparam
=
get_ulong
(
&
args
);
LPARAM
lparam
=
get_ulong
(
&
args
);
return
NtUserPostThreadMessage
(
thread
,
msg
,
wparam
,
lparam
);
}
NTSTATUS
WINAPI
wow64_NtUserQueryInputContext
(
UINT
*
args
)
{
HIMC
handle
=
get_handle
(
&
args
);
...
...
@@ -1190,6 +1224,15 @@ NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args )
return
NtUserTrackPopupMenuEx
(
handle
,
flags
,
x
,
y
,
hwnd
,
params
);
}
NTSTATUS
WINAPI
wow64_NtUserTranslateMessage
(
UINT
*
args
)
{
const
MSG32
*
msg32
=
get_ptr
(
&
args
);
UINT
flags
=
get_ulong
(
&
args
);
MSG
msg
;
return
NtUserTranslateMessage
(
msg_32to64
(
&
msg
,
msg32
),
flags
);
}
NTSTATUS
WINAPI
wow64_NtUserUnhookWinEvent
(
UINT
*
args
)
{
HWINEVENTHOOK
handle
=
get_handle
(
&
args
);
...
...
@@ -1213,6 +1256,15 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args )
return
NtUserUpdateInputContext
(
handle
,
attr
,
value
);
}
NTSTATUS
WINAPI
wow64_NtUserWaitForInputIdle
(
UINT
*
args
)
{
HANDLE
process
=
get_handle
(
&
args
);
DWORD
timeout
=
get_ulong
(
&
args
);
BOOL
wow
=
get_ulong
(
&
args
);
return
NtUserWaitForInputIdle
(
process
,
timeout
,
wow
);
}
NTSTATUS
WINAPI
wow64_NtUserWindowFromDC
(
UINT
*
args
)
{
HDC
hdc
=
get_handle
(
&
args
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment