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
0d4817fa
Commit
0d4817fa
authored
Jul 30, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64win: Set last error in 32-bit TEB in wow64 thunks.
parent
f79f58cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
20 deletions
+27
-20
user.c
dlls/wow64win/user.c
+20
-20
wow64win_private.h
dlls/wow64win/wow64win_private.h
+7
-0
No files found.
dlls/wow64win/user.c
View file @
0d4817fa
...
...
@@ -722,13 +722,13 @@ NTSTATUS WINAPI wow64_NtUserFlashWindowEx( UINT *args )
if
(
!
info32
)
{
SetLastError
(
ERROR_NOACCESS
);
set_last_error32
(
ERROR_NOACCESS
);
return
FALSE
;
}
if
(
info32
->
cbSize
!=
sizeof
(
*
info32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -962,7 +962,7 @@ NTSTATUS WINAPI wow64_NtUserGetGUIThreadInfo( UINT *args )
if
(
info32
->
cbSize
!=
sizeof
(
*
info32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -1104,7 +1104,7 @@ NTSTATUS WINAPI wow64_NtUserGetMenuBarInfo( UINT *args )
if
(
info32
->
cbSize
!=
sizeof
(
*
info32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -1210,7 +1210,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputBuffer( UINT *args )
if
(
header_size
!=
sizeof
(
RAWINPUTHEADER32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
~
0u
;
}
...
...
@@ -1230,7 +1230,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
if
(
header_size
!=
sizeof
(
RAWINPUTHEADER32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
~
0u
;
}
...
...
@@ -1246,7 +1246,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
data_size64
=
*
data_size
+
sizeof
(
RAWINPUTHEADER
);
if
(
!
(
data64
=
Wow64AllocateTemp
(
data_size64
)))
{
SetLastError
(
STATUS_NO_MEMORY
);
set_last_error32
(
STATUS_NO_MEMORY
);
return
~
0u
;
}
...
...
@@ -1256,7 +1256,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
body_size
=
ret
-
sizeof
(
RAWINPUTHEADER
);
if
(
*
data_size
<
sizeof
(
RAWINPUTHEADER32
)
+
body_size
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
set_last_error32
(
ERROR_INSUFFICIENT_BUFFER
);
return
~
0u
;
}
...
...
@@ -1292,7 +1292,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
if
(
*
data_size
<
sizeof
(
RAWINPUTHEADER32
))
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
set_last_error32
(
ERROR_INSUFFICIENT_BUFFER
);
return
~
0u
;
}
...
...
@@ -1306,7 +1306,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
}
default:
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
~
0u
;
}
}
...
...
@@ -1329,7 +1329,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputDeviceList( UINT *args )
if
(
size
!=
sizeof
(
RAWINPUTDEVICELIST32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
~
0u
;
}
...
...
@@ -1340,7 +1340,7 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputDeviceList( UINT *args )
if
(
!
(
devices64
=
Wow64AllocateTemp
(
(
*
count
)
*
sizeof
(
*
devices64
)
)))
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
set_last_error32
(
ERROR_NOT_ENOUGH_MEMORY
);
return
~
0u
;
}
...
...
@@ -1376,7 +1376,7 @@ NTSTATUS WINAPI wow64_NtUserRegisterClassExWOW( UINT *args )
if
(
wc32
->
cbSize
!=
sizeof
(
*
wc32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
...
...
@@ -1408,7 +1408,7 @@ NTSTATUS WINAPI wow64_NtUserGetRegisteredRawInputDevices( UINT *args )
if
(
size
!=
sizeof
(
RAWINPUTDEVICE32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
~
0u
;
}
...
...
@@ -1419,7 +1419,7 @@ NTSTATUS WINAPI wow64_NtUserGetRegisteredRawInputDevices( UINT *args )
if
(
!
(
devices64
=
Wow64AllocateTemp
(
(
*
count
)
*
sizeof
(
*
devices64
)
)))
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
set_last_error32
(
ERROR_NOT_ENOUGH_MEMORY
);
return
~
0u
;
}
...
...
@@ -1662,7 +1662,7 @@ NTSTATUS WINAPI wow64_NtUserMsgWaitForMultipleObjectsEx( UINT *args )
if
(
count
>
ARRAYSIZE
(
handles
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
WAIT_FAILED
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
handles
[
i
]
=
UlongToHandle
(
handles32
[
i
]
);
...
...
@@ -1794,13 +1794,13 @@ NTSTATUS WINAPI wow64_NtUserRegisterRawInputDevices( UINT *args )
if
(
size
!=
sizeof
(
RAWINPUTDEVICE32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
(
devices64
=
Wow64AllocateTemp
(
count
*
sizeof
(
*
devices64
)
)))
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
set_last_error32
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
...
...
@@ -1864,7 +1864,7 @@ NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args )
if
(
size
!=
sizeof
(
*
inputs32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
...
...
@@ -2489,7 +2489,7 @@ NTSTATUS WINAPI wow64_NtUserTrackMouseEvent( UINT *args )
if
(
info32
->
cbSize
!=
sizeof
(
*
info32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
set_last_error32
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
dlls/wow64win/wow64win_private.h
View file @
0d4817fa
...
...
@@ -124,4 +124,11 @@ static inline OBJECT_ATTRIBUTES *objattr_32to64( struct object_attr64 *out, cons
return
&
out
->
attr
;
}
static
inline
void
set_last_error32
(
DWORD
err
)
{
TEB
*
teb
=
NtCurrentTeb
();
TEB32
*
teb32
=
(
TEB32
*
)((
char
*
)
teb
+
teb
->
WowTebOffset
);
teb32
->
LastErrorValue
=
err
;
}
#endif
/* __WOW64WIN_PRIVATE_H */
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