Hello, On Fri, Jul 19, 2002 at 09:49:52PM +0200, Michael Stefaniuc wrote: > please disregard this patch, it has build problems in a "make clean" > enviroment. > An other problem is that WOWHandle32 and WOWHandle16 are needed in > loader/task.c, but I suspect I'm not allowed to import wow32 into the > ntdll? After looking at what WOWHandle16 is doing, I replaced it with LOWORD in loader/task.c (LOWORD is used a lot in that file). Please try attached patch, it builds now correctly. > On Fri, Jul 19, 2002 at 01:07:16AM +0200, Michael Stefaniuc wrote: > > this patch should close bug #502, but I have some questions (that's why > > wine-devel is CC'ed): > > - is it correct to use the HTASK_{16,32} macros or should I use > > WOWHandle{16,32}? The difference is that the macros include a type > > cast to the right handle. > > - GetAppCompatFlags() works internaly with a HTASK16. Can I move the > > implementation to GetAppCompatFlags16()? Would save a handle > > conversion in GetAppCompatFlags16(). > > > > I'll close the bug report after the patch get's accepted. > > License: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@redhat.com> - Convert HTASK to a void* - Fix HTASK_32 macro 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/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/Makefile.in,v retrieving revision 1.143 diff -u -r1.143 Makefile.in --- dlls/Makefile.in 2 Jul 2002 02:06:19 -0000 1.143 +++ dlls/Makefile.in 19 Jul 2002 22:05:31 -0000 @@ -843,7 +843,7 @@ winmm/winealsa: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT) winmm/winearts: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) winmm/wineoss: winmm.dll$(DLLEXT) user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) -winmm: user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) +winmm: user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) wow32.dll$(DLLEXT) winnls: kernel32.dll$(DLLEXT) winsock: user32.dll$(DLLEXT) kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT) winspool: advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) Index: dlls/winmm/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/winmm/Makefile.in,v retrieving revision 1.24 diff -u -r1.24 Makefile.in --- dlls/winmm/Makefile.in 17 May 2002 03:37:15 -0000 1.24 +++ dlls/winmm/Makefile.in 19 Jul 2002 22:05:32 -0000 @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = winmm.dll -IMPORTS = user32 advapi32 kernel32 +IMPORTS = user32 advapi32 kernel32 wow32 ALTNAMES = mmsystem.dll sound.dll LDDLLFLAGS = @LDDLLFLAGS@ Index: dlls/winmm/mmsystem.c =================================================================== RCS file: /home/wine/wine/dlls/winmm/mmsystem.c,v retrieving revision 1.61 diff -u -r1.61 mmsystem.c --- dlls/winmm/mmsystem.c 8 Jul 2002 19:35:08 -0000 1.61 +++ dlls/winmm/mmsystem.c 19 Jul 2002 22:05:34 -0000 @@ -43,6 +43,7 @@ #include "heap.h" #include "ntddk.h" #include "winemm.h" +#include "wownt32.h" #include "wine/debug.h" @@ -1969,7 +1970,7 @@ */ HTASK16 WINAPI mciGetCreatorTask16(UINT16 uDeviceID) { - return mciGetCreatorTask(uDeviceID); + return HTASK_16(mciGetCreatorTask(uDeviceID)); } /************************************************************************** @@ -1982,7 +1983,7 @@ TRACE("(%u)\n", uDeviceID); - ret = (!(wmd = MCI_GetDriver(uDeviceID))) ? 0 : wmd->hCreatorTask; + ret = (!(wmd = MCI_GetDriver(uDeviceID))) ? 0 : HTASK_32(wmd->hCreatorTask); TRACE("=> %04x\n", ret); return ret; Index: include/windef.h =================================================================== RCS file: /home/wine/wine/include/windef.h,v retrieving revision 1.65 diff -u -r1.65 windef.h --- include/windef.h 19 Jul 2002 00:28:13 -0000 1.65 +++ include/windef.h 19 Jul 2002 22:05:34 -0000 @@ -91,7 +91,7 @@ DECLARE_OLD_HANDLE(HPEN); DECLARE_OLD_HANDLE(HRGN); DECLARE_OLD_HANDLE(HRSRC); -DECLARE_OLD_HANDLE(HTASK); +DECLARE_HANDLE(HTASK); DECLARE_HANDLE(HWINEVENTHOOK); DECLARE_HANDLE(HWINSTA); DECLARE_OLD_HANDLE(HWND); Index: include/wownt32.h =================================================================== RCS file: /home/wine/wine/include/wownt32.h,v retrieving revision 1.4 diff -u -r1.4 wownt32.h --- include/wownt32.h 31 May 2002 23:06:49 -0000 1.4 +++ include/wownt32.h 19 Jul 2002 22:05:34 -0000 @@ -72,7 +72,7 @@ #define HPALETTE_32(h16) ((HPALETTE) (WOWHandle32(h16, WOW_TYPE_HPALETTE))) #define HPEN_32(h16) ((HPEN) (WOWHandle32(h16, WOW_TYPE_HPEN))) #define HACCEL_32(h16) ((HACCEL) (WOWHandle32(h16, WOW_TYPE_HACCEL))) -#define HTASK_32(h16) ((DWORD) (WOWHandle32(h16, WOW_TYPE_HTASK))) +#define HTASK_32(h16) ((HTASK) (WOWHandle32(h16, WOW_TYPE_HTASK))) #define FULLHWND_32(h16) ((HWND) (WOWHandle32(h16, WOW_TYPE_FULLHWND))) #define HWND_16(h32) (WOWHandle16(h32, WOW_TYPE_HWND)) Index: loader/task.c =================================================================== RCS file: /home/wine/wine/loader/task.c,v retrieving revision 1.119 diff -u -r1.119 task.c --- loader/task.c 31 May 2002 23:06:51 -0000 1.119 +++ loader/task.c 19 Jul 2002 22:05:35 -0000 @@ -1577,7 +1577,12 @@ */ DWORD WINAPI GetAppCompatFlags16( HTASK16 hTask ) { - return GetAppCompatFlags( hTask ); + TDB *pTask; + + if (!hTask) hTask = GetCurrentTask(); + if (!(pTask=TASK_GetPtr(hTask))) return 0; + if (GlobalSize16(hTask) < sizeof(TDB)) return 0; + return pTask->compat_flags; } @@ -1586,10 +1591,5 @@ */ DWORD WINAPI GetAppCompatFlags( HTASK hTask ) { - TDB *pTask; - - if (!hTask) hTask = GetCurrentTask(); - if (!(pTask=TASK_GetPtr( (HTASK16)hTask ))) return 0; - if (GlobalSize16(hTask) < sizeof(TDB)) return 0; - return pTask->compat_flags; + return GetAppCompatFlags16( LOWORD(hTask) ); }
Attachment:
pgp00013.pgp
Description: PGP signature