Simplified module handling code.

Robert Reif reif at earthlink.net
Mon Dec 12 21:39:43 CST 2005


Eric Pouech wrote:

> ChangeLog:
> Simplified module handling code
>
>  programs/winecfg/audio.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
>
>------------------------------------------------------------------------
>
>1099f74fd006c5c6a53e91beedc73de3ffe7b7c5
>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);
>             }
>         }
>     }
>
>  
>
>------------------------------------------------------------------------
>
>
>  
>
Thank you for looking at this code. That's much cleaner. That 
LoadLibrary bothered me.




More information about the wine-patches mailing list