Author: tkreuzer
Date: Sun Jun 27 22:19:17 2010
New Revision: 47884
URL:
http://svn.reactos.org/svn/reactos?rev=47884&view=rev
Log:
[USER32]
Merge from amd64 branch:
36987:
- Fix user32 compilation errors. (Samuel Serapion)
36988:
- Make user32 compile and link by defining Get/SetClass/WindowLongPtrA/W (Stefan
Ginsberg)
41480:
- Fix 64bit issues, add a wine compatibility hack (Timo Kreuzer)
41540:
- Make parameters for NtUserCallOneParam and NtUserCallTwoParam DWORD_PTR instead of DWORD
(Timo Kreuzer)
43965: (Samuel Serapion)
- Fix several user32 warnings.
- Sync GetWindow*A/W with wine and unify all versions, commenting out a wine hack.
- As a bonus implement GetWindowLongPtrA/W.
- Tested to work in trunk.
43992:
- Fix user32 build. (Samuel Serapion)
45124:
- Fix user32 build. (Samuel Serapion)
47472:
- Remove wine hack and allow user32 to compile again. (Samuel Serapion)
47878: (Timo Kreuzer)
- Use UlongToHandle instead of LongToHandle
- case to ULONG_PTR instead of using HandleToUlong
- SetSysColorsTemp: don't truncate the pointer sized n value, remove a comment
- IntGetClsWndProc: fix a bug
- IntGetWindowLong: pass !unicode to IntGetWndProc
47882:
- Make the uiLo and uiHi members of the KMDDELPARAM structure UINT_PTRs (Timo Kreuzer)
Modified:
trunk/reactos/ (props changed)
trunk/reactos/dll/win32/user32/controls/listbox.c
trunk/reactos/dll/win32/user32/controls/scrollbar.c
trunk/reactos/dll/win32/user32/include/ntwrapper.h
trunk/reactos/dll/win32/user32/include/user32p.h
trunk/reactos/dll/win32/user32/include/window.h
trunk/reactos/dll/win32/user32/misc/exit.c
trunk/reactos/dll/win32/user32/misc/misc.c
trunk/reactos/dll/win32/user32/misc/resources.c
trunk/reactos/dll/win32/user32/misc/stubs.c
trunk/reactos/dll/win32/user32/misc/winhelp.c
trunk/reactos/dll/win32/user32/windows/class.c
trunk/reactos/dll/win32/user32/windows/clipboard.c
trunk/reactos/dll/win32/user32/windows/dialog.c
trunk/reactos/dll/win32/user32/windows/hook.c
trunk/reactos/dll/win32/user32/windows/menu.c
trunk/reactos/dll/win32/user32/windows/message.c
trunk/reactos/dll/win32/user32/windows/messagebox.c
trunk/reactos/dll/win32/user32/windows/nonclient.c
trunk/reactos/dll/win32/user32/windows/prop.c
trunk/reactos/dll/win32/user32/windows/spy.c
trunk/reactos/dll/win32/user32/windows/window.c
trunk/reactos/include/reactos/win32k/ntuser.h
Propchange: trunk/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Jun 27 22:19:17 2010
@@ -1,4 +1,4 @@
/branches/header-work:45691-47721
/branches/reactos-yarotows:46848,46966,47800
/branches/ros-amd64-bringup:36852
-/branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36397,36445,36502-36503,36505,36570,36614,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40927-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43857-43858,43860,43905-43907,43969,44002,44036-44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338-44339,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44772,45124,45126-45127,46394,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805
+/branches/ros-amd64-bringup/reactos:34711-34712,34741,34743,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36445,36502-36503,36505,36570,36614,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40927-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41484-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43857-43858,43860,43905-43907,43965,43969,43992,44002,44036-44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338-44339,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,45124,45126-45127,46394,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,47472,47846-47847,47878,47882
Modified: trunk/reactos/dll/win32/user32/controls/listbox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/listbox.c [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -44,7 +44,7 @@
#define WS_EX_DRAGDETECT 0x00000002L
#define WM_BEGINDRAG 0x022C
-UINT WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
+UINT_PTR WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
BOOL WINAPI KillSystemTimer(HWND,UINT_PTR);
/* End of hack section -------------------------------- */
Modified: trunk/reactos/dll/win32/user32/controls/scrollbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/scrollbar.c [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -68,7 +68,7 @@
HBRUSH DefWndControlColor(HDC hDC, UINT ctlType);
-UINT WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
+UINT_PTR WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
BOOL WINAPI KillSystemTimer(HWND,UINT_PTR);
/*********************************************************************
Modified: trunk/reactos/dll/win32/user32/include/ntwrapper.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/n…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/ntwrapper.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/ntwrapper.h [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -85,7 +85,7 @@
}
EXTINLINE DWORD WINAPI
-DragObject(HWND hwnd1, HWND hwnd2, UINT u1, DWORD dw1, HCURSOR hc1)
+DragObject(HWND hwnd1, HWND hwnd2, UINT u1, ULONG_PTR dw1, HCURSOR hc1)
{
return NtUserDragObject(hwnd1, hwnd2, u1, dw1, hc1);
}
Modified: trunk/reactos/dll/win32/user32/include/user32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/user32p.h [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -93,7 +93,7 @@
NtUserCallOneParam((DWORD_PTR)bShow, ONEPARAM_ROUTINE_SHOWCURSOR)
#define NtUserGetDesktopMapping(Ptr) \
- (PVOID)NtUserCallOneParam((DWORD)Ptr, ONEPARAM_ROUTINE_GETDESKTOPMAPPING)
+ (PVOID)NtUserCallOneParam((DWORD_PTR)Ptr, ONEPARAM_ROUTINE_GETDESKTOPMAPPING)
#define NtUserSetCursorPos(x, y) \
(BOOL)NtUserCallTwoParam((DWORD)x, (DWORD)y, TWOPARAM_ROUTINE_SETCURSORPOS)
Modified: trunk/reactos/dll/win32/user32/include/window.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/window.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/window.h [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -65,5 +65,5 @@
BOOL Unicode);
HWND* WIN_ListChildren (HWND hWndparent);
-ULONG_PTR FASTCALL IntGetWndProc(PWND, BOOL);
+WNDPROC FASTCALL IntGetWndProc(PWND, BOOL);
DWORD WINAPI GetRealWindowOwner(HWND);
Modified: trunk/reactos/dll/win32/user32/misc/exit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/exit…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/exit.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/exit.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -1,5 +1,4 @@
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/exit.c
@@ -101,7 +100,7 @@
NTSTATUS Status;
CsrRequest = MAKE_CSR_API(REGISTER_SERVICES_PROCESS, CSR_GUI);
- Request.Data.RegisterServicesProcessRequest.ProcessId = (HANDLE)ServicesProcessId;
+ Request.Data.RegisterServicesProcessRequest.ProcessId =
UlongToHandle(ServicesProcessId);
Status = CsrClientCallServer(&Request,
NULL,
Modified: trunk/reactos/dll/win32/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/misc…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/misc.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -267,7 +267,7 @@
return TRUE;
else
return (NtUserQueryWindow(Wnd->head.h, QUERY_WINDOW_UNIQUE_PROCESS_ID) ==
- (DWORD)NtCurrentTeb()->ClientId.UniqueProcess );
+ (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess );
}
BOOL
@@ -293,7 +293,7 @@
INT Index;
USHORT generation;
- Index = (((UINT)handle & 0xffff) - FIRST_USER_HANDLE) >> 1;
+ Index = (((UINT_PTR)handle & 0xffff) - FIRST_USER_HANDLE) >> 1;
if (Index < 0 || Index >= gHandleTable->nb_handles)
return NULL;
@@ -301,7 +301,7 @@
if (!gHandleEntries[Index].type || !gHandleEntries[Index].ptr)
return NULL;
- generation = (UINT)handle >> 16;
+ generation = (UINT_PTR)handle >> 16;
if (generation == gHandleEntries[Index].generation || !generation || generation ==
0xffff)
return &gHandleEntries[Index];
Modified: trunk/reactos/dll/win32/user32/misc/resources.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/reso…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/resources.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/resources.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -174,7 +174,7 @@
return FALSE;
}
- ConfigRet = UnRegNotify((ULONG) Handle );
+ ConfigRet = UnRegNotify((ULONG_PTR)Handle );
if (ConfigRet != CR_SUCCESS)
{
switch (ConfigRet)
Modified: trunk/reactos/dll/win32/user32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/stub…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/stubs.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -197,7 +197,7 @@
}
if (!pPens && !pBrushes) /* "restore" call */
{
- LPVOID pOldCol = (LPVOID)n; /* FIXME: not 64-bit safe */
+ LPVOID pOldCol = (LPVOID)n;
LPVOID p = pOldCol;
DWORD nCount = *(DWORD *)p;
p = (char*)p + sizeof(DWORD);
Modified: trunk/reactos/dll/win32/user32/misc/winhelp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/winh…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/winhelp.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/winhelp.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -16,8 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/winhelp.c
* PURPOSE: WinHelp
@@ -51,7 +50,7 @@
*/
BOOL
WINAPI
-WinHelpA(HWND hWnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
+WinHelpA(HWND hWnd, LPCSTR lpszHelp, UINT uCommand, DWORD_PTR dwData)
{
static WORD WM_WINHELP = 0;
HWND hDest;
@@ -137,7 +136,7 @@
*/
BOOL
WINAPI
-WinHelpW(HWND hWnd, LPCWSTR lpszHelp, UINT uCommand, DWORD dwData)
+WinHelpW(HWND hWnd, LPCWSTR lpszHelp, UINT uCommand, DWORD_PTR dwData)
{
INT len;
LPSTR file;
Modified: trunk/reactos/dll/win32/user32/windows/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/class.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -266,11 +266,11 @@
//
// Based on IntGetClsWndProc
//
-ULONG_PTR FASTCALL
+WNDPROC FASTCALL
IntGetWndProc(PWND pWnd, BOOL Ansi)
{
INT i;
- ULONG_PTR gcpd, Ret = 0;
+ WNDPROC gcpd, Ret = 0;
PCLS Class = DesktopPtrToUser(pWnd->pcls);
if (!Class) return Ret;
@@ -282,9 +282,9 @@
if (GETPFNSERVER(i) == pWnd->lpfnWndProc)
{
if (Ansi)
- Ret = (ULONG_PTR)GETPFNCLIENTA(i);
+ Ret = GETPFNCLIENTA(i);
else
- Ret = (ULONG_PTR)GETPFNCLIENTW(i);
+ Ret = GETPFNCLIENTW(i);
}
}
return Ret;
@@ -296,36 +296,36 @@
is treated specially.
*/
if (Class->fnid == FNID_EDIT)
- Ret = (ULONG_PTR)pWnd->lpfnWndProc;
+ Ret = pWnd->lpfnWndProc;
else
{
// Set return proc.
- Ret = (ULONG_PTR)pWnd->lpfnWndProc;
+ Ret = pWnd->lpfnWndProc;
if (Class->fnid <= FNID_GHOST && Class->fnid >= FNID_BUTTON)
{
if (Ansi)
{
if (GETPFNCLIENTW(Class->fnid) == pWnd->lpfnWndProc)
- Ret = (ULONG_PTR)GETPFNCLIENTA(Class->fnid);
+ Ret = GETPFNCLIENTA(Class->fnid);
}
else
{
if (GETPFNCLIENTA(Class->fnid) == pWnd->lpfnWndProc)
- Ret = (ULONG_PTR)GETPFNCLIENTW(Class->fnid);
+ Ret = GETPFNCLIENTW(Class->fnid);
}
}
// Return on the change.
- if ( Ret != (ULONG_PTR)pWnd->lpfnWndProc)
+ if ( Ret != pWnd->lpfnWndProc)
return Ret;
}
if ( Ansi == !!(pWnd->state & WNDS_ANSIWINDOWPROC) )
return Ret;
- gcpd = NtUserGetCPD( UserHMGetHandle(pWnd),
- (Ansi ? UserGetCPDA2U : UserGetCPDU2A )|UserGetCPDWindow,
- Ret);
+ gcpd = (WNDPROC)NtUserGetCPD( UserHMGetHandle(pWnd),
+ (Ansi ? UserGetCPDA2U : UserGetCPDU2A
)|UserGetCPDWindow,
+ (ULONG_PTR)Ret);
return (gcpd ? gcpd : Ret);
}
@@ -538,6 +538,32 @@
return Ret;
}
+#ifdef _WIN64
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+GetClassLongPtrA(HWND hWnd,
+ INT nIndex)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+GetClassLongPtrW(HWND hWnd,
+ INT nIndex)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+#endif
+
/*
* @implemented
@@ -627,141 +653,133 @@
}
-/*
- * @implemented
- */
-LONG
-WINAPI
-GetWindowLongA ( HWND hWnd, int nIndex )
-{
- PWND Wnd;
-
- Wnd = ValidateHwnd(hWnd);
- if (Wnd == NULL)
+LONG_PTR IntGetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicode )
+{
+ LONG_PTR retvalue = 0;
+ WND *wndPtr;
+
+ if (offset == GWLP_HWNDPARENT)
+ {
+ HWND parent = GetAncestor( hwnd, GA_PARENT );
+ if (parent == GetDesktopWindow()) parent = GetWindow( hwnd, GW_OWNER );
+ return (ULONG_PTR)parent;
+ }
+
+ if (!(wndPtr = ValidateHwnd( hwnd )))
+ {
+ SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
-
- if (nIndex >= 0)
- {
- if ((DWORD)nIndex + sizeof(LONG) > Wnd->cbwndExtra)
+ }
+
+ if (offset >= 0)
+ {
+ if (offset > (int)(wndPtr->cbwndExtra - size))
{
- SetLastError(ERROR_INVALID_PARAMETER);
+ WARN("Invalid offset %d\n", offset );
+ SetLastError( ERROR_INVALID_INDEX );
return 0;
}
- return *((LONG *)((PCHAR)(Wnd + 1) + nIndex));
- }
- else
- {
- switch (nIndex)
+ retvalue = *((LONG_PTR *)((PCHAR)(wndPtr + 1) + offset));
+
+ /* WINE: special case for dialog window procedure */
+ //if ((offset == DWLP_DLGPROC) && (size == sizeof(LONG_PTR)) &&
(wndPtr->flags & WIN_ISDIALOG))
+ // retvalue = (LONG_PTR)IntGetWndProc( (WNDPROC)retvalue, unicode );
+ return retvalue;
+ }
+
+ switch(offset)
+ {
+ case GWLP_USERDATA: retvalue = wndPtr->dwUserData; break;
+ case GWL_STYLE: retvalue = wndPtr->style; break;
+ case GWL_EXSTYLE: retvalue = wndPtr->ExStyle; break;
+ case GWLP_ID: retvalue = wndPtr->IDMenu; break;
+ case GWLP_HINSTANCE: retvalue = (ULONG_PTR)wndPtr->hModule; break;
+ case GWLP_WNDPROC:
+ {
+ if (!TestWindowProcess(wndPtr))
+ {
+ SetLastError(ERROR_ACCESS_DENIED);
+ retvalue = 0;
+ }
+ retvalue = (ULONG_PTR)IntGetWndProc(wndPtr, !unicode);
+ break;
+ }
+ default:
+ WARN("Unknown offset %d\n", offset );
+ SetLastError( ERROR_INVALID_INDEX );
+ break;
+ }
+ return retvalue;
+
+}
+/*
+ * @implemented
+ */
+LONG
+WINAPI
+GetWindowLongA ( HWND hWnd, int nIndex )
+{
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG), FALSE );
+}
+
+/*
+ * @implemented
+ */
+LONG
+WINAPI
+GetWindowLongW(HWND hWnd, int nIndex)
+{
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG), TRUE );
+}
+
+#ifdef _WIN64
+/*
+ * @implemented
+ */
+LONG_PTR
+WINAPI
+GetWindowLongPtrA(HWND hWnd,
+ INT nIndex)
+{
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), FALSE );
+}
+
+/*
+ * @implemented
+ */
+LONG_PTR
+WINAPI
+GetWindowLongPtrW(HWND hWnd,
+ INT nIndex)
+{
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), TRUE );
+
+}
+#endif // _WIN64
+
+/*
+ * @implemented
+ */
+WORD
+WINAPI
+GetWindowWord(HWND hWnd, int nIndex)
+{
+ switch(nIndex)
+ {
+ case GWLP_ID:
+ case GWLP_HINSTANCE:
+ case GWLP_HWNDPARENT:
+ break;
+ default:
+ if (nIndex < 0)
{
- case GWL_EXSTYLE:
- return Wnd->ExStyle;
- case GWL_STYLE:
- return Wnd->style;
- case GWL_HINSTANCE:
- return (LONG)Wnd->hModule;
- case GWL_ID:
- return Wnd->IDMenu;
- case GWL_USERDATA:
- return Wnd->dwUserData;
-
- case GWL_HWNDPARENT:
- {
- HWND parent = GetAncestor( hWnd, GA_PARENT );
- if (parent == GetDesktopWindow()) parent = GetWindow( hWnd, GW_OWNER );
- return (LONG)parent;
- }
- case GWL_WNDPROC:
- if (!TestWindowProcess(Wnd))
- {
- SetLastError(ERROR_ACCESS_DENIED);
- return 0;
- }
- return IntGetWndProc(Wnd, TRUE);
-
- default:
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
- }
-}
-
-
-/*
- * @implemented
- */
-LONG
-WINAPI
-GetWindowLongW(HWND hWnd, int nIndex)
-{
- PWND Wnd;
-
- Wnd = ValidateHwnd(hWnd);
- if (Wnd == NULL)
- return 0;
-
- if (nIndex >= 0)
- {
- if ((DWORD)nIndex + sizeof(LONG) > Wnd->cbwndExtra)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
+ WARN("Invalid offset %d\n", nIndex );
+ SetLastError( ERROR_INVALID_INDEX );
return 0;
}
- return *((LONG *)((PCHAR)(Wnd + 1) + nIndex));
- }
- else
- {
- switch (nIndex)
- {
- case GWL_EXSTYLE:
- return Wnd->ExStyle;
- case GWL_STYLE:
- return Wnd->style;
- case GWL_HINSTANCE:
- return (LONG)Wnd->hModule;
- case GWL_ID:
- return Wnd->IDMenu;
- case GWL_USERDATA:
- return Wnd->dwUserData;
-
- case GWL_HWNDPARENT:
- {
- HWND parent = GetAncestor( hWnd, GA_PARENT );
- if (parent == GetDesktopWindow()) parent = GetWindow( hWnd, GW_OWNER );
- return (LONG)parent;
- }
- case GWL_WNDPROC:
- if (!TestWindowProcess(Wnd))
- {
- SetLastError(ERROR_ACCESS_DENIED);
- return 0;
- }
- return IntGetWndProc(Wnd, FALSE);
-
- default:
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
- }
-}
-
-/*
- * @implemented
- */
-WORD
-WINAPI
-GetWindowWord(HWND hWnd, int nIndex)
-{
- return (WORD)GetWindowLongW(hWnd, nIndex);
-}
-
-/*
- * @implemented
- */
-WORD
-WINAPI
-SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord )
-{
- return (WORD)NtUserSetWindowLong ( hWnd, nIndex, (LONG)wNewWord, TRUE );
+ break;
+ }
+ return IntGetWindowLong( hWnd, nIndex, sizeof(WORD), FALSE );
}
/*
@@ -1167,7 +1185,7 @@
int nIndex,
LONG dwNewLong)
{
- PSTR lpStr = (PSTR)dwNewLong;
+ PSTR lpStr = (PSTR)(ULONG_PTR)dwNewLong;
UNICODE_STRING Value = {0};
BOOL Allocated = FALSE;
DWORD Ret;
@@ -1190,7 +1208,7 @@
else
Value.Buffer = (PWSTR)lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
else if (nIndex == GCW_ATOM && lpStr != NULL)
{
@@ -1208,7 +1226,7 @@
else
Value.Buffer = (PWSTR)lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
Ret = (DWORD)NtUserSetClassLong(hWnd,
@@ -1234,7 +1252,7 @@
int nIndex,
LONG dwNewLong)
{
- PWSTR lpStr = (PWSTR)dwNewLong;
+ PWSTR lpStr = (PWSTR)(ULONG_PTR)dwNewLong;
UNICODE_STRING Value = {0};
TRACE("%p %d %lx\n", hWnd, nIndex, dwNewLong);
@@ -1251,7 +1269,7 @@
else
Value.Buffer = lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
else if (nIndex == GCW_ATOM && lpStr != NULL)
{
@@ -1263,7 +1281,7 @@
else
Value.Buffer = lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
return (DWORD)NtUserSetClassLong(hWnd,
@@ -1272,6 +1290,33 @@
FALSE);
}
+#ifdef _WIN64
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+SetClassLongPtrA(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+SetClassLongPtrW(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+#endif // _WIN64
/*
* @implemented
@@ -1292,6 +1337,30 @@
return (WORD) SetClassLongW ( hWnd, nIndex, wNewWord );
}
+/*
+ * @implemented
+ */
+WORD
+WINAPI
+SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord )
+{
+ switch(nIndex)
+ {
+ case GWLP_ID:
+ case GWLP_HINSTANCE:
+ case GWLP_HWNDPARENT:
+ break;
+ default:
+ if (nIndex < 0)
+ {
+ WARN("Invalid offset %d\n", nIndex );
+ SetLastError( ERROR_INVALID_INDEX );
+ return 0;
+ }
+ break;
+ }
+ return NtUserSetWindowLong( hWnd, nIndex, wNewWord, FALSE );
+}
/*
* @implemented
@@ -1306,7 +1375,6 @@
return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, TRUE);
}
-
/*
* @implemented
*/
@@ -1320,6 +1388,31 @@
return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
}
+#ifdef _WIN64
+/*
+ * @implemented
+ */
+LONG_PTR
+WINAPI
+SetWindowLongPtrA(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
+}
+
+/*
+ * @implemented
+ */
+LONG_PTR
+WINAPI
+SetWindowLongPtrW(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
+}
+#endif
/*
* @implemented
Modified: trunk/reactos/dll/win32/user32/windows/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/c…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/clipboard.c [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -54,19 +54,19 @@
{
HGLOBAL hGlobal = NULL;
PVOID pGlobal = NULL;
- DWORD size = 0;
+ DWORD_PTR size = 0;
/* dealing with bitmap object */
if (uFormat != CF_BITMAP)
{
- size = (DWORD)NtUserGetClipboardData(uFormat, NULL);
+ size = (DWORD_PTR)NtUserGetClipboardData(uFormat, NULL);
if (size)
{
hGlobal = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, size);
pGlobal = GlobalLock(hGlobal);
- size = (DWORD)NtUserGetClipboardData(uFormat, pGlobal);
+ size = (DWORD_PTR)NtUserGetClipboardData(uFormat, pGlobal);
GlobalUnlock(hGlobal);
}
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -159,7 +159,7 @@
SETDLGINFO( hWnd, dlgInfo );
- NtUserCallHwndParam( hWnd, (DWORD)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER
);
+ NtUserCallHwndParam( hWnd, (DWORD_PTR)dlgInfo,
HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
}
else
{
@@ -342,7 +342,7 @@
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
- hwnd, (HMENU)info.id,
+ hwnd, (HMENU)(ULONG_PTR)info.id,
hInst, (LPVOID)info.data );
}
else
@@ -373,7 +373,7 @@
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
- hwnd, (HMENU)info.id,
+ hwnd, (HMENU)(ULONG_PTR)info.id,
hInst, (LPVOID)info.data );
}
else
@@ -618,7 +618,7 @@
p++;
break;
case 0xffff:
- result->menuName = (LPCWSTR)(UINT)GET_WORD( p + 1 );
+ result->menuName = (LPCWSTR)(UINT_PTR)GET_WORD( p + 1 );
p += 2;
break;
default:
@@ -636,7 +636,7 @@
p++;
break;
case 0xffff:
- result->className = (LPCWSTR)(UINT)GET_WORD( p + 1 );
+ result->className = (LPCWSTR)(UINT_PTR)GET_WORD( p + 1 );
p += 2;
break;
default:
Modified: trunk/reactos/dll/win32/user32/windows/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/h…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -441,12 +441,12 @@
if (NULL != CbtCreatewndExtra->Cs.lpszName)
{
Csw.lpszName = (LPCWSTR)((PCHAR) CbtCreatewndExtra
- + (ULONG) CbtCreatewndExtra->Cs.lpszName);
+ + (ULONG_PTR) CbtCreatewndExtra->Cs.lpszName);
}
if (0 != HIWORD(CbtCreatewndExtra->Cs.lpszClass))
{
Csw.lpszClass = (LPCWSTR)((PCHAR) CbtCreatewndExtra
- + LOWORD((ULONG)
CbtCreatewndExtra->Cs.lpszClass));
+ + LOWORD((ULONG_PTR)
CbtCreatewndExtra->Cs.lpszClass));
}
wParam = Common->wParam;
if (Common->Ansi)
Modified: trunk/reactos/dll/win32/user32/windows/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/menu.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -1804,7 +1804,7 @@
case WM_CREATE:
{
CREATESTRUCTA *cs = (CREATESTRUCTA *) lParam;
- SetWindowLongPtrA(Wnd, 0, (LONG) cs->lpCreateParams);
+ SetWindowLongPtrA(Wnd, 0, (LONG_PTR)cs->lpCreateParams);
return 0;
}
@@ -1877,7 +1877,7 @@
case WM_CREATE:
{
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
- SetWindowLongPtrW(Wnd, 0, (LONG) cs->lpCreateParams);
+ SetWindowLongPtrW(Wnd, 0, (LONG_PTR)cs->lpCreateParams);
return 0;
}
@@ -3722,7 +3722,7 @@
{
mii->fType |= MFT_OWNERDRAW;
mii->fMask |= MIIM_DATA;
- mii->dwItemData = (DWORD) NewItem;
+ mii->dwItemData = (DWORD_PTR) NewItem;
}
else if (Flags & MF_SEPARATOR)
{
@@ -4140,7 +4140,7 @@
if (!Wnd)
return NULL;
- return (HMENU)Wnd->IDMenu;
+ return UlongToHandle(Wnd->IDMenu);
}
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -172,11 +172,11 @@
if (0 != HIWORD(DdeLparam->Value.Packed.uiHi))
{
/* uiHi should contain a hMem from WM_DDE_EXECUTE */
- HGLOBAL h = DdeGetPair((HGLOBAL) DdeLparam->Value.Packed.uiHi);
+ HGLOBAL h =
DdeGetPair((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi);
if (NULL != h)
{
- GlobalFree((HGLOBAL) DdeLparam->Value.Packed.uiHi);
- DdeLparam->Value.Packed.uiHi = (UINT) h;
+ GlobalFree((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi);
+ DdeLparam->Value.Packed.uiHi = (UINT_PTR) h;
}
}
FreeDDElParam(UMMsg->message, UMMsg->lParam);
@@ -686,7 +686,7 @@
return FALSE;
}
CsA->lpszName = AnsiString.Buffer;
- if (HIWORD((ULONG)CsW->lpszClass) != 0)
+ if (HIWORD((ULONG_PTR)CsW->lpszClass) != 0)
{
RtlInitUnicodeString(&UnicodeString, CsW->lpszClass);
Status = RtlUnicodeStringToAnsiString(&AnsiString, &UnicodeString,
TRUE);
@@ -850,7 +850,7 @@
Cs = (CREATESTRUCTA*) AnsiMsg->lParam;
RtlInitAnsiString(&AnsiString, Cs->lpszName);
RtlFreeAnsiString(&AnsiString);
- if (HIWORD((ULONG)Cs->lpszClass) != 0)
+ if (HIWORD((ULONG_PTR)Cs->lpszClass) != 0)
{
RtlInitAnsiString(&AnsiString, Cs->lpszClass);
RtlFreeAnsiString(&AnsiString);
@@ -947,7 +947,7 @@
MSG UnicodeMsg;
MSG AnsiMsg;
PMSG FinalMsg;
- ULONG LParamSize;
+ SIZE_T LParamSize;
} MSGCONVERSION, *PMSGCONVERSION;
static PMSGCONVERSION MsgConversions = NULL;
@@ -2452,7 +2452,7 @@
* @implemented
*/
BOOL WINAPI
-TranslateMessageEx(CONST MSG *lpMsg, DWORD unk)
+TranslateMessageEx(CONST MSG *lpMsg, UINT Flags)
{
switch (lpMsg->message)
{
@@ -2460,7 +2460,7 @@
case WM_KEYUP:
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
- return(NtUserTranslateMessage((LPMSG)lpMsg, unk));
+ return(NtUserTranslateMessage((LPMSG)lpMsg, Flags));
default:
if ( lpMsg->message & ~WM_MAXIMUM )
Modified: trunk/reactos/dll/win32/user32/windows/messagebox.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/messagebox.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/messagebox.c [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -423,7 +423,7 @@
}
/* create static for text */
- dest = (BYTE*)(((DWORD)dest + 3) & ~3);
+ dest = (BYTE*)(((UINT_PTR)dest + 3) & ~3);
itxt = (DLGITEMTEMPLATE *)dest;
itxt->style = WS_CHILD | WS_VISIBLE | SS_NOPREFIX;
if(lpMsgBoxParams->dwStyle & MB_RIGHT)
@@ -450,7 +450,7 @@
btnrect.left = btnrect.top = 0;
for(i = 0; i < nButtons; i++)
{
- dest = (BYTE*)(((DWORD)dest + 3) & ~3);
+ dest = (BYTE*)(((UINT_PTR)dest + 3) & ~3);
ibtn[i] = (DLGITEMTEMPLATE *)dest;
ibtn[i]->style = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
if(!defbtn && (i == ((lpMsgBoxParams->dwStyle & MB_DEFMASK) >>
8)))
@@ -699,7 +699,7 @@
UNICODE_STRING textW, captionW, iconW;
int ret;
- if (HIWORD((UINT)lpMsgBoxParams->lpszText))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszText))
{
RtlCreateUnicodeStringFromAsciiz(&textW, (PCSZ)lpMsgBoxParams->lpszText);
/*
@@ -711,7 +711,7 @@
else
textW.Buffer = (LPWSTR)lpMsgBoxParams->lpszText;
- if (HIWORD((UINT)lpMsgBoxParams->lpszCaption))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszCaption))
{
RtlCreateUnicodeStringFromAsciiz(&captionW,
(PCSZ)lpMsgBoxParams->lpszCaption);
/*
@@ -725,7 +725,7 @@
if(lpMsgBoxParams->dwStyle & MB_USERICON)
{
- if (HIWORD((UINT)lpMsgBoxParams->lpszIcon))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszIcon))
{
RtlCreateUnicodeStringFromAsciiz(&iconW,
(PCSZ)lpMsgBoxParams->lpszIcon);
/*
@@ -753,13 +753,13 @@
ret = MessageBoxTimeoutIndirectW(&msgboxW, (UINT)-1);
- if (HIWORD((UINT)lpMsgBoxParams->lpszText))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszText))
RtlFreeUnicodeString(&textW);
- if (HIWORD((UINT)lpMsgBoxParams->lpszCaption))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszCaption))
RtlFreeUnicodeString(&captionW);
- if ((lpMsgBoxParams->dwStyle & MB_USERICON) &&
HIWORD((UINT)iconW.Buffer))
+ if ((lpMsgBoxParams->dwStyle & MB_USERICON) &&
HIWORD((UINT_PTR)iconW.Buffer))
RtlFreeUnicodeString(&iconW);
return ret;
@@ -809,12 +809,12 @@
UNICODE_STRING textW, captionW;
int ret;
- if (HIWORD((UINT)lpText))
+ if (HIWORD((UINT_PTR)lpText))
RtlCreateUnicodeStringFromAsciiz(&textW, (PCSZ)lpText);
else
textW.Buffer = (LPWSTR)lpText;
- if (HIWORD((UINT)lpCaption))
+ if (HIWORD((UINT_PTR)lpCaption))
RtlCreateUnicodeStringFromAsciiz(&captionW, (PCSZ)lpCaption);
else
captionW.Buffer = (LPWSTR)lpCaption;
Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/n…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/nonclient.c [iso-8859-1] Sun Jun 27 22:19:17
2010
@@ -122,13 +122,13 @@
{
HICON hIcon = 0;
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000,
(LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000,
(PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000,
(LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000,
(PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000,
(LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000,
(PDWORD_PTR)&hIcon);
if (!hIcon)
hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
Modified: trunk/reactos/dll/win32/user32/windows/prop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/p…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/prop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/prop.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -377,7 +377,7 @@
}
else
{
- Atom = LOWORD((DWORD)lpString);
+ Atom = LOWORD((DWORD_PTR)lpString);
}
Prop = IntGetProp(hWnd, Atom);
if (Prop != NULL) Data = Prop->Data;
@@ -428,7 +428,7 @@
}
else
{
- Atom = LOWORD((DWORD)lpString);
+ Atom = LOWORD((DWORD_PTR)lpString);
}
return(NtUserRemoveProp(hWnd, Atom));
}
@@ -476,7 +476,7 @@
}
else
{
- Atom = LOWORD((DWORD)lpString);
+ Atom = LOWORD((DWORD_PTR)lpString);
}
return(NtUserSetProp(hWnd, Atom, hData));
Modified: trunk/reactos/dll/win32/user32/windows/spy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/s…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/spy.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -2117,7 +2117,7 @@
/* save and restore error code over the next call */
save_error = GetLastError();
/* special code to detect a property sheet dialog */
- if ((GetClassLongPtrW(sp_e->msg_hwnd, GCW_ATOM) == (LONG)WC_DIALOG) &&
+ if ((GetClassLongPtrW(sp_e->msg_hwnd, GCW_ATOM) == (ULONG_PTR)WC_DIALOG)
&&
(GetPropW(sp_e->msg_hwnd, PropSheetInfoStr))) {
strcpyW(sp_e->wnd_class, WC_PROPSHEETW);
}
Modified: trunk/reactos/dll/win32/user32/windows/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -135,7 +135,7 @@
{
SendMessageA(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
- return (BOOL)(hWnd);
+ return HandleToUlong(hWnd);
}
VOID
@@ -402,7 +402,7 @@
MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
- if (!(dwStyle & WS_POPUP)) hMenu = (HMENU)id;
+ if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
if (dwStyle & (WS_CHILD | WS_POPUP))
{
@@ -532,7 +532,7 @@
MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
- if (!(dwStyle & WS_POPUP)) hMenu = (HMENU)id;
+ if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
if (dwStyle & (WS_CHILD | WS_POPUP))
{
@@ -692,7 +692,7 @@
* Once that's fixed, we shouldn't have to check for a NULL HWND
* here
*/
- if (!(ULONG)pHwnd[i]) /* don't enumerate a NULL HWND */
+ if (!pHwnd[i]) /* don't enumerate a NULL HWND */
continue;
if (!(*lpfn)(pHwnd[i], lParam))
{
@@ -1442,8 +1442,8 @@
{ // We are current.
//FIXME("Current!\n");
if (lpdwProcessId)
- *lpdwProcessId = (DWORD)NtCurrentTeb()->ClientId.UniqueProcess;
- Ret = (DWORD)NtCurrentTeb()->ClientId.UniqueThread;
+ *lpdwProcessId = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess;
+ Ret = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueThread;
}
else
{ // Ask kernel for info.
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Sun Jun 27 22:19:17 2010
@@ -3118,8 +3118,8 @@
{
struct
{
- UINT uiLo;
- UINT uiHi;
+ UINT_PTR uiLo;
+ UINT_PTR uiHi;
} Packed;
LPARAM Unpacked;
} Value;