diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 90c779bce86..7745de649be 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -2438,7 +2438,7 @@ HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle SetWindowLongA(hWnd, DWL_MSGRESULT, z); if (wndProc) - SetWindowLongA(hWnd, GWL_WNDPROC, wndProc); + SetWindowLongPtrA(hWnd, GWLP_WNDPROC, wndProc); } return hWnd; } @@ -2725,7 +2725,7 @@ HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle SetWindowLongA(hWnd, DWL_MSGRESULT, z); if (wndProc) - SetWindowLongA(hWnd, GWL_WNDPROC, wndProc); + SetWindowLongPtrA(hWnd, GWLP_WNDPROC, wndProc); } return hWnd; } diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c index abfcc569c72..5f9df126621 100644 --- a/dlls/wininet/dialogs.c +++ b/dlls/wininet/dialogs.c @@ -248,7 +248,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog( /* save the parameter list */ params = (struct WININET_ErrorDlgParams*) lParam; - SetWindowLongW( hdlg, GWL_USERDATA, lParam ); + SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); /* extract the Realm from the proxy response and show it */ if( WININET_GetAuthRealm( params->hRequest, @@ -272,7 +272,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog( } params = (struct WININET_ErrorDlgParams*) - GetWindowLongW( hdlg, GWL_USERDATA ); + GetWindowLongPtrW( hdlg, GWLP_USERDATA ); switch( uMsg ) { diff --git a/include/winuser.h b/include/winuser.h index 7490c6493bd..1585f2aa023 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -1344,13 +1344,15 @@ typedef struct { #define WC_DIALOG WINELIB_NAME_AW(WC_DIALOG) /* Offsets for GetWindowLong() and GetWindowWord() */ -#define GWL_USERDATA (-21) #define GWL_EXSTYLE (-20) #define GWL_STYLE (-16) -#define GWL_ID (-12) -#define GWL_HWNDPARENT (-8) -#define GWL_HINSTANCE (-6) -#define GWL_WNDPROC (-4) +#ifndef __WINESRC__ +# define GWL_USERDATA (-21) +# define GWL_ID (-12) +# define GWL_HWNDPARENT (-8) +# define GWL_HINSTANCE (-6) +# define GWL_WNDPROC (-4) +#endif /* __WINESRC__ */ #define DWL_MSGRESULT 0 #define DWL_DLGPROC 4 #define DWL_USER 8