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
e0d62e85
Commit
e0d62e85
authored
Jul 10, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Always use NtCallbackReturn in User32DrawText.
parent
0aa36a83
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
22 deletions
+6
-22
user_main.c
dlls/user32/user_main.c
+3
-9
font.c
dlls/win32u/font.c
+0
-1
user.c
dlls/wow64win/user.c
+3
-11
ntuser.h
include/ntuser.h
+0
-1
No files found.
dlls/user32/user_main.c
View file @
e0d62e85
...
...
@@ -121,19 +121,13 @@ static NTSTATUS WINAPI User32DrawScrollBar( const struct draw_scroll_bar_params
return
0
;
}
static
NTSTATUS
WINAPI
User32DrawText
(
const
struct
draw_text_params
*
params
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32DrawText
(
struct
draw_text_params
*
params
,
ULONG
size
)
{
RECT
rect
=
params
->
rect
;
int
ret
;
size
-=
FIELD_OFFSET
(
struct
draw_text_params
,
str
);
ret
=
DrawTextW
(
params
->
hdc
,
params
->
str
,
size
/
sizeof
(
WCHAR
),
&
rect
,
params
->
flags
);
if
(
params
->
ret_rect
)
{
*
params
->
ret_rect
=
rect
;
return
ret
;
}
return
NtCallbackReturn
(
&
rect
,
sizeof
(
rect
),
ret
);
ret
=
DrawTextW
(
params
->
hdc
,
params
->
str
,
size
/
sizeof
(
WCHAR
),
&
params
->
rect
,
params
->
flags
);
return
NtCallbackReturn
(
&
params
->
rect
,
sizeof
(
params
->
rect
),
ret
);
}
static
NTSTATUS
WINAPI
User32ImmProcessKey
(
const
struct
imm_process_key_params
*
params
,
ULONG
size
)
...
...
dlls/win32u/font.c
View file @
e0d62e85
...
...
@@ -7097,7 +7097,6 @@ INT WINAPI DECLSPEC_HIDDEN DrawTextW( HDC hdc, const WCHAR *str, INT count, RECT
if
(
!
(
params
=
malloc
(
size
)))
return
0
;
params
->
hdc
=
hdc
;
params
->
rect
=
*
rect
;
params
->
ret_rect
=
rect
;
params
->
flags
=
flags
;
if
(
count
)
memcpy
(
params
->
str
,
str
,
count
*
sizeof
(
WCHAR
)
);
ret
=
KeUserModeCallback
(
NtUserDrawText
,
params
,
size
,
&
ret_ptr
,
&
ret_len
);
...
...
dlls/wow64win/user.c
View file @
e0d62e85
...
...
@@ -312,7 +312,6 @@ struct draw_text_params32
ULONG
hdc
;
int
count
;
RECT
rect
;
ULONG
ret_rect
;
UINT
flags
;
WCHAR
str
[
1
];
};
...
...
@@ -832,25 +831,18 @@ static NTSTATUS WINAPI wow64_NtUserDrawText( void *arg, ULONG size )
{
struct
draw_text_params
*
params
=
arg
;
struct
draw_text_params32
*
params32
;
RECT
*
rect_ptr
=
params
->
ret_rect
;
ULONG
offset
=
offsetof
(
struct
draw_text_params
,
str
)
-
offsetof
(
struct
draw_text_params32
,
str
)
;
ULONG
ret_len
;
void
*
ret_ptr
;
NTSTATUS
ret
;
params32
=
(
struct
draw_text_params32
*
)(
params
+
1
)
-
1
;
params32
=
(
struct
draw_text_params32
*
)(
(
char
*
)
params
+
offset
)
;
params32
->
flags
=
params
->
flags
;
params32
->
ret_rect
=
0
;
params32
->
rect
=
params
->
rect
;
params32
->
count
=
params
->
count
;
params32
->
hdc
=
HandleToUlong
(
params
->
hdc
);
ret
=
Wow64KiUserCallbackDispatcher
(
NtUserDrawText
,
params32
,
size
-
sizeof
(
*
params
)
+
sizeof
(
*
params32
),
&
ret_ptr
,
&
ret_len
);
if
(
ret_len
==
sizeof
(
RECT
)
&&
rect_ptr
)
{
*
rect_ptr
=
*
(
const
RECT
*
)
ret_ptr
;
return
ret
;
}
ret
=
Wow64KiUserCallbackDispatcher
(
NtUserDrawText
,
params32
,
size
-
offset
,
&
ret_ptr
,
&
ret_len
);
return
NtCallbackReturn
(
ret_ptr
,
ret_len
,
ret
);
}
...
...
include/ntuser.h
View file @
e0d62e85
...
...
@@ -188,7 +188,6 @@ struct draw_text_params
HDC
hdc
;
int
count
;
RECT
rect
;
RECT
*
ret_rect
;
/* FIXME: Use NtCallbackReturn instead */
UINT
flags
;
WCHAR
str
[
1
];
};
...
...
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