From d8f1c974528897e63f0a0b3c873e6e30a319f88f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jun 2012 20:43:00 +0000 Subject: - hook calls were too optimized; - correct Thread_SetName prototype git-svn-id: http://svn.miranda-ng.org/main/trunk@688 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- bin10/lib/mir_core.lib | Bin 28382 -> 28382 bytes include/m_core.h | 2 +- plugins/Mir_core/modules.cpp | 2 +- plugins/Mir_core/threads.cpp | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib index a177c6a94a..51fe241cf0 100644 Binary files a/bin10/lib/mir_core.lib and b/bin10/lib/mir_core.lib differ diff --git a/include/m_core.h b/include/m_core.h index a25c60e400..79292893c3 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -458,7 +458,7 @@ __inline HANDLE mir_forkthreadowner(pThreadFuncOwner aFunc, void* owner, void* a { return (HANDLE)forkthreadex(NULL, 0, (pThreadFuncEx)aFunc, owner, arg, pThreadID); } -MIR_CORE_DLL(void) Thread_SetName(DWORD dwThreadID, const char *szThreadName); +MIR_CORE_DLL(void) Thread_SetName(const char *szThreadName); MIR_CORE_DLL(void) KillObjectThreads(void* pObject); diff --git a/plugins/Mir_core/modules.cpp b/plugins/Mir_core/modules.cpp index bd8636ccb8..121ed1282b 100644 --- a/plugins/Mir_core/modules.cpp +++ b/plugins/Mir_core/modules.cpp @@ -236,7 +236,7 @@ static bool checkHook(HANDLE hHook) { if (p->secretSignature != HOOK_SECRET_SIGNATURE) ret = false; - else if (p->subscriberCount == 0) + else if (p->subscriberCount == 0 && p->pfnHook == NULL) ret = false; else ret = true; diff --git a/plugins/Mir_core/threads.cpp b/plugins/Mir_core/threads.cpp index 68fb526f5d..90dcdaaf5d 100644 --- a/plugins/Mir_core/threads.cpp +++ b/plugins/Mir_core/threads.cpp @@ -354,12 +354,12 @@ typedef struct tagTHREADNAME_INFO } THREADNAME_INFO; #pragma pack(pop) -MIR_CORE_DLL(void) Thread_SetName(DWORD dwThreadID, const char *szThreadName) +MIR_CORE_DLL(void) Thread_SetName(const char *szThreadName) { THREADNAME_INFO info; info.dwType = 0x1000; info.szName = szThreadName; - info.dwThreadID = dwThreadID; + info.dwThreadID = GetCurrentThreadId(); info.dwFlags = 0; __try -- cgit v1.2.3