diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 008768300cb..f6d7d1e7011 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -225,7 +225,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ) { code = reply->code; ioctl = reply->next; - device = reply->user_ptr; + device = wine_server_get_ptr( reply->user_ptr ); in_size = reply->in_size; out_size = reply->out_size; } @@ -491,7 +491,7 @@ NTSTATUS WINAPI IoCreateDevice( DRIVER_OBJECT *driver, ULONG ext_size, req->attributes = 0; req->rootdir = 0; req->manager = wine_server_obj_handle( manager ); - req->user_ptr = device; + req->user_ptr = wine_server_client_ptr( device ); if (name) wine_server_add_data( req, name->Buffer, name->Length ); if (!(status = wine_server_call( req ))) handle = wine_server_ptr_handle( reply->handle ); } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 20fc81f9807..807889b8bda 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -4118,7 +4118,7 @@ struct create_device_request unsigned int attributes; obj_handle_t rootdir; obj_handle_t manager; - void* user_ptr; + client_ptr_t user_ptr; /* VARARG(name,unicode_str); */ }; struct create_device_reply @@ -4154,7 +4154,7 @@ struct get_next_device_request_reply struct reply_header __header; obj_handle_t next; ioctl_code_t code; - void* user_ptr; + client_ptr_t user_ptr; data_size_t in_size; data_size_t out_size; /* VARARG(next_data,bytes); */ @@ -5052,6 +5052,6 @@ union generic_reply struct set_window_layered_info_reply set_window_layered_info_reply; }; -#define SERVER_PROTOCOL_VERSION 360 +#define SERVER_PROTOCOL_VERSION 361 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/device.c b/server/device.c index 754b257d4e3..48bccd26fb0 100644 --- a/server/device.c +++ b/server/device.c @@ -112,7 +112,7 @@ struct device struct object obj; /* object header */ struct device_manager *manager; /* manager for this device (or NULL if deleted) */ struct fd *fd; /* file descriptor for ioctl */ - void *user_ptr; /* opaque ptr for client side */ + client_ptr_t user_ptr; /* opaque ptr for client side */ struct list entry; /* entry in device manager list */ struct list requests; /* list of pending ioctl requests */ }; diff --git a/server/protocol.def b/server/protocol.def index 66c2e01cb3a..ffb8661d3cf 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -2961,7 +2961,7 @@ enum message_type unsigned int attributes; /* object attributes */ obj_handle_t rootdir; /* root directory */ obj_handle_t manager; /* device manager */ - void* user_ptr; /* opaque ptr for use by client */ + client_ptr_t user_ptr; /* opaque ptr for use by client */ VARARG(name,unicode_str); /* object name */ @REPLY obj_handle_t handle; /* handle to the device */ @@ -2983,7 +2983,7 @@ enum message_type @REPLY obj_handle_t next; /* handle to the next ioctl */ ioctl_code_t code; /* ioctl code */ - void* user_ptr; /* opaque ptr for the device */ + client_ptr_t user_ptr; /* opaque ptr for the device */ data_size_t in_size; /* total needed input size */ data_size_t out_size; /* needed output size */ VARARG(next_data,bytes); /* input data of the next ioctl */ diff --git a/server/trace.c b/server/trace.c index 9530fde9733..e9a9b36f1c9 100644 --- a/server/trace.c +++ b/server/trace.c @@ -3729,7 +3729,9 @@ static void dump_create_device_request( const struct create_device_request *req fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " rootdir=%04x,", req->rootdir ); fprintf( stderr, " manager=%04x,", req->manager ); - fprintf( stderr, " user_ptr=%p,", req->user_ptr ); + fprintf( stderr, " user_ptr=" ); + dump_uint64( &req->user_ptr ); + fprintf( stderr, "," ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); } @@ -3759,7 +3761,9 @@ static void dump_get_next_device_request_reply( const struct get_next_device_req fprintf( stderr, " code=" ); dump_ioctl_code( &req->code ); fprintf( stderr, "," ); - fprintf( stderr, " user_ptr=%p,", req->user_ptr ); + fprintf( stderr, " user_ptr=" ); + dump_uint64( &req->user_ptr ); + fprintf( stderr, "," ); fprintf( stderr, " in_size=%u,", req->in_size ); fprintf( stderr, " out_size=%u,", req->out_size ); fprintf( stderr, " next_data=" );