Hello everybody,
Finale expects mmsystem to be present without having to call LoadLibrary on it. It does a GetModuleHandle on mmsystem.dll to find out if the mm extensions are available. I checked out windows 95, and it has mmsystem and winmm loaded when no apps are runing besides the desktop / explorer. This patch links wine with winmm andmakes winmm load mmsystem on init. Finale gets by this ok now. I don't know if this the correct approach, though. Could someone (Eric or Alexandre?) please take a look at it before I send it to wine-patches?
TIA,
Josh Thielen
Index: wine/miscemu/wine.spec =================================================================== RCS file: /home/wine/wine/miscemu/wine.spec,v retrieving revision 1.3 diff -u -r1.3 wine.spec --- wine/miscemu/wine.spec 2000/12/15 03:38:11 1.3 +++ wine/miscemu/wine.spec 2001/11/23 19:11:47 @@ -4,3 +4,4 @@ init wine_initial_task
import ntdll.dll +import winmm.dll Index: wine/dlls/winmm/mmsystem.c =================================================================== RCS file: /home/wine/wine/dlls/winmm/mmsystem.c,v retrieving revision 1.46 diff -u -r1.46 mmsystem.c --- wine/dlls/winmm/mmsystem.c 2001/11/13 21:58:32 1.46 +++ wine/dlls/winmm/mmsystem.c 2001/11/23 19:11:59 @@ -114,6 +114,7 @@ */ BOOL WINAPI WINMM_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) { + HINSTANCE16 mmsys16; TRACE("0x%x 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad);
switch (fdwReason) { @@ -124,9 +125,15 @@ MULTIMEDIA_DeleteIData(); return FALSE; } + mmsys16 = LoadLibrary16("mmsystem.dll"); + if (!mmsys16) { + ERR("Could not load sibling mmsystem.dll\n"); + return FALSE; + } break; case DLL_PROCESS_DETACH: MULTIMEDIA_DeleteIData(); + if(mmsys16) FreeLibrary16(mmsys16); break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: @@ -2549,7 +2556,7 @@ TRACE("(%d, %p, %d);\n", uDeviceID, lpCaps, uSize);
if ((wmld = MMDRV_Get(uDeviceID, MMDRV_MIDIIN, TRUE)) == NULL) - return MMSYSERR_INVALHANDLE; + return MMSYSERR_BADDEVICEID;
return MMDRV_Message(wmld, MIDM_GETDEVCAPS, (DWORD)lpCaps, uSize, TRUE); }
On Fri, Nov 23, 2001 at 03:59:16PM -0500, Joshua Thielen wrote:
Hello everybody,
Finale expects mmsystem to be present without having to call LoadLibrary on it. It does a GetModuleHandle on mmsystem.dll to find out if the mm extensions are available. I checked out windows 95, and it has mmsystem and winmm loaded when no apps are runing besides the desktop / explorer. This patch links wine with winmm andmakes winmm load mmsystem on init. Finale gets by this ok now. I don't know if this the correct approach, though. Could someone (Eric or Alexandre?) please take a look at it before I send it to wine-patches?
OK, I guess that's at least #2, then: King's Quest V installer does the very same thing. I've already been discussing this with Alexandre, BTW.
I checked out windows 95, and it has mmsystem
and winmm loaded when no apps are runing besides the desktop / explorer.
hmm I don't really see how a win32 app would be automatically linked to winmm... was it really the case ? (I understand it as Alexandre suggested for 16 bit apps, not 32 ones)
A+
eric pouech wrote:
hmm I don't really see how a win32 app would be automatically linked to winmm... was it really the case ? (I understand it as Alexandre suggested for 16 bit apps, not 32 ones)
No, you're right, 32-bit apps aren't linked with winmm and calling GetModuleHandle on winmm returns 0 in '95. I just meant that winmm.dll was loaded at startup because it was listed as an active module in MS System Info.
Josh Thielen