server: Implement object type for registry keys.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-02-09 20:28:49 +09:00
parent eb6621081a
commit 3cde722e3a
1 changed files with 9 additions and 1 deletions

View File

@ -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 )
{