link: LoadLibrary is not needed.
authorPaolo Bonzini <bonzini@gnu.org>
Fri, 2 Oct 2009 01:04:16 +0000 (03:04 +0200)
committerPaolo Bonzini <bonzini@gnu.org>
Fri, 2 Oct 2009 01:11:21 +0000 (03:11 +0200)
* lib/link.c: Use GetModuleHandle.

ChangeLog
lib/link.c

index ecfb784..0d14e35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-01  Paolo Bonzini  <bonzini@gnu.org>
+
+       link: LoadLibrary is not needed.
+       * lib/link.c: Use GetModuleHandle.
+
 2009-10-01  Eric Blake  <ebb9@byu.net>
 
        getopt: bump serial number
index 42d086c..994ae45 100644 (file)
@@ -41,7 +41,7 @@ static BOOL initialized = FALSE;
 static void
 initialize (void)
 {
-  HMODULE kernel32 = LoadLibrary ("kernel32.dll");
+  HMODULE kernel32 = GetModuleHandle ("kernel32.dll");
   if (kernel32 != NULL)
     {
       CreateHardLinkFunc =