Re: mmsystem should be loaded at startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Note: I'm not sure if I should have called ExitProcess if mmsystem.dll 
can't be loaded and if I needed to call FreeLibrary. I just took the 
LoadLibrary("user32") as an example.

Modified Files
wine/miscemu/main.c

Change Log
mmsystem.dll should be automatically loaded for 16-bit apps.
Index: wine/miscemu/main.c
===================================================================
RCS file: /home/wine/wine/miscemu/main.c,v
retrieving revision 1.55
diff -u -r1.55 main.c
--- wine/miscemu/main.c	2001/03/28 18:47:05	1.55
+++ wine/miscemu/main.c	2001/11/24 17:21:53
@@ -33,7 +33,14 @@
     MSG msg;
     HINSTANCE16 instance;
     HMODULE user32;
+    HMODULE16 mmsystem;
 
+    if(!(mmsystem = LoadLibrary16("mmsystem.dll")))
+    {
+	MESSAGE("Cannot load mmsystem.dll\n");
+	ExitProcess( GetLastError() );
+    }
+
     if ((instance = NE_StartMain( main_exe_name, main_exe_file )) < 32)
     {
         if (instance == 11)  /* try DOS format */
@@ -62,6 +69,7 @@
         MESSAGE( "Cannot load user32.dll\n" );
         ExitProcess( GetLastError() );
     }
+
     pGetMessageA      = (void *)GetProcAddress( user32, "GetMessageA" );
     pTranslateMessage = (void *)GetProcAddress( user32, "TranslateMessage" );
     pDispatchMessageA = (void *)GetProcAddress( user32, "DispatchMessageA" );

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux