Commit 7b79c805 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Return the device name for mailslot files.

parent 5e9b1a3c
...@@ -1433,7 +1433,7 @@ static void test_query_object(void) ...@@ -1433,7 +1433,7 @@ static void test_query_object(void)
handle = CreateFileA( "\\\\.\\mailslot", 0, 0, NULL, OPEN_EXISTING, 0, 0 ); handle = CreateFileA( "\\\\.\\mailslot", 0, 0, NULL, OPEN_EXISTING, 0, 0 );
ok( handle != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() ); ok( handle != INVALID_HANDLE_VALUE, "CreateFile failed (%d)\n", GetLastError() );
test_object_name( handle, L"\\Device\\Mailslot", TRUE ); test_object_name( handle, L"\\Device\\Mailslot", FALSE );
test_object_type( handle, L"File" ); test_object_type( handle, L"File" );
test_file_info( handle ); test_file_info( handle );
......
...@@ -217,6 +217,7 @@ static const struct object_ops mailslot_device_ops = ...@@ -217,6 +217,7 @@ static const struct object_ops mailslot_device_ops =
static void mailslot_device_file_dump( struct object *obj, int verbose ); static void mailslot_device_file_dump( struct object *obj, int verbose );
static struct fd *mailslot_device_file_get_fd( struct object *obj ); static struct fd *mailslot_device_file_get_fd( struct object *obj );
static WCHAR *mailslot_device_file_get_full_name( struct object *obj, data_size_t *len );
static void mailslot_device_file_destroy( struct object *obj ); static void mailslot_device_file_destroy( struct object *obj );
static enum server_fd_type mailslot_device_file_get_fd_type( struct fd *fd ); static enum server_fd_type mailslot_device_file_get_fd_type( struct fd *fd );
...@@ -234,7 +235,7 @@ static const struct object_ops mailslot_device_file_ops = ...@@ -234,7 +235,7 @@ static const struct object_ops mailslot_device_file_ops =
default_fd_map_access, /* map_access */ default_fd_map_access, /* map_access */
default_get_sd, /* get_sd */ default_get_sd, /* get_sd */
default_set_sd, /* set_sd */ default_set_sd, /* set_sd */
no_get_full_name, /* get_full_name */ mailslot_device_file_get_full_name, /* get_full_name */
no_lookup_name, /* lookup_name */ no_lookup_name, /* lookup_name */
no_link_name, /* link_name */ no_link_name, /* link_name */
NULL, /* unlink_name */ NULL, /* unlink_name */
...@@ -462,6 +463,12 @@ static struct fd *mailslot_device_file_get_fd( struct object *obj ) ...@@ -462,6 +463,12 @@ static struct fd *mailslot_device_file_get_fd( struct object *obj )
return (struct fd *)grab_object( file->fd ); return (struct fd *)grab_object( file->fd );
} }
static WCHAR *mailslot_device_file_get_full_name( struct object *obj, data_size_t *len )
{
struct mailslot_device_file *file = (struct mailslot_device_file *)obj;
return file->device->obj.ops->get_full_name( &file->device->obj, len );
}
static void mailslot_device_file_destroy( struct object *obj ) static void mailslot_device_file_destroy( struct object *obj )
{ {
struct mailslot_device_file *file = (struct mailslot_device_file*)obj; struct mailslot_device_file *file = (struct mailslot_device_file*)obj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment