Commit 0cd3ff6c authored by Alexandre Julliard's avatar Alexandre Julliard

server: Make the class opaque data a client_ptr_t instead of a void pointer.

parent 45c99193
......@@ -357,7 +357,7 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, HINSTANCE hInstance, BOOL local
req->instance = wine_server_client_ptr( hInstance );
req->extra = classExtra;
req->win_extra = winExtra;
req->client_ptr = classPtr;
req->client_ptr = wine_server_client_ptr( classPtr );
req->atom = classPtr->atomName;
if (!req->atom && name) wine_server_add_data( req, name, strlenW(name) * sizeof(WCHAR) );
ret = !wine_server_call_err( req );
......@@ -628,7 +628,7 @@ BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance )
req->instance = wine_server_client_ptr( hInstance );
if (!(req->atom = get_int_atom_value(className)) && className)
wine_server_add_data( req, className, strlenW(className) * sizeof(WCHAR) );
if (!wine_server_call_err( req )) classPtr = reply->client_ptr;
if (!wine_server_call_err( req )) classPtr = wine_server_get_ptr( reply->client_ptr );
}
SERVER_END_REQ;
......
......@@ -121,7 +121,7 @@ static WND *create_window_handle( HWND parent, HWND owner, LPCWSTR name,
full_parent = wine_server_ptr_handle( reply->parent );
full_owner = wine_server_ptr_handle( reply->owner );
extra_bytes = reply->extra;
class = reply->class_ptr;
class = wine_server_get_ptr( reply->class_ptr );
}
}
SERVER_END_REQ;
......
......@@ -2789,7 +2789,7 @@ struct create_window_reply
user_handle_t parent;
user_handle_t owner;
int extra;
void* class_ptr;
client_ptr_t class_ptr;
};
......@@ -3661,7 +3661,7 @@ struct create_class_request
mod_handle_t instance;
int extra;
int win_extra;
void* client_ptr;
client_ptr_t client_ptr;
/* VARARG(name,unicode_str); */
};
struct create_class_reply
......@@ -3682,7 +3682,7 @@ struct destroy_class_request
struct destroy_class_reply
{
struct reply_header __header;
void* client_ptr;
client_ptr_t client_ptr;
};
......@@ -5052,6 +5052,6 @@ union generic_reply
struct set_window_layered_info_reply set_window_layered_info_reply;
};
#define SERVER_PROTOCOL_VERSION 359
#define SERVER_PROTOCOL_VERSION 360
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
......@@ -49,7 +49,7 @@ struct window_class
mod_handle_t instance; /* module instance */
unsigned int style; /* class style */
int win_extra; /* number of window extra bytes */
void *client_ptr; /* pointer to class in client address space */
client_ptr_t client_ptr; /* pointer to class in client address space */
int nb_extra_bytes; /* number of extra bytes */
char extra_bytes[1]; /* extra bytes storage */
};
......@@ -141,7 +141,7 @@ atom_t get_class_atom( struct window_class *class )
return class->atom;
}
void *get_class_client_ptr( struct window_class *class )
client_ptr_t get_class_client_ptr( struct window_class *class )
{
return class->client_ptr;
}
......
......@@ -2059,7 +2059,7 @@ enum message_type
user_handle_t parent; /* full handle of parent */
user_handle_t owner; /* full handle of owner */
int extra; /* number of extra bytes */
void* class_ptr; /* pointer to class in client address space */
client_ptr_t class_ptr; /* pointer to class in client address space */
@END
......@@ -2646,7 +2646,7 @@ enum message_type
mod_handle_t instance; /* module instance */
int extra; /* number of extra class bytes */
int win_extra; /* number of window extra bytes */
void* client_ptr; /* pointer to class in client address space */
client_ptr_t client_ptr; /* pointer to class in client address space */
VARARG(name,unicode_str); /* class name */
@REPLY
atom_t atom; /* resulting class atom */
......@@ -2659,7 +2659,7 @@ enum message_type
mod_handle_t instance; /* module instance */
VARARG(name,unicode_str); /* class name */
@REPLY
void* client_ptr; /* pointer to class in client address space */
client_ptr_t client_ptr; /* pointer to class in client address space */
@END
......
......@@ -2623,7 +2623,8 @@ static void dump_create_window_reply( const struct create_window_reply *req )
fprintf( stderr, " parent=%08x,", req->parent );
fprintf( stderr, " owner=%08x,", req->owner );
fprintf( stderr, " extra=%d,", req->extra );
fprintf( stderr, " class_ptr=%p", req->class_ptr );
fprintf( stderr, " class_ptr=" );
dump_uint64( &req->class_ptr );
}
static void dump_destroy_window_request( const struct destroy_window_request *req )
......@@ -3327,7 +3328,9 @@ static void dump_create_class_request( const struct create_class_request *req )
fprintf( stderr, "," );
fprintf( stderr, " extra=%d,", req->extra );
fprintf( stderr, " win_extra=%d,", req->win_extra );
fprintf( stderr, " client_ptr=%p,", req->client_ptr );
fprintf( stderr, " client_ptr=" );
dump_uint64( &req->client_ptr );
fprintf( stderr, "," );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
......@@ -3349,7 +3352,8 @@ static void dump_destroy_class_request( const struct destroy_class_request *req
static void dump_destroy_class_reply( const struct destroy_class_reply *req )
{
fprintf( stderr, " client_ptr=%p", req->client_ptr );
fprintf( stderr, " client_ptr=" );
dump_uint64( &req->client_ptr );
}
static void dump_set_class_info_request( const struct set_class_info_request *req )
......
......@@ -148,7 +148,7 @@ extern void release_class( struct window_class *class );
extern int is_desktop_class( struct window_class *class );
extern int is_hwnd_message_class( struct window_class *class );
extern atom_t get_class_atom( struct window_class *class );
extern void *get_class_client_ptr( struct window_class *class );
extern client_ptr_t get_class_client_ptr( struct window_class *class );
/* windows station functions */
......
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