use Get/SetWindowLongPtr() where appropriate in favor of 64bit compatibility

svn path=/trunk/; revision=11073
This commit is contained in:
Thomas Bluemel 2004-09-26 15:55:53 +00:00
parent d3f70f50f0
commit cc0fabacd1
17 changed files with 45 additions and 43 deletions

View file

@ -107,6 +107,8 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE;
#define MessageBoxIndirect MessageBoxIndirectW #define MessageBoxIndirect MessageBoxIndirectW
#define GetWindowLong GetWindowLongW #define GetWindowLong GetWindowLongW
#define SetWindowLong SetWindowLongW #define SetWindowLong SetWindowLongW
#define GetWindowLongPtr GetWindowLongW
#define SetWindowLongPtr SetWindowLongW
#define GetClassLong GetClassLongW #define GetClassLong GetClassLongW
#define SetClassLong SetClassLongW #define SetClassLong SetClassLongW
#define FindWindow FindWindowW #define FindWindow FindWindowW

View file

@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* $Id: aclui.c,v 1.6 2004/08/14 11:50:25 weiden Exp $ /* $Id: aclui.c,v 1.7 2004/09/26 15:55:52 weiden Exp $
* *
* PROJECT: ReactOS Access Control List Editor * PROJECT: ReactOS Access Control List Editor
* FILE: lib/aclui/aclui.c * FILE: lib/aclui/aclui.c
@ -96,7 +96,7 @@ SecurityPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
sp->hiUsrs = ImageList_LoadBitmap(hDllInstance, MAKEINTRESOURCE(IDB_USRGRPIMAGES), 16, 3, 0); sp->hiUsrs = ImageList_LoadBitmap(hDllInstance, MAKEINTRESOURCE(IDB_USRGRPIMAGES), 16, 3, 0);
/* save the pointer to the structure */ /* save the pointer to the structure */
SetWindowLong(hwndDlg, DWL_USER, (LONG)sp); SetWindowLongPtr(hwndDlg, DWL_USER, (DWORD_PTR)sp);
GetClientRect(sp->hWndUsrList, &rcLvClient); GetClientRect(sp->hWndUsrList, &rcLvClient);

View file

