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
29a3ce9f
Commit
29a3ce9f
authored
Oct 04, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return the data for callback results in the varargs part of the get_message request.
parent
59dc4568
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
12 deletions
+49
-12
message.c
dlls/user/message.c
+6
-2
server_protocol.h
include/wine/server_protocol.h
+10
-1
protocol.def
server/protocol.def
+12
-3
queue.c
server/queue.c
+21
-6
No files found.
dlls/user/message.c
View file @
29a3ce9f
...
...
@@ -1989,8 +1989,12 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, int flags
info
.
flags
=
ISMEX_CALLBACK
;
break
;
case
MSG_CALLBACK_RESULT
:
call_sendmsg_callback
(
(
SENDASYNCPROC
)
info
.
msg
.
wParam
,
info
.
msg
.
hwnd
,
info
.
msg
.
message
,
extra_info
,
info
.
msg
.
lParam
);
if
(
size
>=
sizeof
(
struct
callback_msg_data
))
{
const
struct
callback_msg_data
*
data
=
(
const
struct
callback_msg_data
*
)
buffer
;
call_sendmsg_callback
(
data
->
callback
,
info
.
msg
.
hwnd
,
info
.
msg
.
message
,
data
->
data
,
data
->
result
);
}
goto
next
;
case
MSG_WINEVENT
:
if
(
size
>=
sizeof
(
struct
winevent_msg_data
))
...
...
include/wine/server_protocol.h
View file @
29a3ce9f
...
...
@@ -157,6 +157,14 @@ typedef struct
}
rectangle_t
;
struct
callback_msg_data
{
void
*
callback
;
unsigned
long
data
;
unsigned
long
result
;
};
struct
winevent_msg_data
{
user_handle_t
hook
;
...
...
@@ -168,6 +176,7 @@ struct winevent_msg_data
typedef
union
{
unsigned
char
bytes
[
1
];
struct
callback_msg_data
callback
;
struct
winevent_msg_data
winevent
;
}
message_data_t
;
...
...
@@ -4419,6 +4428,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 24
8
#define SERVER_PROTOCOL_VERSION 24
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
29a3ce9f
...
...
@@ -173,6 +173,14 @@ typedef struct
} rectangle_t;
/* structures for extra message data */
struct callback_msg_data
{
void *callback; /* callback function */
unsigned long data; /* user data for callback */
unsigned long result; /* message result */
};
struct winevent_msg_data
{
user_handle_t hook; /* hook handle */
...
...
@@ -184,6 +192,7 @@ struct winevent_msg_data
typedef union
{
unsigned char bytes[1]; /* raw data for sent messages */
struct callback_msg_data callback;
struct winevent_msg_data winevent;
} message_data_t;
...
...
@@ -1637,9 +1646,9 @@ enum message_type
int type; /* message type */
user_handle_t win; /* window handle */
unsigned int msg; /* message code */
unsigned long wparam; /* parameters
(callback function for MSG_CALLBACK_RESULT)
*/
unsigned long lparam; /* parameters
(result for MSG_CALLBACK_RESULT)
*/
unsigned long info; /* extra info
(callback argument for MSG_CALLBACK_RESULT)
*/
unsigned long wparam; /* parameters */
unsigned long lparam; /* parameters */
unsigned long info; /* extra info */
int x; /* x position */
int y; /* y position */
unsigned int time; /* message time */
...
...
server/queue.c
View file @
29a3ce9f
...
...
@@ -404,7 +404,11 @@ static void free_result( struct message_result *result )
{
if
(
result
->
timeout
)
remove_timeout_user
(
result
->
timeout
);
if
(
result
->
data
)
free
(
result
->
data
);
if
(
result
->
callback_msg
)
free
(
result
->
callback_msg
);
if
(
result
->
callback_msg
)
{
free
(
result
->
callback_msg
->
data
);
free
(
result
->
callback_msg
);
}
free
(
result
);
}
...
...
@@ -435,7 +439,8 @@ static void store_message_result( struct message_result *res, unsigned int resul
if
(
res
->
callback_msg
)
{
/* queue the callback message in the sender queue */
res
->
callback_msg
->
lparam
=
result
;
struct
callback_msg_data
*
data
=
res
->
callback_msg
->
data
;
data
->
result
=
result
;
list_add_tail
(
&
res
->
sender
->
msg_list
[
SEND_MESSAGE
],
&
res
->
callback_msg
->
entry
);
set_queue_bits
(
res
->
sender
,
QS_SENDMESSAGE
);
res
->
callback_msg
=
NULL
;
...
...
@@ -533,24 +538,34 @@ static struct message_result *alloc_message_result( struct msg_queue *send_queue
if
(
msg
->
type
==
MSG_CALLBACK
)
{
struct
callback_msg_data
*
data
;
struct
message
*
callback_msg
=
mem_alloc
(
sizeof
(
*
callback_msg
)
);
if
(
!
callback_msg
)
{
free
(
result
);
return
NULL
;
}
if
(
!
(
data
=
mem_alloc
(
sizeof
(
*
data
))))
{
free
(
callback_msg
);
free
(
result
);
return
NULL
;
}
callback_msg
->
type
=
MSG_CALLBACK_RESULT
;
callback_msg
->
win
=
msg
->
win
;
callback_msg
->
msg
=
msg
->
msg
;
callback_msg
->
wparam
=
(
unsigned
long
)
callback
;
callback_msg
->
wparam
=
0
;
callback_msg
->
lparam
=
0
;
callback_msg
->
time
=
get_tick_count
();
callback_msg
->
x
=
0
;
callback_msg
->
y
=
0
;
callback_msg
->
info
=
callback_data
;
callback_msg
->
info
=
0
;
callback_msg
->
result
=
NULL
;
callback_msg
->
data
=
NULL
;
callback_msg
->
data_size
=
0
;
callback_msg
->
data
=
data
;
callback_msg
->
data_size
=
sizeof
(
*
data
);
data
->
callback
=
callback
;
data
->
data
=
callback_data
;
result
->
callback_msg
=
callback_msg
;
list_add_head
(
&
send_queue
->
callback_result
,
&
result
->
sender_entry
);
...
...
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