Hello! License: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@redhat.com> - Convert HRSRC to a void* bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 System Administration Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani@redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
Index: dlls/commdlg/colordlg.c =================================================================== RCS file: /home/wine/wine/dlls/commdlg/colordlg.c,v retrieving revision 1.34 diff -u -r1.34 colordlg.c --- dlls/commdlg/colordlg.c 6 Sep 2002 20:40:42 -0000 1.34 +++ dlls/commdlg/colordlg.c 13 Sep 2002 22:22:05 -0000 @@ -1403,7 +1403,8 @@ } else { - HANDLE hResInfo, hDlgTmpl32; + HRSRC hResInfo; + HGLOBAL hDlgTmpl32; LPCVOID template32; DWORD size; if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, "CHOOSE_COLOR", RT_DIALOGA))) @@ -1454,9 +1455,7 @@ * ChooseColorW (COMDLG32.@) */ BOOL WINAPI ChooseColorW( LPCHOOSECOLORW lpChCol ) - { - HANDLE hDlgTmpl = 0; BOOL bRet = FALSE; LPCVOID template; @@ -1474,7 +1473,7 @@ } else if (lpChCol->Flags & CC_ENABLETEMPLATE) { - HANDLE hResInfo; + HRSRC hResInfo; if (!(hResInfo = FindResourceW(lpChCol->hInstance, lpChCol->lpTemplateName, RT_DIALOGW))) @@ -1491,7 +1490,8 @@ } else { - HANDLE hResInfo, hDlgTmpl; + HRSRC hResInfo; + HGLOBAL hDlgTmpl; if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, "CHOOSE_COLOR", RT_DIALOGA))) { COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE); Index: dlls/commdlg/filedlg.c =================================================================== RCS file: /home/wine/wine/dlls/commdlg/filedlg.c,v retrieving revision 1.52 diff -u -r1.52 filedlg.c --- dlls/commdlg/filedlg.c 6 Sep 2002 20:40:42 -0000 1.52 +++ dlls/commdlg/filedlg.c 13 Sep 2002 22:22:06 -0000 @@ -151,7 +151,7 @@ } else if (ofnW->Flags & OFN_ENABLETEMPLATE) { - HANDLE hResInfo; + HRSRC hResInfo; if (lfs->ofnA) hResInfo = FindResourceA(lfs->ofnA->hInstance, lfs->ofnA->lpTemplateName, @@ -173,7 +173,7 @@ return FALSE; } } else { /* get it from internal Wine resource */ - HANDLE hResInfo; + HRSRC hResInfo; if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, lfs->open? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA))) { @@ -225,7 +225,8 @@ } else { /* get resource from (32 bits) own Wine resource; convert it to 16 */ - HANDLE hResInfo, hDlgTmpl32; + HRSRC hResInfo; + HGLOBAL hDlgTmpl32; LPCVOID template32; DWORD size; Index: dlls/commdlg/finddlg.c =================================================================== RCS file: /home/wine/wine/dlls/commdlg/finddlg.c,v retrieving revision 1.22 diff -u -r1.22 finddlg.c --- dlls/commdlg/finddlg.c 6 Sep 2002 20:40:42 -0000 1.22 +++ dlls/commdlg/finddlg.c 13 Sep 2002 22:22:06 -0000 @@ -96,7 +96,8 @@ } else { /* get resource from (32 bits) own Wine resource; convert it to 16 */ - HANDLE hResInfo, hDlgTmpl32; + HRSRC hResInfo; + HGLOBAL hDlgTmpl32; LPCVOID template32; DWORD size; HGLOBAL16 hGlobal16; Index: dlls/commdlg/fontdlg.c =================================================================== RCS file: /home/wine/wine/dlls/commdlg/fontdlg.c,v retrieving revision 1.40 diff -u -r1.40 fontdlg.c --- dlls/commdlg/fontdlg.c 6 Sep 2002 20:40:42 -0000 1.40 +++ dlls/commdlg/fontdlg.c 13 Sep 2002 22:22:06 -0000 @@ -183,7 +183,8 @@ } else { - HANDLE hResInfo, hDlgTmpl32; + HRSRC hResInfo; + HGLOBAL hDlgTmpl32; LPCVOID template32; DWORD size; if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, "CHOOSE_FONT", RT_DIALOGA))) @@ -260,7 +261,8 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont) { LPCVOID template; - HANDLE hResInfo, hDlgTmpl; + HRSRC hResInfo; + HGLOBAL hDlgTmpl; if (!(hResInfo = FindResourceA(COMMDLG_hInstance32, "CHOOSE_FONT", RT_DIALOGA))) { Index: dlls/commdlg/printdlg.c =================================================================== RCS file: /home/wine/wine/dlls/commdlg/printdlg.c,v retrieving revision 1.54 diff -u -r1.54 printdlg.c --- dlls/commdlg/printdlg.c 6 Sep 2002 20:40:42 -0000 1.54 +++ dlls/commdlg/printdlg.c 13 Sep 2002 22:22:07 -0000 @@ -2096,7 +2096,8 @@ */ static HGLOBAL16 PRINTDLG_Get16TemplateFrom32(char *PrintResourceName) { - HANDLE hResInfo, hDlgTmpl32; + HRSRC hResInfo; + HGLOBAL hDlgTmpl32; LPCVOID template32; DWORD size; HGLOBAL16 hGlobal16; @@ -2142,7 +2143,8 @@ */ static HGLOBAL PRINTDLG_GetDlgTemplateA(PRINTDLGA *lppd) { - HGLOBAL hDlgTmpl, hResInfo; + HRSRC hResInfo; + HGLOBAL hDlgTmpl; if (lppd->Flags & PD_PRINTSETUP) { if(lppd->Flags & PD_ENABLESETUPTEMPLATEHANDLE) { @@ -2175,7 +2177,8 @@ static HGLOBAL PRINTDLG_GetDlgTemplateW(PRINTDLGW *lppd) { - HGLOBAL hDlgTmpl, hResInfo; + HRSRC hResInfo; + HGLOBAL hDlgTmpl; const WCHAR xpsetup[] = { 'P','R','I','N','T','3','2','_','S','E','T','U','P',0}; const WCHAR xprint[] = { 'P','R','I','N','T','3','2',0}; @@ -2846,7 +2849,8 @@ static HGLOBAL PRINTDLG_GetPGSTemplateA(PAGESETUPDLGA *lppd) { - HGLOBAL hDlgTmpl, hResInfo; + HRSRC hResInfo; + HGLOBAL hDlgTmpl; if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATEHANDLE) { hDlgTmpl = lppd->hPageSetupTemplate; @@ -2863,7 +2867,8 @@ static HGLOBAL PRINTDLG_GetPGSTemplateW(PAGESETUPDLGW *lppd) { - HGLOBAL hDlgTmpl, hResInfo; + HRSRC hResInfo; + HGLOBAL hDlgTmpl; if(lppd->Flags & PSD_ENABLEPAGESETUPTEMPLATEHANDLE) { hDlgTmpl = lppd->hPageSetupTemplate; Index: dlls/setupapi/virtcopy.c =================================================================== RCS file: /home/wine/wine/dlls/setupapi/virtcopy.c,v retrieving revision 1.12 diff -u -r1.12 virtcopy.c --- dlls/setupapi/virtcopy.c 20 Jul 2002 18:54:51 -0000 1.12 +++ dlls/setupapi/virtcopy.c 13 Sep 2002 22:22:08 -0000 @@ -594,7 +594,8 @@ BOOL VCP_UI_GetDialogTemplate(LPCVOID *template32) { - HANDLE hResInfo, hDlgTmpl32; + HRSRC hResInfo; + HGLOBAL hDlgTmpl32; if (!(hResInfo = FindResourceA(SETUPAPI_hInstance, MAKEINTRESOURCEA(COPYFILEDLGORD), RT_DIALOGA))) return FALSE; Index: include/windef.h =================================================================== RCS file: /home/wine/wine/include/windef.h,v retrieving revision 1.73 diff -u -r1.73 windef.h --- include/windef.h 12 Sep 2002 20:43:24 -0000 1.73 +++ include/windef.h 13 Sep 2002 22:22:09 -0000 @@ -90,7 +90,7 @@ DECLARE_HANDLE(HPALETTE); DECLARE_OLD_HANDLE(HPEN); DECLARE_OLD_HANDLE(HRGN); -DECLARE_OLD_HANDLE(HRSRC); +DECLARE_HANDLE(HRSRC); DECLARE_HANDLE(HTASK); DECLARE_HANDLE(HWINEVENTHOOK); DECLARE_HANDLE(HWINSTA); Index: loader/resource.c =================================================================== RCS file: /home/wine/wine/loader/resource.c,v retrieving revision 1.61 diff -u -r1.61 resource.c --- loader/resource.c 28 Aug 2002 23:42:35 -0000 1.61 +++ loader/resource.c 13 Sep 2002 22:22:09 -0000 @@ -48,10 +48,13 @@ #define HRSRC_MAP_BLOCKSIZE 16 +/* handle conversions */ +#define HRSRC_32(h16) ((HRSRC)(ULONG_PTR)(h16)) + typedef struct _HRSRC_ELEM { - HANDLE hRsrc; - WORD type; + HRSRC hRsrc; + WORD type; } HRSRC_ELEM; typedef struct _HRSRC_MAP @@ -64,7 +67,7 @@ /********************************************************************** * MapHRsrc32To16 */ -static HRSRC MapHRsrc32To16( NE_MODULE *pModule, HANDLE hRsrc32, WORD type ) +static HRSRC MapHRsrc32To16( NE_MODULE *pModule, HRSRC hRsrc32, WORD type ) { HRSRC_MAP *map = (HRSRC_MAP *)pModule->hRsrcMap; HRSRC_ELEM *newElem; @@ -385,7 +388,7 @@ */ HGLOBAL16 WINAPI LoadResource16( HMODULE16 hModule, HRSRC16 hRsrc ) { - return RES_LoadResource( hModule, hRsrc, TRUE ); + return RES_LoadResource( hModule, HRSRC_32(hRsrc), TRUE ); } /********************************************************************** @@ -477,7 +480,7 @@ */ DWORD WINAPI SizeofResource16( HMODULE16 hModule, HRSRC16 hRsrc ) { - return RES_SizeofResource( hModule, hRsrc, TRUE ); + return RES_SizeofResource( hModule, HRSRC_32(hRsrc), TRUE ); } /********************************************************************** Index: windows/cursoricon.c =================================================================== RCS file: /home/wine/wine/windows/cursoricon.c,v retrieving revision 1.50 diff -u -r1.50 cursoricon.c --- windows/cursoricon.c 28 Aug 2002 22:35:23 -0000 1.50 +++ windows/cursoricon.c 13 Sep 2002 22:22:10 -0000 @@ -735,7 +735,7 @@ BOOL fCursor, UINT loadflags ) { HANDLE handle = 0, h = 0; - HANDLE hRsrc; + HRSRC hRsrc; CURSORICONDIR *dir; CURSORICONDIRENTRY *dirEntry; LPBYTE bits; @@ -757,7 +757,7 @@ } else /* Load from resource */ { - HANDLE hGroupRsrc; + HRSRC hGroupRsrc; WORD wResId; DWORD dwBytesInRes; Index: windows/dialog.c =================================================================== RCS file: /home/wine/wine/windows/dialog.c,v retrieving revision 1.104 diff -u -r1.104 dialog.c --- windows/dialog.c 4 Sep 2002 19:37:02 -0000 1.104 +++ windows/dialog.c 13 Sep 2002 22:22:11 -0000 @@ -931,7 +931,7 @@ HWND owner, DLGPROC dlgProc, LPARAM param ) { - HANDLE hrsrc = FindResourceA( hInst, name, RT_DIALOGA ); + HRSRC hrsrc = FindResourceA( hInst, name, RT_DIALOGA ); if (!hrsrc) return 0; return CreateDialogIndirectParamA( hInst, (LPVOID)LoadResource(hInst, hrsrc), @@ -946,7 +946,7 @@ HWND owner, DLGPROC dlgProc, LPARAM param ) { - HANDLE hrsrc = FindResourceW( hInst, name, RT_DIALOGW ); + HRSRC hrsrc = FindResourceW( hInst, name, RT_DIALOGW ); if (!hrsrc) return 0; return CreateDialogIndirectParamW( hInst, (LPVOID)LoadResource(hInst, hrsrc), @@ -1100,7 +1100,7 @@ HWND owner, DLGPROC dlgProc, LPARAM param ) { HWND hwnd; - HANDLE hrsrc = FindResourceA( hInst, name, RT_DIALOGA ); + HRSRC hrsrc = FindResourceA( hInst, name, RT_DIALOGA ); if (!hrsrc) return 0; hwnd = DIALOG_CreateIndirect( hInst, (LPVOID)LoadResource(hInst, hrsrc), owner, dlgProc, param, WIN_PROC_32A, TRUE ); @@ -1116,7 +1116,7 @@ HWND owner, DLGPROC dlgProc, LPARAM param ) { HWND hwnd; - HANDLE hrsrc = FindResourceW( hInst, name, RT_DIALOGW ); + HRSRC hrsrc = FindResourceW( hInst, name, RT_DIALOGW ); if (!hrsrc) return 0; hwnd = DIALOG_CreateIndirect( hInst, (LPVOID)LoadResource(hInst, hrsrc), owner, dlgProc, param, WIN_PROC_32W, TRUE );
Attachment:
pgp00048.pgp
Description: PGP signature