Alexandre Julliard : user32: The per-window user data must be a
DWORD_PTR.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Oct 5 05:03:12 CDT 2006
Module: wine
Branch: master
Commit: 81c14724498f29c6e2cf7baf4736f4ae091ab868
URL: http://source.winehq.org/git/wine.git/?a=commit;h=81c14724498f29c6e2cf7baf4736f4ae091ab868
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Oct 4 21:49:11 2006 +0200
user32: The per-window user data must be a DWORD_PTR.
---
dlls/user/win.c | 6 +++---
include/win.h | 2 +-
include/wine/server_protocol.h | 6 +++---
server/protocol.def | 4 ++--
server/trace.c | 4 ++--
server/window.c | 4 ++--
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/user/win.c b/dlls/user/win.c
index 6118848..a6f1b37 100644
--- a/dlls/user/win.c
+++ b/dlls/user/win.c
@@ -1780,7 +1780,7 @@ static LONG_PTR WIN_GetWindowLong( HWND
case GWL_EXSTYLE: retvalue = reply->old_ex_style; break;
case GWLP_ID: retvalue = reply->old_id; break;
case GWLP_HINSTANCE: retvalue = (ULONG_PTR)reply->old_instance; break;
- case GWLP_USERDATA: retvalue = (ULONG_PTR)reply->old_user_data; break;
+ case GWLP_USERDATA: retvalue = reply->old_user_data; break;
default:
if (offset >= 0) retvalue = get_win_data( &reply->old_extra_value, size );
else SetLastError( ERROR_INVALID_INDEX );
@@ -1982,7 +1982,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, I
break;
case GWLP_USERDATA:
req->flags = SET_WIN_USERDATA;
- req->user_data = (void *)newval;
+ req->user_data = newval;
break;
default:
req->flags = SET_WIN_EXTRA;
@@ -2014,7 +2014,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, I
break;
case GWLP_USERDATA:
wndPtr->userdata = newval;
- retval = (ULONG_PTR)reply->old_user_data;
+ retval = reply->old_user_data;
break;
default:
retval = get_win_data( (char *)wndPtr->wExtra + offset, size );
diff --git a/include/win.h b/include/win.h
index d6268cf..951eeac 100644
--- a/include/win.h
+++ b/include/win.h
@@ -57,7 +57,7 @@ typedef struct tagWND
HICON hIcon; /* window's icon */
HICON hIconSmall; /* window's small icon */
int cbWndExtra; /* class cbWndExtra at window creation */
- DWORD userdata; /* User private data */
+ DWORD_PTR userdata; /* User private data */
DWORD wExtra[1]; /* Window extra bytes */
} WND;
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 14b4b82..f88f416 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -2643,7 +2643,7 @@ struct set_window_info_request
unsigned int id;
int is_unicode;
void* instance;
- void* user_data;
+ unsigned long user_data;
int extra_offset;
data_size_t extra_size;
unsigned long extra_value;
@@ -2655,7 +2655,7 @@ struct set_window_info_reply
unsigned int old_ex_style;
unsigned int old_id;
void* old_instance;
- void* old_user_data;
+ unsigned long old_user_data;
unsigned long old_extra_value;
};
#define SET_WIN_STYLE 0x01
@@ -4426,6 +4426,6 @@ union generic_reply
struct query_symlink_reply query_symlink_reply;
};
-#define SERVER_PROTOCOL_VERSION 251
+#define SERVER_PROTOCOL_VERSION 252
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/protocol.def b/server/protocol.def
index 7694287..7934e48 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1883,7 +1883,7 @@ #define NAMED_PIPE_SERVER_END
unsigned int id; /* window id */
int is_unicode; /* ANSI or unicode */
void* instance; /* creator instance */
- void* user_data; /* user-specific data */
+ unsigned long user_data; /* user-specific data */
int extra_offset; /* offset to set in extra bytes */
data_size_t extra_size; /* size to set in extra bytes */
unsigned long extra_value; /* value to set in extra bytes */
@@ -1892,7 +1892,7 @@ #define NAMED_PIPE_SERVER_END
unsigned int old_ex_style; /* old window extended style */
unsigned int old_id; /* old window id */
void* old_instance; /* old creator instance */
- void* old_user_data; /* old user-specific data */
+ unsigned long old_user_data; /* old user-specific data */
unsigned long old_extra_value; /* old value in extra bytes */
@END
#define SET_WIN_STYLE 0x01
diff --git a/server/trace.c b/server/trace.c
index 160a8e1..f6aafcb 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2382,7 +2382,7 @@ static void dump_set_window_info_request
fprintf( stderr, " id=%08x,", req->id );
fprintf( stderr, " is_unicode=%d,", req->is_unicode );
fprintf( stderr, " instance=%p,", req->instance );
- fprintf( stderr, " user_data=%p,", req->user_data );
+ fprintf( stderr, " user_data=%lx,", req->user_data );
fprintf( stderr, " extra_offset=%d,", req->extra_offset );
fprintf( stderr, " extra_size=%u,", req->extra_size );
fprintf( stderr, " extra_value=%lx", req->extra_value );
@@ -2394,7 +2394,7 @@ static void dump_set_window_info_reply(
fprintf( stderr, " old_ex_style=%08x,", req->old_ex_style );
fprintf( stderr, " old_id=%08x,", req->old_id );
fprintf( stderr, " old_instance=%p,", req->old_instance );
- fprintf( stderr, " old_user_data=%p,", req->old_user_data );
+ fprintf( stderr, " old_user_data=%lx,", req->old_user_data );
fprintf( stderr, " old_extra_value=%lx", req->old_extra_value );
}
diff --git a/server/window.c b/server/window.c
index 91930d0..ac97de5 100644
--- a/server/window.c
+++ b/server/window.c
@@ -78,7 +78,7 @@ struct window
unsigned int id; /* window id */
void* instance; /* creator instance */
int is_unicode; /* ANSI or unicode */
- void* user_data; /* user-specific data */
+ unsigned long user_data; /* user-specific data */
WCHAR *text; /* window caption text */
unsigned int paint_flags; /* various painting flags */
int prop_inuse; /* number of in-use window properties */
@@ -401,7 +401,7 @@ static struct window *create_window( str
win->id = 0;
win->instance = NULL;
win->is_unicode = 1;
- win->user_data = NULL;
+ win->user_data = 0;
win->text = NULL;
win->paint_flags = 0;
win->prop_inuse = 0;
More information about the wine-cvs
mailing list