@ -15,7 +15,7 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* $Id: ncpa.c,v 1.2 2004/08/15 16:50:30 kuehng Exp $ /* $Id: ncpa.c,v 1.3 2004/09/26 15:55:52 weiden Exp $
* *
* PROJECT: ReactOS Network Control Panel * PROJECT: ReactOS Network Control Panel
* FILE: lib/cpl/system/ncpa.c * FILE: lib/cpl/system/ncpa.c
@ -242,7 +242,7 @@ void NICPropertyProtocolCallback(void *pCookie,HKEY hBaseKey,TCHAR *tpszSubKey)
BOOL CALLBACK NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) BOOL CALLBACK NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLong(hwndDlg,GWL_USERDATA); PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
switch(uMsg) switch(uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
@ -272,7 +272,7 @@ BOOL CALLBACK NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg,IDC_CONFIGURE),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_CONFIGURE),FALSE);
SetWindowLong(hwndDlg,GWL_USERDATA,lParam); SetWindowLongPtr(hwndDlg,GWL_USERDATA,(DWORD_PTR)lParam);
//SetDlgItemTextA(hwndDlg,IDC_NETCARDNAME,Info[pPage->lParam].Description); //SetDlgItemTextA(hwndDlg,IDC_NETCARDNAME,Info[pPage->lParam].Description);
EnumRegKeys(NICPropertyProtocolCallback,hwndDlg,HKEY_LOCAL_MACHINE,_T("System\\CurrentControlSet\\Control\\Network\\{4D36E975-E325-11CE-BFC1-08002BE10318}")); EnumRegKeys(NICPropertyProtocolCallback,hwndDlg,HKEY_LOCAL_MACHINE,_T("System\\CurrentControlSet\\Control\\Network\\{4D36E975-E325-11CE-BFC1-08002BE10318}"));
@ -434,7 +434,7 @@ BOOL CALLBACK NICStatusPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
{ {
PROPSHEETPAGE *psp= (PROPSHEETPAGE *)lParam; PROPSHEETPAGE *psp= (PROPSHEETPAGE *)lParam;
EnableWindow(GetDlgItem(hwndDlg,IDC_ENDISABLE),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ENDISABLE),FALSE);
SetWindowLong(hwndDlg,DWL_USER,psp->lParam); SetWindowLongPtr(hwndDlg,DWL_USER,(DWORD_PTR)psp->lParam);
} }
break; break;
case WM_COMMAND: case WM_COMMAND:

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: tcpip_properties.c,v 1.1 2004/08/15 16:50:30 kuehng Exp $ /* $Id: tcpip_properties.c,v 1.2 2004/09/26 15:55:52 weiden Exp $
* *
* PROJECT: ReactOS Network Control Panel * PROJECT: ReactOS Network Control Panel
* FILE: lib/cpl/system/tcpip_properties.c * FILE: lib/cpl/system/tcpip_properties.c
@ -54,7 +54,7 @@ extern void InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc);
BOOL CALLBACK TCPIPPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) BOOL CALLBACK TCPIPPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLong(hwndDlg,GWL_USERDATA); PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA);
IP_ADAPTER_INFO *pInfo = NULL; IP_ADAPTER_INFO *pInfo = NULL;
if(pPage) if(pPage)
pInfo = (IP_ADAPTER_INFO *)pPage->lParam; pInfo = (IP_ADAPTER_INFO *)pPage->lParam;
@ -65,7 +65,7 @@ BOOL CALLBACK TCPIPPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
pPage = (PROPSHEETPAGE *)lParam; pPage = (PROPSHEETPAGE *)lParam;
pInfo = (IP_ADAPTER_INFO *)pPage->lParam; pInfo = (IP_ADAPTER_INFO *)pPage->lParam;
EnableWindow(GetDlgItem(hwndDlg,IDC_ADVANCED),FALSE); EnableWindow(GetDlgItem(hwndDlg,IDC_ADVANCED),FALSE);
SetWindowLong(hwndDlg,GWL_USERDATA,pPage->lParam); SetWindowLongPtr(hwndDlg,GWL_USERDATA,(DWORD_PTR)pPage->lParam);
if(pInfo->DhcpEnabled) { if(pInfo->DhcpEnabled) {
CheckDlgButton(hwndDlg,IDC_USEDHCP,BST_CHECKED); CheckDlgButton(hwndDlg,IDC_USEDHCP,BST_CHECKED);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: environment.c,v 1.3 2004/07/07 09:42:58 ekohl Exp $ /* $Id: environment.c,v 1.4 2004/09/26 15:55:53 weiden Exp $
* *
* PROJECT: ReactOS System Control Panel * PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/sysdm/environment.c * FILE: lib/cpl/sysdm/environment.c
@ -52,12 +52,12 @@ EditVariableDlgProc(HWND hwndDlg,
DWORD dwNameLength; DWORD dwNameLength;
DWORD dwValueLength; DWORD dwValueLength;
VarData = (PVARIABLE_DATA)GetWindowLong(hwndDlg, GWL_USERDATA); VarData = (PVARIABLE_DATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
switch (uMsg) switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam); SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)lParam);
VarData = (PVARIABLE_DATA)lParam; VarData = (PVARIABLE_DATA)lParam;
if (VarData->lpName != NULL) if (VarData->lpName != NULL)

View file

@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* $Id: libskygi.c,v 1.11 2004/08/14 10:47:19 weiden Exp $ /* $Id: libskygi.c,v 1.12 2004/09/26 15:55:53 weiden Exp $
* *
* PROJECT: SkyOS GI library * PROJECT: SkyOS GI library
* FILE: lib/libskygi/libskygi.c * FILE: lib/libskygi/libskygi.c
@ -481,7 +481,7 @@ GI_wait_message(s_gi_msg *m,
/* loop until we found a message that a sky app would handle, too */ /* loop until we found a message that a sky app would handle, too */
RtlZeroMemory(m, sizeof(s_gi_msg)); RtlZeroMemory(m, sizeof(s_gi_msg));
if(Msg.hwnd != NULL && (msgwnd = (PSKY_WINDOW)GetWindowLongW(Msg.hwnd, GWL_USERDATA))) if(Msg.hwnd != NULL && (msgwnd = (PSKY_WINDOW)GetWindowLongPtrW(Msg.hwnd, GWL_USERDATA)))
{ {
SkyMessage = IntIsSkyMessage(msgwnd, &Msg, m); SkyMessage = IntIsSkyMessage(msgwnd, &Msg, m);
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: wizard.c,v 1.7 2004/09/24 18:51:52 ekohl Exp $ /* $Id: wizard.c,v 1.8 2004/09/26 15:55:53 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -364,7 +364,7 @@ LocalePageDlgProc(HWND hwndDlg,
PSETUPDATA SetupData; PSETUPDATA SetupData;
/* Retrieve pointer to the global setup data */ /* Retrieve pointer to the global setup data */
SetupData = (PSETUPDATA)GetWindowLong (hwndDlg, GWL_USERDATA); SetupData = (PSETUPDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA);
switch (uMsg) switch (uMsg)
{ {
@ -372,7 +372,7 @@ LocalePageDlgProc(HWND hwndDlg,
{ {
/* Save pointer to the global setup data */ /* Save pointer to the global setup data */
SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam; SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)SetupData); SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)SetupData);
} }
break; break;
@ -415,7 +415,7 @@ ProcessPageDlgProc(HWND hwndDlg,
PSETUPDATA SetupData; PSETUPDATA SetupData;
/* Retrieve pointer to the global setup data */ /* Retrieve pointer to the global setup data */
SetupData = (PSETUPDATA)GetWindowLong (hwndDlg, GWL_USERDATA); SetupData = (PSETUPDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA);
switch (uMsg) switch (uMsg)
{ {
@ -423,7 +423,7 @@ ProcessPageDlgProc(HWND hwndDlg,
{ {
/* Save pointer to the global setup data */ /* Save pointer to the global setup data */
SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam; SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)SetupData); SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)SetupData);
} }
break; break;

View file

@ -1,4 +1,4 @@
/* $Id: guiconsole.c,v 1.20 2004/09/10 22:14:52 gvg Exp $ /* $Id: guiconsole.c,v 1.21 2004/09/26 15:55:53 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -53,7 +53,7 @@ static HWND NotifyWnd;
static VOID FASTCALL static VOID FASTCALL
GuiConsoleGetDataPointers(HWND hWnd, PCSRSS_CONSOLE *Console, PGUI_CONSOLE_DATA *GuiData) GuiConsoleGetDataPointers(HWND hWnd, PCSRSS_CONSOLE *Console, PGUI_CONSOLE_DATA *GuiData)
{ {
*Console = (PCSRSS_CONSOLE) GetWindowLongW(hWnd, GWL_USERDATA); *Console = (PCSRSS_CONSOLE) GetWindowLongPtrW(hWnd, GWL_USERDATA);
*GuiData = (NULL == *Console ? NULL : (*Console)->PrivateData); *GuiData = (NULL == *Console ? NULL : (*Console)->PrivateData);
} }
@ -140,7 +140,7 @@ GuiConsoleHandleNcCreate(HWND hWnd, CREATESTRUCTW *Create)
GuiData->Selection.left = -1; GuiData->Selection.left = -1;
Console->PrivateData = GuiData; Console->PrivateData = GuiData;
SetWindowLongW(hWnd, GWL_USERDATA, (LONG) Console); SetWindowLongPtrW(hWnd, GWL_USERDATA, (DWORD_PTR) Console);
GetWindowRect(hWnd, &Rect); GetWindowRect(hWnd, &Rect);
Rect.right = Rect.left + Console->Size.X * GuiData->CharWidth + Rect.right = Rect.left + Console->Size.X * GuiData->CharWidth +

View file

@ -231,7 +231,7 @@ LRESULT CALLBACK DwordEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPAR
{ {
WNDPROC oldwndproc; WNDPROC oldwndproc;
oldwndproc = (WNDPROC)GetWindowLong(hwnd, GWL_USERDATA); oldwndproc = (WNDPROC)GetWindowLongPtr(hwnd, GWL_USERDATA);
switch (uMsg) switch (uMsg)
{ {
@ -285,9 +285,9 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
/* subclass the edit control */ /* subclass the edit control */
hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA); hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA);
oldproc = (WNDPROC)GetWindowLong(hwndValue, GWL_WNDPROC); oldproc = (WNDPROC)GetWindowLongPtr(hwndValue, GWL_WNDPROC);
SetWindowLong(hwndValue, GWL_USERDATA, (LONG)oldproc); SetWindowLongPtr(hwndValue, GWL_USERDATA, (DWORD_PTR)oldproc);
SetWindowLong(hwndValue, GWL_WNDPROC, (LONG)DwordEditSubclassProc); SetWindowLongPtr(hwndValue, GWL_WNDPROC, (DWORD_PTR)DwordEditSubclassProc);
if(editValueName && _tcscmp(editValueName, _T(""))) if(editValueName && _tcscmp(editValueName, _T("")))
{ {

View file

@ -502,7 +502,7 @@ HEXEDIT_WM_NCCREATE(HWND hWnd, CREATESTRUCT *cs)
hed->SplitSpacing = 2; hed->SplitSpacing = 2;
hed->EditingField = TRUE; /* in hexdump field */ hed->EditingField = TRUE; /* in hexdump field */
SetWindowLong(hWnd, 0, (LONG)hed); SetWindowLongPtr(hWnd, 0, (DWORD_PTR)hed);
HEXEDIT_Update(hed); HEXEDIT_Update(hed);
return TRUE; return TRUE;
@ -522,7 +522,7 @@ HEXEDIT_WM_NCDESTROY(PHEXEDIT_DATA hed)
DeleteObject(hed->hFont); DeleteObject(hed->hFont);
} }
SetWindowLong(hed->hWndSelf, 0, 0); SetWindowLongPtr(hed->hWndSelf, 0, (DWORD_PTR)0);
HeapFree(GetProcessHeap(), 0, hed); HeapFree(GetProcessHeap(), 0, hed);
return 0; return 0;
@ -864,7 +864,7 @@ HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
PHEXEDIT_DATA hed; PHEXEDIT_DATA hed;
hed = (PHEXEDIT_DATA)GetWindowLong(hWnd, 0); hed = (PHEXEDIT_DATA)GetWindowLongPtr(hWnd, (DWORD_PTR)0);
switch(uMsg) switch(uMsg)
{ {
case WM_ERASEBKGND: case WM_ERASEBKGND:

View file

@ -198,10 +198,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam,
/* /*
* Subclass graph buttons * Subclass graph buttons
*/ */
OldGraphWndProc = SetWindowLong(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (LONG)Graph_WndProc); OldGraphWndProc = SetWindowLongPtr(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (DWORD_PTR)Graph_WndProc);
SetWindowLong(hPerformancePageMemUsageGraph, GWL_WNDPROC, (LONG)Graph_WndProc); SetWindowLongPtr(hPerformancePageMemUsageGraph, GWL_WNDPROC, (DWORD_PTR)Graph_WndProc);
OldGraphCtrlWndProc = SetWindowLong(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc); OldGraphCtrlWndProc = SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC, (DWORD_PTR)GraphCtrl_WndProc);
SetWindowLong(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc); SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC, (DWORD_PTR)GraphCtrl_WndProc);
return TRUE; return TRUE;
case WM_COMMAND: case WM_COMMAND:

