Jacek Caban : server: Support process object type.
Alexandre Julliard
julliard at winehq.org
Fri Feb 22 15:22:11 CST 2019
Module: wine
Branch: master
Commit: 2bb4d24589d5029c767801bbc39f616c309d360a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2bb4d24589d5029c767801bbc39f616c309d360a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Feb 22 13:14:05 2019 +0100
server: Support process object type.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/tests/om.c | 3 +++
server/process.c | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 9ced706..bc1c6a4 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -1560,6 +1560,9 @@ static void test_query_object(void)
pNtClose( handle );
}
pRtlFreeUnicodeString( &session );
+
+ test_object_type( GetCurrentProcess(), "Process" );
+ test_no_file_info( GetCurrentProcess() );
}
static void test_type_mismatch(void)
diff --git a/server/process.c b/server/process.c
index e55c8a8..77bd1e7 100644
--- a/server/process.c
+++ b/server/process.c
@@ -60,6 +60,7 @@ static int shutdown_stage; /* current stage in the shutdown process */
/* process operations */
static void process_dump( struct object *obj, int verbose );
+static struct object_type *process_get_type( struct object *obj );
static int process_signaled( struct object *obj, struct wait_queue_entry *entry );
static unsigned int process_map_access( struct object *obj, unsigned int access );
static void process_poll_event( struct fd *fd, int event );
@@ -70,7 +71,7 @@ static const struct object_ops process_ops =
{
sizeof(struct process), /* size */
process_dump, /* dump */
- no_get_type, /* get_type */
+ process_get_type, /* get_type */
add_queue, /* add_queue */
remove_queue, /* remove_queue */
process_signaled, /* signaled */
@@ -630,6 +631,13 @@ static void process_dump( struct object *obj, int verbose )
fprintf( stderr, "Process id=%04x handles=%p\n", process->id, process->handles );
}
+static struct object_type *process_get_type( struct object *obj )
+{
+ static const WCHAR name[] = {'P','r','o','c','e','s','s'};
+ static const struct unicode_str str = { name, sizeof(name) };
+ return get_object_type( &str );
+}
+
static int process_signaled( struct object *obj, struct wait_queue_entry *entry )
{
struct process *process = (struct process *)obj;
More information about the wine-cvs
mailing list