From cc0fabacd18f822c9d7e8886a40c5a23e024c78b Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sun, 26 Sep 2004 15:55:53 +0000 Subject: [PATCH] use Get/SetWindowLongPtr() where appropriate in favor of 64bit compatibility svn path=/trunk/; revision=11073 --- reactos/include/funcs.h | 2 ++ reactos/lib/aclui/aclui.c | 4 ++-- reactos/lib/cpl/ncpa/ncpa.c | 8 ++++---- reactos/lib/cpl/ncpa/tcpip_properties.c | 6 +++--- reactos/lib/cpl/sysdm/environment.c | 6 +++--- reactos/lib/rosky/libskygi/libskygi.c | 4 ++-- reactos/lib/syssetup/wizard.c | 10 +++++----- reactos/subsys/csrss/win32csr/guiconsole.c | 6 +++--- reactos/subsys/system/regedit/edit.c | 8 ++++---- reactos/subsys/system/regedit/hexedit.c | 6 +++--- reactos/subsys/system/taskmgr/perfpage.c | 8 ++++---- reactos/subsys/system/taskmgr/proclist.c | 2 +- reactos/subsys/system/taskmgr/proclist.h | 2 +- reactos/subsys/system/taskmgr/procpage.c | 2 +- reactos/subsys/system/welcome/Makefile | 4 ++-- reactos/subsys/system/welcome/welcome.c | 4 ++-- reactos/subsys/system/winlogon/sas.c | 6 +++--- 17 files changed, 45 insertions(+), 43 deletions(-) diff --git a/reactos/include/funcs.h b/reactos/include/funcs.h index 9b8806dd07a..0c9bf610b54 100644 --- a/reactos/include/funcs.h +++ b/reactos/include/funcs.h @@ -107,6 +107,8 @@ typedef PPROGRESS_ROUTINE LPPROGRESS_ROUTINE; #define MessageBoxIndirect MessageBoxIndirectW #define GetWindowLong GetWindowLongW #define SetWindowLong SetWindowLongW +#define GetWindowLongPtr GetWindowLongW +#define SetWindowLongPtr SetWindowLongW #define GetClassLong GetClassLongW #define SetClassLong SetClassLongW #define FindWindow FindWindowW diff --git a/reactos/lib/aclui/aclui.c b/reactos/lib/aclui/aclui.c index 798a6f7582c..fdd7ed60c60 100644 --- a/reactos/lib/aclui/aclui.c +++ b/reactos/lib/aclui/aclui.c @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * 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 * 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); /* save the pointer to the structure */ - SetWindowLong(hwndDlg, DWL_USER, (LONG)sp); + SetWindowLongPtr(hwndDlg, DWL_USER, (DWORD_PTR)sp); GetClientRect(sp->hWndUsrList, &rcLvClient); diff --git a/reactos/lib/cpl/ncpa/ncpa.c b/reactos/lib/cpl/ncpa/ncpa.c index b253448676e..a4bca682787 100644 --- a/reactos/lib/cpl/ncpa/ncpa.c +++ b/reactos/lib/cpl/ncpa/ncpa.c @@ -15,7 +15,7 @@ * License along with this library; if not, write to the Free Software * 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 * 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) { - PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLong(hwndDlg,GWL_USERDATA); + PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA); switch(uMsg) { case WM_INITDIALOG: @@ -272,7 +272,7 @@ BOOL CALLBACK NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM 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); 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; EnableWindow(GetDlgItem(hwndDlg,IDC_ENDISABLE),FALSE); - SetWindowLong(hwndDlg,DWL_USER,psp->lParam); + SetWindowLongPtr(hwndDlg,DWL_USER,(DWORD_PTR)psp->lParam); } break; case WM_COMMAND: diff --git a/reactos/lib/cpl/ncpa/tcpip_properties.c b/reactos/lib/cpl/ncpa/tcpip_properties.c index 2693ccc274d..842be2d9931 100644 --- a/reactos/lib/cpl/ncpa/tcpip_properties.c +++ b/reactos/lib/cpl/ncpa/tcpip_properties.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * 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 * 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) { - PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLong(hwndDlg,GWL_USERDATA); + PROPSHEETPAGE *pPage = (PROPSHEETPAGE *)GetWindowLongPtr(hwndDlg,GWL_USERDATA); IP_ADAPTER_INFO *pInfo = NULL; if(pPage) pInfo = (IP_ADAPTER_INFO *)pPage->lParam; @@ -65,7 +65,7 @@ BOOL CALLBACK TCPIPPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR pPage = (PROPSHEETPAGE *)lParam; pInfo = (IP_ADAPTER_INFO *)pPage->lParam; EnableWindow(GetDlgItem(hwndDlg,IDC_ADVANCED),FALSE); - SetWindowLong(hwndDlg,GWL_USERDATA,pPage->lParam); + SetWindowLongPtr(hwndDlg,GWL_USERDATA,(DWORD_PTR)pPage->lParam); if(pInfo->DhcpEnabled) { CheckDlgButton(hwndDlg,IDC_USEDHCP,BST_CHECKED); diff --git a/reactos/lib/cpl/sysdm/environment.c b/reactos/lib/cpl/sysdm/environment.c index fe0942b14eb..0f3aec227e5 100644 --- a/reactos/lib/cpl/sysdm/environment.c +++ b/reactos/lib/cpl/sysdm/environment.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * 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 * FILE: lib/cpl/sysdm/environment.c @@ -52,12 +52,12 @@ EditVariableDlgProc(HWND hwndDlg, DWORD dwNameLength; DWORD dwValueLength; - VarData = (PVARIABLE_DATA)GetWindowLong(hwndDlg, GWL_USERDATA); + VarData = (PVARIABLE_DATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); switch (uMsg) { case WM_INITDIALOG: - SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)lParam); + SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)lParam); VarData = (PVARIABLE_DATA)lParam; if (VarData->lpName != NULL) diff --git a/reactos/lib/rosky/libskygi/libskygi.c b/reactos/lib/rosky/libskygi/libskygi.c index 372a20f4f05..f4b0be38a36 100644 --- a/reactos/lib/rosky/libskygi/libskygi.c +++ b/reactos/lib/rosky/libskygi/libskygi.c @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free Software * 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 * 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 */ 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); } diff --git a/reactos/lib/syssetup/wizard.c b/reactos/lib/syssetup/wizard.c index e1db58ec063..9f44d73e4b7 100644 --- a/reactos/lib/syssetup/wizard.c +++ b/reactos/lib/syssetup/wizard.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * 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 * PROJECT: ReactOS system libraries @@ -364,7 +364,7 @@ LocalePageDlgProc(HWND hwndDlg, PSETUPDATA SetupData; /* Retrieve pointer to the global setup data */ - SetupData = (PSETUPDATA)GetWindowLong (hwndDlg, GWL_USERDATA); + SetupData = (PSETUPDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); switch (uMsg) { @@ -372,7 +372,7 @@ LocalePageDlgProc(HWND hwndDlg, { /* Save pointer to the global setup data */ SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam; - SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)SetupData); + SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)SetupData); } break; @@ -415,7 +415,7 @@ ProcessPageDlgProc(HWND hwndDlg, PSETUPDATA SetupData; /* Retrieve pointer to the global setup data */ - SetupData = (PSETUPDATA)GetWindowLong (hwndDlg, GWL_USERDATA); + SetupData = (PSETUPDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); switch (uMsg) { @@ -423,7 +423,7 @@ ProcessPageDlgProc(HWND hwndDlg, { /* Save pointer to the global setup data */ SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam; - SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)SetupData); + SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)SetupData); } break; diff --git a/reactos/subsys/csrss/win32csr/guiconsole.c b/reactos/subsys/csrss/win32csr/guiconsole.c index 99c51b4886b..4de20782305 100644 --- a/reactos/subsys/csrss/win32csr/guiconsole.c +++ b/reactos/subsys/csrss/win32csr/guiconsole.c @@ -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 * PROJECT: ReactOS system libraries @@ -53,7 +53,7 @@ static HWND NotifyWnd; static VOID FASTCALL 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); } @@ -140,7 +140,7 @@ GuiConsoleHandleNcCreate(HWND hWnd, CREATESTRUCTW *Create) GuiData->Selection.left = -1; Console->PrivateData = GuiData; - SetWindowLongW(hWnd, GWL_USERDATA, (LONG) Console); + SetWindowLongPtrW(hWnd, GWL_USERDATA, (DWORD_PTR) Console); GetWindowRect(hWnd, &Rect); Rect.right = Rect.left + Console->Size.X * GuiData->CharWidth + diff --git a/reactos/subsys/system/regedit/edit.c b/reactos/subsys/system/regedit/edit.c index ae38df61031..3d0ee6812c6 100644 --- a/reactos/subsys/system/regedit/edit.c +++ b/reactos/subsys/system/regedit/edit.c @@ -231,7 +231,7 @@ LRESULT CALLBACK DwordEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPAR { WNDPROC oldwndproc; - oldwndproc = (WNDPROC)GetWindowLong(hwnd, GWL_USERDATA); + oldwndproc = (WNDPROC)GetWindowLongPtr(hwnd, GWL_USERDATA); switch (uMsg) { @@ -285,9 +285,9 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP /* subclass the edit control */ hwndValue = GetDlgItem(hwndDlg, IDC_VALUE_DATA); - oldproc = (WNDPROC)GetWindowLong(hwndValue, GWL_WNDPROC); - SetWindowLong(hwndValue, GWL_USERDATA, (LONG)oldproc); - SetWindowLong(hwndValue, GWL_WNDPROC, (LONG)DwordEditSubclassProc); + oldproc = (WNDPROC)GetWindowLongPtr(hwndValue, GWL_WNDPROC); + SetWindowLongPtr(hwndValue, GWL_USERDATA, (DWORD_PTR)oldproc); + SetWindowLongPtr(hwndValue, GWL_WNDPROC, (DWORD_PTR)DwordEditSubclassProc); if(editValueName && _tcscmp(editValueName, _T(""))) { diff --git a/reactos/subsys/system/regedit/hexedit.c b/reactos/subsys/system/regedit/hexedit.c index edec6af814f..32e2ea8e05e 100644 --- a/reactos/subsys/system/regedit/hexedit.c +++ b/reactos/subsys/system/regedit/hexedit.c @@ -502,7 +502,7 @@ HEXEDIT_WM_NCCREATE(HWND hWnd, CREATESTRUCT *cs) hed->SplitSpacing = 2; hed->EditingField = TRUE; /* in hexdump field */ - SetWindowLong(hWnd, 0, (LONG)hed); + SetWindowLongPtr(hWnd, 0, (DWORD_PTR)hed); HEXEDIT_Update(hed); return TRUE; @@ -522,7 +522,7 @@ HEXEDIT_WM_NCDESTROY(PHEXEDIT_DATA hed) DeleteObject(hed->hFont); } - SetWindowLong(hed->hWndSelf, 0, 0); + SetWindowLongPtr(hed->hWndSelf, 0, (DWORD_PTR)0); HeapFree(GetProcessHeap(), 0, hed); return 0; @@ -864,7 +864,7 @@ HexEditWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { PHEXEDIT_DATA hed; - hed = (PHEXEDIT_DATA)GetWindowLong(hWnd, 0); + hed = (PHEXEDIT_DATA)GetWindowLongPtr(hWnd, (DWORD_PTR)0); switch(uMsg) { case WM_ERASEBKGND: diff --git a/reactos/subsys/system/taskmgr/perfpage.c b/reactos/subsys/system/taskmgr/perfpage.c index 41494406f56..f9836752155 100644 --- a/reactos/subsys/system/taskmgr/perfpage.c +++ b/reactos/subsys/system/taskmgr/perfpage.c @@ -198,10 +198,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, /* * Subclass graph buttons */ - OldGraphWndProc = SetWindowLong(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (LONG)Graph_WndProc); - SetWindowLong(hPerformancePageMemUsageGraph, GWL_WNDPROC, (LONG)Graph_WndProc); - OldGraphCtrlWndProc = SetWindowLong(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc); - SetWindowLong(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc); + OldGraphWndProc = SetWindowLongPtr(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (DWORD_PTR)Graph_WndProc); + SetWindowLongPtr(hPerformancePageMemUsageGraph, GWL_WNDPROC, (DWORD_PTR)Graph_WndProc); + OldGraphCtrlWndProc = SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC, (DWORD_PTR)GraphCtrl_WndProc); + SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC, (DWORD_PTR)GraphCtrl_WndProc); return TRUE; case WM_COMMAND: diff --git a/reactos/subsys/system/taskmgr/proclist.c b/reactos/subsys/system/taskmgr/proclist.c index ed8bc519459..de9f63c54eb 100644 --- a/reactos/subsys/system/taskmgr/proclist.c +++ b/reactos/subsys/system/taskmgr/proclist.c @@ -36,7 +36,7 @@ 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) diff --git a/reactos/subsys/system/taskmgr/proclist.h b/reactos/subsys/system/taskmgr/proclist.h index 577de1f67f8..f5e9d516182 100644 --- a/reactos/subsys/system/taskmgr/proclist.h +++ b/reactos/subsys/system/taskmgr/proclist.h @@ -25,6 +25,6 @@ LRESULT CALLBACK ProcessListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -extern LONG OldProcessListWndProc; +extern WNDPROC OldProcessListWndProc; #endif /* __PROCLIST_H */ diff --git a/reactos/subsys/system/taskmgr/procpage.c b/reactos/subsys/system/taskmgr/procpage.c index 9c99a95f134..3333dc7a079 100644 --- a/reactos/subsys/system/taskmgr/procpage.c +++ b/reactos/subsys/system/taskmgr/procpage.c @@ -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 */ - OldProcessListWndProc = SetWindowLong(hProcessPageListCtrl, GWL_WNDPROC, (LONG)ProcessListWndProc); + OldProcessListWndProc = (WNDPROC)SetWindowLongPtr(hProcessPageListCtrl, GWL_WNDPROC, (DWORD_PTR)ProcessListWndProc); /* Start our refresh thread */ CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL); diff --git a/reactos/subsys/system/welcome/Makefile b/reactos/subsys/system/welcome/Makefile index d72de560f5a..57918605cc1 100755 --- a/reactos/subsys/system/welcome/Makefile +++ b/reactos/subsys/system/welcome/Makefile @@ -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 = ../../.. @@ -10,7 +10,7 @@ TARGET_NAME = welcome 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 diff --git a/reactos/subsys/system/welcome/welcome.c b/reactos/subsys/system/welcome/welcome.c index 991ae85435e..fc5b90642c2 100755 --- a/reactos/subsys/system/welcome/welcome.c +++ b/reactos/subsys/system/welcome/welcome.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * 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 * PROJECT: ReactOS welcome/autorun application @@ -278,7 +278,7 @@ RunApplication(int nTopic) static VOID SubclassButton(HWND hWnd) { - fnOldBtn = (WNDPROC)SetWindowLong(hWnd, GWL_WNDPROC, (LPARAM)ButtonSubclassWndProc); + fnOldBtn = (WNDPROC)SetWindowLongPtr(hWnd, GWL_WNDPROC, (DWORD_PTR)ButtonSubclassWndProc); } diff --git a/reactos/subsys/system/winlogon/sas.c b/reactos/subsys/system/winlogon/sas.c index db26fecf1b9..a4bbca9be6d 100644 --- a/reactos/subsys/system/winlogon/sas.c +++ b/reactos/subsys/system/winlogon/sas.c @@ -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 * PROJECT: ReactOS kernel @@ -158,7 +158,7 @@ HandleExitWindows(DWORD RequestingProcessId, UINT Flags) LRESULT CALLBACK 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) { return DefWindowProc(hwnd, uMsg, wParam, lParam); @@ -231,7 +231,7 @@ InitializeSAS(PWLSESSION Session) } /* 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 */ if(!SetLogonNotifyWindow(Session->SASWindow, Session->InteractiveWindowStation))