Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
149e7502
Commit
149e7502
authored
Jul 30, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Support wow64 in NtAllocateVirtualMemory calls.
parent
2b6647cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
dc.c
dlls/win32u/dc.c
+2
-2
dib.c
dlls/win32u/dib.c
+2
-2
gdiobj.c
dlls/win32u/gdiobj.c
+2
-2
win32u_private.h
dlls/win32u/win32u_private.h
+9
-0
No files found.
dlls/win32u/dc.c
View file @
149e7502
...
...
@@ -112,8 +112,8 @@ static DC_ATTR *alloc_dc_attr(void)
{
SIZE_T
size
=
system_info
.
AllocationGranularity
;
bucket
->
entries
=
NULL
;
if
(
!
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
bucket
->
entries
,
0
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
if
(
!
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
bucket
->
entries
,
zero_bits
()
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
{
bucket
->
next_free
=
NULL
;
bucket
->
next_unused
=
bucket
->
entries
+
1
;
...
...
dlls/win32u/dib.c
View file @
149e7502
...
...
@@ -1548,8 +1548,8 @@ HBITMAP WINAPI NtGdiCreateDIBSection( HDC hdc, HANDLE section, DWORD offset, con
{
SIZE_T
size
=
bmp
->
dib
.
dsBmih
.
biSizeImage
;
offset
=
0
;
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
bmp
->
dib
.
dsBm
.
bmBits
,
0
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
bmp
->
dib
.
dsBm
.
bmBits
,
zero_bits
()
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
goto
error
;
}
bmp
->
dib
.
dshSection
=
section
;
...
...
dlls/win32u/gdiobj.c
View file @
149e7502
...
...
@@ -566,8 +566,8 @@ static void init_gdi_shared(void)
{
SIZE_T
size
=
sizeof
(
*
gdi_shared
);
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
gdi_shared
,
0
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
gdi_shared
,
zero_bits
()
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
return
;
next_unused
=
gdi_shared
->
Handles
+
FIRST_GDI_HANDLE
;
...
...
dlls/win32u/win32u_private.h
View file @
149e7502
...
...
@@ -494,6 +494,15 @@ static inline BOOL is_win9x(void)
return
NtCurrentTeb
()
->
Peb
->
OSPlatformId
==
VER_PLATFORM_WIN32s
;
}
static
inline
ULONG_PTR
zero_bits
(
void
)
{
#ifdef _WIN64
return
!
NtCurrentTeb
()
->
WowTebOffset
?
0
:
0x7fffffff
;
#else
return
0
;
#endif
}
static
inline
const
char
*
debugstr_us
(
const
UNICODE_STRING
*
us
)
{
if
(
!
us
)
return
"<null>"
;
...
...
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