Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yoann Laissus
wine
Commits
6d4ee739
Commit
6d4ee739
authored
26 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Added get/set_handle_info request.
parent
fb02ee91
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/server.h
+20
-4
20 additions, 4 deletions
include/server.h
include/server/request.h
+6
-0
6 additions, 0 deletions
include/server/request.h
server/request.c
+15
-0
15 additions, 0 deletions
server/request.c
server/trace.c
+26
-0
26 additions, 0 deletions
server/trace.c
with
67 additions
and
4 deletions
include/server.h
+
20
−
4
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 */
This diff is collapsed.
Click to expand it.
include/server/request.h
+
6
−
0
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
)
},
...
...
This diff is collapsed.
Click to expand it.
server/request.c
+
15
−
0
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
)
{
...
...
This diff is collapsed.
Click to expand it.
server/trace.c
+
26
−
0
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"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment