[PATCH] d3dx10/tests: Use GetModuleHandleA instead of LoadLibraryA.

Matteo Bruni matteo.mystral at gmail.com
Mon Jan 22 17:48:38 CST 2018


2018-01-22 9:22 GMT+01:00 Andrey Gusev <andrey.goosev at gmail.com>:
> Signed-off-by: Andrey Gusev <andrey.goosev at 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.



More information about the wine-devel mailing list