Andrew Nguyen : dxdiagn: Broaden the scope of the DLL instance handle.
Module: wine Branch: master Commit: 8aaf3233db10ae6f21007f3d299c3399cf012b31 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8aaf3233db10ae6f21007f3d29... Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Sun Apr 3 20:55:26 2011 -0500 dxdiagn: Broaden the scope of the DLL instance handle. --- dlls/dxdiagn/dxdiag_main.c | 8 ++++---- dlls/dxdiagn/dxdiag_private.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/dxdiagn/dxdiag_main.c b/dlls/dxdiagn/dxdiag_main.c index 6a8eecb..2d8b0ea 100644 --- a/dlls/dxdiagn/dxdiag_main.c +++ b/dlls/dxdiagn/dxdiag_main.c @@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); -static HINSTANCE instance; +HINSTANCE dxdiagn_instance = 0; LONG DXDIAGN_refCount = 0; @@ -43,7 +43,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p,%x,%p\n", hInstDLL, fdwReason, lpvReserved); if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hInstDLL; + dxdiagn_instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); } return TRUE; @@ -143,7 +143,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) */ HRESULT WINAPI DllRegisterServer(void) { - return __wine_register_resources( instance, NULL ); + return __wine_register_resources( dxdiagn_instance, NULL ); } /*********************************************************************** @@ -151,5 +151,5 @@ HRESULT WINAPI DllRegisterServer(void) */ HRESULT WINAPI DllUnregisterServer(void) { - return __wine_unregister_resources( instance, NULL ); + return __wine_unregister_resources( dxdiagn_instance, NULL ); } diff --git a/dlls/dxdiagn/dxdiag_private.h b/dlls/dxdiagn/dxdiag_private.h index 76d6058..a670c3c 100644 --- a/dlls/dxdiagn/dxdiag_private.h +++ b/dlls/dxdiagn/dxdiag_private.h @@ -100,4 +100,6 @@ extern LONG DXDIAGN_refCount; static inline void DXDIAGN_LockModule(void) { InterlockedIncrement( &DXDIAGN_refCount ); } static inline void DXDIAGN_UnlockModule(void) { InterlockedDecrement( &DXDIAGN_refCount ); } +extern HINSTANCE dxdiagn_instance; + #endif
participants (1)
-
Alexandre Julliard