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
6d4ee739
Commit
6d4ee739
authored
Feb 20, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added get/set_handle_info request.
parent
fb02ee91
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
4 deletions
+67
-4
server.h
include/server.h
+20
-4
request.h
include/server/request.h
+6
-0
request.c
server/request.c
+15
-0
trace.c
server/trace.c
+26
-0
No files found.
include/server.h
View file @
6d4ee739
...
...
@@ -175,6 +175,26 @@ struct close_handle_request
};
/* Get information about a handle */
struct
get_handle_info_request
{
int
handle
;
/* handle we are interested in */
};
struct
get_handle_info_reply
{
int
flags
;
/* handle flags */
};
/* Set a handle information */
struct
set_handle_info_request
{
int
handle
;
/* handle we are interested in */
int
flags
;
/* new handle flags */
int
mask
;
/* mask for flags to set */
};
/* Duplicate a handle */
struct
dup_handle_request
{
...
...
@@ -639,10 +659,6 @@ struct _THDB;
extern
int
CLIENT_NewThread
(
struct
_THDB
*
thdb
,
int
*
thandle
,
int
*
phandle
);
extern
int
CLIENT_SetDebug
(
int
level
);
extern
int
CLIENT_InitThread
(
void
);
extern
int
CLIENT_CloseHandle
(
int
handle
);
extern
int
CLIENT_DuplicateHandle
(
int
src_process
,
int
src_handle
,
int
dst_process
,
int
dst_handle
,
DWORD
access
,
BOOL32
inherit
,
DWORD
options
);
extern
int
CLIENT_OpenProcess
(
void
*
pid
,
DWORD
access
,
BOOL32
inherit
);
#endif
/* __WINE_SERVER__ */
#endif
/* __WINE_SERVER_H */
include/server/request.h
View file @
6d4ee739
...
...
@@ -18,6 +18,8 @@ enum request
REQ_RESUME_THREAD
,
REQ_QUEUE_APC
,
REQ_CLOSE_HANDLE
,
REQ_GET_HANDLE_INFO
,
REQ_SET_HANDLE_INFO
,
REQ_DUP_HANDLE
,
REQ_OPEN_PROCESS
,
REQ_SELECT
,
...
...
@@ -76,6 +78,8 @@ DECL_HANDLER(suspend_thread);
DECL_HANDLER
(
resume_thread
);
DECL_HANDLER
(
queue_apc
);
DECL_HANDLER
(
close_handle
);
DECL_HANDLER
(
get_handle_info
);
DECL_HANDLER
(
set_handle_info
);
DECL_HANDLER
(
dup_handle
);
DECL_HANDLER
(
open_process
);
DECL_HANDLER
(
select
);
...
...
@@ -131,6 +135,8 @@ static const struct handler {
{
(
void
(
*
)())
req_resume_thread
,
sizeof
(
struct
resume_thread_request
)
},
{
(
void
(
*
)())
req_queue_apc
,
sizeof
(
struct
queue_apc_request
)
},
{
(
void
(
*
)())
req_close_handle
,
sizeof
(
struct
close_handle_request
)
},
{
(
void
(
*
)())
req_get_handle_info
,
sizeof
(
struct
get_handle_info_request
)
},
{
(
void
(
*
)())
req_set_handle_info
,
sizeof
(
struct
set_handle_info_request
)
},
{
(
void
(
*
)())
req_dup_handle
,
sizeof
(
struct
dup_handle_request
)
},
{
(
void
(
*
)())
req_open_process
,
sizeof
(
struct
open_process_request
)
},
{
(
void
(
*
)())
req_select
,
sizeof
(
struct
select_request
)
},
...
...
server/request.c
View file @
6d4ee739
...
...
@@ -198,6 +198,21 @@ DECL_HANDLER(close_handle)
send_reply
(
current
,
-
1
,
0
);
}
/* get information about a handle */
DECL_HANDLER
(
get_handle_info
)
{
struct
get_handle_info_reply
reply
;
reply
.
flags
=
set_handle_info
(
current
->
process
,
req
->
handle
,
0
,
0
);
send_reply
(
current
,
-
1
,
1
,
&
reply
,
sizeof
(
reply
)
);
}
/* set a handle information */
DECL_HANDLER
(
set_handle_info
)
{
set_handle_info
(
current
->
process
,
req
->
handle
,
req
->
mask
,
req
->
flags
);
send_reply
(
current
,
-
1
,
0
);
}
/* duplicate a handle */
DECL_HANDLER
(
dup_handle
)
{
...
...
server/trace.c
View file @
6d4ee739
...
...
@@ -134,6 +134,26 @@ static int dump_close_handle_request( struct close_handle_request *req, int len
return
(
int
)
sizeof
(
*
req
);
}
static
int
dump_get_handle_info_request
(
struct
get_handle_info_request
*
req
,
int
len
)
{
fprintf
(
stderr
,
" handle=%d"
,
req
->
handle
);
return
(
int
)
sizeof
(
*
req
);
}
static
int
dump_get_handle_info_reply
(
struct
get_handle_info_reply
*
req
,
int
len
)
{
fprintf
(
stderr
,
" flags=%d"
,
req
->
flags
);
return
(
int
)
sizeof
(
*
req
);
}
static
int
dump_set_handle_info_request
(
struct
set_handle_info_request
*
req
,
int
len
)
{
fprintf
(
stderr
,
" handle=%d,"
,
req
->
handle
);
fprintf
(
stderr
,
" flags=%d,"
,
req
->
flags
);
fprintf
(
stderr
,
" mask=%d"
,
req
->
mask
);
return
(
int
)
sizeof
(
*
req
);
}
static
int
dump_dup_handle_request
(
struct
dup_handle_request
*
req
,
int
len
)
{
fprintf
(
stderr
,
" src_process=%d,"
,
req
->
src_process
);
...
...
@@ -603,6 +623,10 @@ static const struct dumper dumpers[REQ_NB_REQUESTS] =
(
void
(
*
)())
0
},
{
(
int
(
*
)(
void
*
,
int
))
dump_close_handle_request
,
(
void
(
*
)())
0
},
{
(
int
(
*
)(
void
*
,
int
))
dump_get_handle_info_request
,
(
void
(
*
)())
dump_get_handle_info_reply
},
{
(
int
(
*
)(
void
*
,
int
))
dump_set_handle_info_request
,
(
void
(
*
)())
0
},
{
(
int
(
*
)(
void
*
,
int
))
dump_dup_handle_request
,
(
void
(
*
)())
dump_dup_handle_reply
},
{
(
int
(
*
)(
void
*
,
int
))
dump_open_process_request
,
...
...
@@ -694,6 +718,8 @@ static const char * const req_names[REQ_NB_REQUESTS] =
"resume_thread"
,
"queue_apc"
,
"close_handle"
,
"get_handle_info"
,
"set_handle_info"
,
"dup_handle"
,
"open_process"
,
"select"
,
...
...
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