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
621bcd0d
Commit
621bcd0d
authored
Jan 19, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Return a proper NTSTATUS in the post DDE message callback.
parent
d06192af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
26 deletions
+15
-26
message.c
dlls/user32/message.c
+6
-15
user_private.h
dlls/user32/user_private.h
+2
-2
message.c
dlls/win32u/message.c
+7
-9
No files found.
dlls/user32/message.c
View file @
621bcd0d
...
...
@@ -333,7 +333,7 @@ static HGLOBAL dde_get_pair(HGLOBAL shm)
*
* Post a DDE message
*/
BOOL
post_dde_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
DWORD
type
)
NTSTATUS
post_dde_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
DWORD
type
)
{
void
*
ptr
=
NULL
;
int
size
=
0
;
...
...
@@ -344,7 +344,7 @@ BOOL post_dde_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD
ULONGLONG
hpack
;
if
(
!
UnpackDDElParam
(
msg
,
lparam
,
&
uiLo
,
&
uiHi
))
return
FALSE
;
return
STATUS_INVALID_PARAMETER
;
lp
=
lparam
;
switch
(
msg
)
...
...
@@ -386,9 +386,9 @@ BOOL post_dde_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD
if
((
msg
==
WM_DDE_ADVISE
&&
size
<
sizeof
(
DDEADVISE
))
||
(
msg
==
WM_DDE_DATA
&&
size
<
FIELD_OFFSET
(
DDEDATA
,
Value
))
||
(
msg
==
WM_DDE_POKE
&&
size
<
FIELD_OFFSET
(
DDEPOKE
,
Value
)))
return
FALSE
;
return
STATUS_INVALID_PARAMETER
;
}
else
if
(
msg
!=
WM_DDE_DATA
)
return
FALSE
;
else
if
(
msg
!=
WM_DDE_DATA
)
return
STATUS_INVALID_PARAMETER
;
lp
=
uiHi
;
if
(
uiLo
)
...
...
@@ -428,21 +428,12 @@ BOOL post_dde_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, DWORD
req
->
lparam
=
lp
;
req
->
timeout
=
TIMEOUT_INFINITE
;
if
(
size
)
wine_server_add_data
(
req
,
ptr
,
size
);
if
((
res
=
wine_server_call
(
req
)))
{
if
(
res
==
STATUS_INVALID_PARAMETER
)
/* FIXME: find a STATUS_ value for this one */
SetLastError
(
ERROR_INVALID_THREAD_ID
);
else
SetLastError
(
RtlNtStatusToDosError
(
res
)
);
}
else
FreeDDElParam
(
msg
,
lparam
);
if
(
!
(
res
=
wine_server_call
(
req
)))
FreeDDElParam
(
msg
,
lparam
);
}
SERVER_END_REQ
;
if
(
hunlock
)
GlobalUnlock
(
hunlock
);
return
!
res
;
return
res
;
}
/***********************************************************************
...
...
dlls/user32/user_private.h
View file @
621bcd0d
...
...
@@ -45,8 +45,8 @@ struct wm_char_mapping_data
extern
HMODULE
user32_module
;
extern
BOOL
post_dde_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
DWORD
type
);
extern
NTSTATUS
post_dde_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
DWORD
type
);
extern
BOOL
unpack_dde_message
(
HWND
hwnd
,
UINT
message
,
WPARAM
*
wparam
,
LPARAM
*
lparam
,
const
void
*
buffer
,
size_t
size
);
extern
void
free_cached_data
(
UINT
format
,
HANDLE
handle
);
...
...
dlls/win32u/message.c
View file @
621bcd0d
...
...
@@ -3299,7 +3299,8 @@ static BOOL put_message_in_queue( const struct send_message_info *info, size_t *
params
.
lparam
=
info
->
lparam
;
params
.
dest_tid
=
info
->
dest_tid
;
params
.
type
=
info
->
type
;
return
KeUserModeCallback
(
NtUserPostDDEMessage
,
&
params
,
sizeof
(
params
),
&
ret_ptr
,
&
ret_len
);
res
=
KeUserModeCallback
(
NtUserPostDDEMessage
,
&
params
,
sizeof
(
params
),
&
ret_ptr
,
&
ret_len
);
goto
done
;
}
SERVER_START_REQ
(
send_message
)
...
...
@@ -3315,16 +3316,13 @@ static BOOL put_message_in_queue( const struct send_message_info *info, size_t *
if
(
info
->
flags
&
SMTO_ABORTIFHUNG
)
req
->
flags
|=
SEND_MSG_ABORT_IF_HUNG
;
for
(
i
=
0
;
i
<
data
.
count
;
i
++
)
wine_server_add_data
(
req
,
data
.
data
[
i
],
data
.
size
[
i
]
);
if
((
res
=
wine_server_call
(
req
)))
{
if
(
res
==
STATUS_INVALID_PARAMETER
)
/* FIXME: find a STATUS_ value for this one */
RtlSetLastWin32Error
(
ERROR_INVALID_THREAD_ID
);
else
RtlSetLastWin32Error
(
RtlNtStatusToDosError
(
res
)
);
}
res
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
done:
if
(
res
==
STATUS_INVALID_PARAMETER
)
res
=
STATUS_NO_LDT
;
if
(
res
)
RtlSetLastWin32Error
(
RtlNtStatusToDosError
(
res
)
);
return
!
res
;
}
...
...
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