Eric Pouech : winecfg: Simplified module handling code.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 13 04:58:26 CST 2005


Module: wine
Branch: refs/heads/master
Commit: e7ecbe4228ab27ff32e025549b5daf0796a68e53
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=e7ecbe4228ab27ff32e025549b5daf0796a68e53

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Tue Dec 13 11:12:24 2005 +0100

winecfg: Simplified module handling code.

---

 programs/winecfg/audio.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index 232a41c..36227ca 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
@@ -171,10 +171,8 @@ static void initAudioDeviceTree(HWND hDl
         }
         else
         {
-            HINSTANCE lib;
-
-            lib = LoadLibrary(name);
-            if (lib)
+            HMODULE lib;
+            if ((lib = GetDriverModuleHandle(hdrv)))
             {
                 int num_wod = 0, num_wid = 0, num_mod = 0, num_mid = 0, num_aux = 0, num_mxd = 0;
                 MessagePtr wodMessagePtr = (MessagePtr)GetProcAddress(lib, "wodMessage");
@@ -371,7 +369,6 @@ static void initAudioDeviceTree(HWND hDl
                         }
                     }
                 }
-                FreeLibrary(lib);
             }
         }
     }




More information about the wine-cvs mailing list