Alexandre Julliard : server: Use attributes instead of inherit flag
in snapshot requests.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Dec 9 05:54:20 CST 2005
Module: wine
Branch: refs/heads/master
Commit: f11d0a375f0118a2cc1a528fe0471d0933b9206d
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=f11d0a375f0118a2cc1a528fe0471d0933b9206d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Dec 9 12:09:44 2005 +0100
server: Use attributes instead of inherit flag in snapshot requests.
---
dlls/kernel/toolhelp.c | 5 ++---
dlls/ntdll/nt.c | 6 +++---
include/wine/server_protocol.h | 4 ++--
server/protocol.def | 2 +-
server/snapshot.c | 2 +-
server/trace.c | 2 +-
6 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/dlls/kernel/toolhelp.c b/dlls/kernel/toolhelp.c
index cfbe0e3..2aef731 100644
--- a/dlls/kernel/toolhelp.c
+++ b/dlls/kernel/toolhelp.c
@@ -61,9 +61,8 @@ HANDLE WINAPI CreateToolhelp32Snapshot(
if (flags & TH32CS_SNAPMODULE) req->flags |= SNAP_MODULE;
if (flags & TH32CS_SNAPPROCESS) req->flags |= SNAP_PROCESS;
if (flags & TH32CS_SNAPTHREAD) req->flags |= SNAP_THREAD;
-
- req->inherit = (flags & TH32CS_INHERIT) != 0;
- req->pid = process;
+ req->attributes = (flags & TH32CS_INHERIT) ? OBJ_INHERIT : 0;
+ req->pid = process;
wine_server_call_err( req );
ret = reply->handle;
}
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 4c90f49..a60820d 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -657,9 +657,9 @@ NTSTATUS WINAPI NtQuerySystemInformation
SERVER_START_REQ( create_snapshot )
{
- req->flags = SNAP_PROCESS | SNAP_THREAD;
- req->inherit = FALSE;
- req->pid = 0;
+ req->flags = SNAP_PROCESS | SNAP_THREAD;
+ req->attributes = 0;
+ req->pid = 0;
if (!(ret = wine_server_call( req ))) hSnap = reply->handle;
}
SERVER_END_REQ;
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 785db2f..4746729 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -1473,7 +1473,7 @@ struct get_mapping_info_reply
struct create_snapshot_request
{
struct request_header __header;
- int inherit;
+ unsigned int attributes;
int flags;
process_id_t pid;
};
@@ -4316,6 +4316,6 @@ union generic_reply
struct query_symlink_reply query_symlink_reply;
};
-#define SERVER_PROTOCOL_VERSION 210
+#define SERVER_PROTOCOL_VERSION 211
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/protocol.def b/server/protocol.def
index 2dfd020..0792f22 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1096,7 +1096,7 @@ enum char_info_mode
#define SNAP_MODULE 0x00000008
/* Create a snapshot */
@REQ(create_snapshot)
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
int flags; /* snapshot flags (SNAP_*) */
process_id_t pid; /* process id */
@REPLY
diff --git a/server/snapshot.c b/server/snapshot.c
index 7695f0d..4159962 100644
--- a/server/snapshot.c
+++ b/server/snapshot.c
@@ -236,7 +236,7 @@ DECL_HANDLER(create_snapshot)
reply->handle = 0;
if ((snapshot = create_snapshot( req->pid, req->flags )))
{
- reply->handle = alloc_handle( current->process, snapshot, 0, req->inherit );
+ reply->handle = alloc_handle( current->process, snapshot, 0, req->attributes & OBJ_INHERIT );
release_object( snapshot );
}
}
diff --git a/server/trace.c b/server/trace.c
index d79adb6..5cdcfef 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1494,7 +1494,7 @@ static void dump_get_mapping_info_reply(
static void dump_create_snapshot_request( const struct create_snapshot_request *req )
{
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " flags=%d,", req->flags );
fprintf( stderr, " pid=%04x", req->pid );
}
More information about the wine-cvs
mailing list