From 3cde722e3adde4912c2c5bf1aa30e2a94dc246cf Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 9 Feb 2016 20:28:49 +0900 Subject: [PATCH] server: Implement object type for registry keys. Signed-off-by: Alexandre Julliard --- server/registry.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/registry.c b/server/registry.c index 5ca2a522b5a..97b16ed65e9 100644 --- a/server/registry.c +++ b/server/registry.c @@ -146,6 +146,7 @@ struct file_load_info static void key_dump( struct object *obj, int verbose ); +static struct object_type *key_get_type( struct object *obj ); static unsigned int key_map_access( struct object *obj, unsigned int access ); static struct security_descriptor *key_get_sd( struct object *obj ); static int key_close_handle( struct object *obj, struct process *process, obj_handle_t handle ); @@ -155,7 +156,7 @@ static const struct object_ops key_ops = { sizeof(struct key), /* size */ key_dump, /* dump */ - no_get_type, /* get_type */ + key_get_type, /* get_type */ no_add_queue, /* add_queue */ NULL, /* remove_queue */ NULL, /* signaled */ @@ -302,6 +303,13 @@ static void key_dump( struct object *obj, int verbose ) fprintf( stderr, "\n" ); } +static struct object_type *key_get_type( struct object *obj ) +{ + static const WCHAR name[] = {'K','e','y'}; + static const struct unicode_str str = { name, sizeof(name) }; + return get_object_type( &str ); +} + /* notify waiter and maybe delete the notification */ static void do_notification( struct key *key, struct notify *notify, int del ) {