[rpcrt4/tests] Use GetModuleHandle instead of LoadLibrary

Paul Vriens paul.vriens.wine at gmail.com
Mon Dec 15 07:59:46 CST 2008


This is a multi-part message in MIME format.
--------------030907090505040502070609
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

No need to actually load the dll (and avoid the need of a FreeLibrary()).

Changelog
   Use GetModuleHandle instead of LoadLibrary

-- 
Cheers,

Paul.


--------------030907090505040502070609
Content-Type: text/x-diff;
 name="0006-Use-GetModuleHandle-instead-of-LoadLibrary.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename*0="0006-Use-GetModuleHandle-instead-of-LoadLibrary.patch"

>From 244e33be9d37ead259766a3c160fb5a6baa95f23 Mon Sep 17 00:00:00 2001
From: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Mon, 15 Dec 2008 14:58:29 +0100
Subject: [PATCH] Use GetModuleHandle instead of LoadLibrary

---
 dlls/rpcrt4/tests/cstub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c
index 29bcb27..f101a6f 100644
--- a/dlls/rpcrt4/tests/cstub.c
+++ b/dlls/rpcrt4/tests/cstub.c
@@ -434,7 +434,7 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
     const CLSID PSDispatch = {0x20420, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}};
     const CLSID CLSID_Unknown = {0x45678, 0x1234, 0x6666, {0xff, 0x67, 0x45, 0x98, 0x76, 0x12, 0x34, 0x56}};
     HRESULT r;
-    HMODULE hmod = LoadLibraryA("rpcrt4.dll");
+    HMODULE hmod = GetModuleHandleA("rpcrt4.dll");
     void *CStd_QueryInterface = GetProcAddress(hmod, "CStdStubBuffer_QueryInterface");
     void *CStd_AddRef = GetProcAddress(hmod, "CStdStubBuffer_AddRef");
     void *CStd_Release = GetProcAddress(hmod, "NdrCStdStubBuffer_Release");
-- 
1.6.0.4



--------------030907090505040502070609--



More information about the wine-patches mailing list