dllinst.h (Firebird-3.0.2.32703-0.tar.bz2) | : | dllinst.h (Firebird-3.0.4.33054-0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 42 | skipping to change at line 42 | |||
#include <firebird.h> | #include <firebird.h> | |||
#include <windows.h> | #include <windows.h> | |||
namespace Firebird { | namespace Firebird { | |||
extern HINSTANCE hDllInst; | extern HINSTANCE hDllInst; | |||
extern bool bDllProcessExiting; | extern bool bDllProcessExiting; | |||
extern DWORD dDllUnloadTID; | extern DWORD dDllUnloadTID; | |||
class ThreadModuleRef | ||||
{ | ||||
public: | ||||
ThreadModuleRef(void* thdFunc, bool* pShutFlag) | ||||
{ | ||||
hModule = NULL; | ||||
m_shutFlag = pShutFlag; | ||||
const BOOL ret = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM | ||||
_ADDRESS, | ||||
(LPCSTR) thdFunc, &hModule); | ||||
} | ||||
~ThreadModuleRef() | ||||
{ | ||||
if (!m_shutFlag || !*m_shutFlag) | ||||
FreeLibrary(hModule); | ||||
else | ||||
FreeLibraryAndExitThread(hModule, 0); | ||||
} | ||||
private: | ||||
HMODULE hModule; | ||||
bool* m_shutFlag; | ||||
}; | ||||
} // namespace | } // namespace | |||
#endif // !FB_DLL_INST && WIN_NT | #endif // !FB_DLL_INST && WIN_NT | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 26 lines changed or added |