View file

@ -36,7 +36,7 @@
LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
LONG OldProcessListWndProc; WNDPROC OldProcessListWndProc;
LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)

View file

@ -25,6 +25,6 @@
LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
extern LONG OldProcessListWndProc; extern WNDPROC OldProcessListWndProc;
#endif /* __PROCLIST_H */ #endif /* __PROCLIST_H */

View file

@ -92,7 +92,7 @@ LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
/* /*
* Subclass the process list control so we can intercept WM_ERASEBKGND * Subclass the process list control so we can intercept WM_ERASEBKGND
*/ */
OldProcessListWndProc = SetWindowLong(hProcessPageListCtrl, GWL_WNDPROC, (LONG)ProcessListWndProc); OldProcessListWndProc = (WNDPROC)SetWindowLongPtr(hProcessPageListCtrl, GWL_WNDPROC, (DWORD_PTR)ProcessListWndProc);
/* Start our refresh thread */ /* Start our refresh thread */
CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL); CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL);

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.5 2003/12/21 14:38:25 ekohl Exp $ # $Id: Makefile,v 1.6 2004/09/26 15:55:53 weiden Exp $
PATH_TO_TOP = ../../.. PATH_TO_TOP = ../../..
@ -10,7 +10,7 @@ TARGET_NAME = welcome
TARGET_INSTALLDIR = system32 TARGET_INSTALLDIR = system32
TARGET_CFLAGS = -Wall -Werror TARGET_CFLAGS = -Wall -Werror -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -D__USE_W32API
TARGET_SDKLIBS = kernel32.a gdi32.a user32.a TARGET_SDKLIBS = kernel32.a gdi32.a user32.a

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: welcome.c,v 1.5 2003/12/21 16:24:19 weiden Exp $ /* $Id: welcome.c,v 1.6 2004/09/26 15:55:53 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS welcome/autorun application * PROJECT: ReactOS welcome/autorun application
@ -278,7 +278,7 @@ RunApplication(int nTopic)
static VOID static VOID
SubclassButton(HWND hWnd) SubclassButton(HWND hWnd)
{ {
fnOldBtn = (WNDPROC)SetWindowLong(hWnd, GWL_WNDPROC, (LPARAM)ButtonSubclassWndProc); fnOldBtn = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC, (DWORD_PTR)ButtonSubclassWndProc);
} }

View file

@ -1,4 +1,4 @@
/* $Id: sas.c,v 1.2 2004/07/12 20:09:35 gvg Exp $ /* $Id: sas.c,v 1.3 2004/09/26 15:55:53 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -158,7 +158,7 @@ HandleExitWindows(DWORD RequestingProcessId, UINT Flags)
LRESULT CALLBACK LRESULT CALLBACK
SASProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) SASProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
PWLSESSION Session = (PWLSESSION)GetWindowLong(hwnd, GWL_USERDATA); PWLSESSION Session = (PWLSESSION)GetWindowLongPtr(hwnd, GWL_USERDATA);
if(!Session) if(!Session)
{ {
return DefWindowProc(hwnd, uMsg, wParam, lParam); return DefWindowProc(hwnd, uMsg, wParam, lParam);
@ -231,7 +231,7 @@ InitializeSAS(PWLSESSION Session)
} }
/* Save the Session pointer so the window proc can access it */ /* Save the Session pointer so the window proc can access it */
SetWindowLong(Session->SASWindow, GWL_USERDATA, (LONG)Session); SetWindowLongPtr(Session->SASWindow, GWL_USERDATA, (DWORD_PTR)Session);
/* Register SAS window to receive SAS notifications */ /* Register SAS window to receive SAS notifications */
if(!SetLogonNotifyWindow(Session->SASWindow, Session->InteractiveWindowStation)) if(!SetLogonNotifyWindow(Session->SASWindow, Session->InteractiveWindowStation))