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
726472fe
Commit
726472fe
authored
Jul 03, 2023
by
Brendan Shanks
Committed by
Alexandre Julliard
Jul 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Set zero_bits correctly for large address aware applications on Wow64.
parent
d5373ef6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
12 deletions
+16
-12
dc.c
dlls/win32u/dc.c
+1
-1
dib.c
dlls/win32u/dib.c
+1
-1
gdiobj.c
dlls/win32u/gdiobj.c
+1
-1
syscall.c
dlls/win32u/syscall.c
+11
-0
win32u_private.h
dlls/win32u/win32u_private.h
+2
-9
No files found.
dlls/win32u/dc.c
View file @
726472fe
...
@@ -112,7 +112,7 @@ static DC_ATTR *alloc_dc_attr(void)
...
@@ -112,7 +112,7 @@ static DC_ATTR *alloc_dc_attr(void)
{
{
SIZE_T
size
=
system_info
.
AllocationGranularity
;
SIZE_T
size
=
system_info
.
AllocationGranularity
;
bucket
->
entries
=
NULL
;
bucket
->
entries
=
NULL
;
if
(
!
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
bucket
->
entries
,
zero_bits
()
,
if
(
!
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
bucket
->
entries
,
zero_bits
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
{
{
bucket
->
next_free
=
NULL
;
bucket
->
next_free
=
NULL
;
...
...
dlls/win32u/dib.c
View file @
726472fe
...
@@ -1549,7 +1549,7 @@ HBITMAP WINAPI NtGdiCreateDIBSection( HDC hdc, HANDLE section, DWORD offset, con
...
@@ -1549,7 +1549,7 @@ HBITMAP WINAPI NtGdiCreateDIBSection( HDC hdc, HANDLE section, DWORD offset, con
{
{
SIZE_T
size
=
bmp
->
dib
.
dsBmih
.
biSizeImage
;
SIZE_T
size
=
bmp
->
dib
.
dsBmih
.
biSizeImage
;
offset
=
0
;
offset
=
0
;
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
bmp
->
dib
.
dsBm
.
bmBits
,
zero_bits
()
,
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
bmp
->
dib
.
dsBm
.
bmBits
,
zero_bits
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
goto
error
;
goto
error
;
}
}
...
...
dlls/win32u/gdiobj.c
View file @
726472fe
...
@@ -566,7 +566,7 @@ static void init_gdi_shared(void)
...
@@ -566,7 +566,7 @@ static void init_gdi_shared(void)
{
{
SIZE_T
size
=
sizeof
(
*
gdi_shared
);
SIZE_T
size
=
sizeof
(
*
gdi_shared
);
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
gdi_shared
,
zero_bits
()
,
if
(
NtAllocateVirtualMemory
(
GetCurrentProcess
(),
(
void
**
)
&
gdi_shared
,
zero_bits
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
))
return
;
return
;
next_unused
=
gdi_shared
->
Handles
+
FIRST_GDI_HANDLE
;
next_unused
=
gdi_shared
->
Handles
+
FIRST_GDI_HANDLE
;
...
...
dlls/win32u/syscall.c
View file @
726472fe
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include "ntuser.h"
#include "ntuser.h"
#include "wine/unixlib.h"
#include "wine/unixlib.h"
ULONG_PTR
zero_bits
=
0
;
static
void
*
const
syscalls
[]
=
static
void
*
const
syscalls
[]
=
{
{
...
@@ -450,6 +451,16 @@ static SYSTEM_SERVICE_TABLE syscall_table =
...
@@ -450,6 +451,16 @@ static SYSTEM_SERVICE_TABLE syscall_table =
static
NTSTATUS
init
(
void
*
dispatcher
)
static
NTSTATUS
init
(
void
*
dispatcher
)
{
{
#ifdef _WIN64
if
(
NtCurrentTeb
()
->
WowTebOffset
)
{
SYSTEM_BASIC_INFORMATION
info
;
NtQuerySystemInformation
(
SystemEmulationBasicInformation
,
&
info
,
sizeof
(
info
),
NULL
);
zero_bits
=
(
ULONG_PTR
)
info
.
HighestUserAddress
|
0x7fffffff
;
}
#endif
return
ntdll_init_syscalls
(
1
,
&
syscall_table
,
dispatcher
);
return
ntdll_init_syscalls
(
1
,
&
syscall_table
,
dispatcher
);
}
}
...
...
dlls/win32u/win32u_private.h
View file @
726472fe
...
@@ -271,6 +271,8 @@ extern HKEY hkcu_key DECLSPEC_HIDDEN;
...
@@ -271,6 +271,8 @@ extern HKEY hkcu_key DECLSPEC_HIDDEN;
extern
const
struct
user_driver_funcs
*
user_driver
DECLSPEC_HIDDEN
;
extern
const
struct
user_driver_funcs
*
user_driver
DECLSPEC_HIDDEN
;
extern
ULONG_PTR
zero_bits
DECLSPEC_HIDDEN
;
static
inline
BOOL
set_ntstatus
(
NTSTATUS
status
)
static
inline
BOOL
set_ntstatus
(
NTSTATUS
status
)
{
{
if
(
status
)
RtlSetLastWin32Error
(
RtlNtStatusToDosError
(
status
));
if
(
status
)
RtlSetLastWin32Error
(
RtlNtStatusToDosError
(
status
));
...
@@ -330,15 +332,6 @@ static inline BOOL is_win9x(void)
...
@@ -330,15 +332,6 @@ static inline BOOL is_win9x(void)
return
NtCurrentTeb
()
->
Peb
->
OSPlatformId
==
VER_PLATFORM_WIN32s
;
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
)
static
inline
const
char
*
debugstr_us
(
const
UNICODE_STRING
*
us
)
{
{
if
(
!
us
)
return
"<null>"
;
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