[PATCH] d3dx10/tests: Use GetModuleHandleA instead of LoadLibraryA.
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> --- dlls/d3dx10_43/tests/d3dx10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index ac0852bd02..4d7bc2de17 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -41,7 +41,7 @@ static BOOL compare_float(float f, float g, unsigned int ulps) static ID3D10Device *create_device(void) { ID3D10Device *device; - HMODULE d3d10_mod = LoadLibraryA("d3d10.dll"); + HMODULE d3d10_mod = GetModuleHandleA("d3d10.dll"); HRESULT (WINAPI *pD3D10CreateDevice)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, ID3D10Device **); if (!d3d10_mod) -- 2.13.6
2018-01-22 9:22 GMT+01:00 Andrey Gusev <andrey.goosev(a)gmail.com>:
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> --- dlls/d3dx10_43/tests/d3dx10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index ac0852bd02..4d7bc2de17 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -41,7 +41,7 @@ static BOOL compare_float(float f, float g, unsigned int ulps) static ID3D10Device *create_device(void) { ID3D10Device *device; - HMODULE d3d10_mod = LoadLibraryA("d3d10.dll"); + HMODULE d3d10_mod = GetModuleHandleA("d3d10.dll"); HRESULT (WINAPI *pD3D10CreateDevice)(IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT, UINT, ID3D10Device **);
Does that work on Wine? Either way, I think I prefer keeping the LoadLibrary() call here. I guess you could potentially call FreeLibrary() before exiting but that doesn't seem particularly useful either.
participants (2)
-
Andrey Gusev -
Matteo Bruni