summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify/src/main.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-11 14:47:47 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-11 14:47:47 +0000
commit5e3980529e772bf4bb701822f6cde9b3bb117cb8 (patch)
tree78ba7aad5ccc83b46861b8b406a3b72a1bc03737 /plugins/KeyboardNotify/src/main.cpp
parent9587ecd839b2bd5c45aaa8c33d24118b8da2cea3 (diff)
minus CreateThread
git-svn-id: http://svn.miranda-ng.org/main/trunk@13536 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/KeyboardNotify/src/main.cpp')
-rw-r--r--plugins/KeyboardNotify/src/main.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index ae7e48fd98..1db3b1f8e8 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -264,7 +264,7 @@ BOOL checkUnopenEvents()
return FALSE;
}
-static void FlashThreadFunction()
+static void __cdecl FlashThreadFunction(void *)
{
BOOL bEvent = FALSE;
DWORD dwEventStarted, dwFlashStarted;
@@ -503,20 +503,17 @@ INT_PTR NormalizeSequenceService(WPARAM wParam, LPARAM lParam)
// Support for Trigger plugin
-static DWORD WINAPI ForceEventsWereOpenedThread(void *eventMaxSeconds)
+static void __cdecl ForceEventsWereOpenedThread(void *eventMaxSeconds)
{
Sleep(((WORD)eventMaxSeconds) * 1000);
CallService(MS_KBDNOTIFY_EVENTSOPENED, 1, 0);
- return 0;
}
void StartBlinkAction(char *flashSequence, WORD eventMaxSeconds)
{
- DWORD threadID = 0;
-
if (eventMaxSeconds)
- CreateThread(NULL, 0, ForceEventsWereOpenedThread, (void *)eventMaxSeconds, 0, &threadID);
+ mir_forkthread(ForceEventsWereOpenedThread, (void *)eventMaxSeconds);
CallService(MS_KBDNOTIFY_STARTBLINK, 1, (LPARAM)flashSequence);
}
@@ -729,7 +726,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
mir_sntprintf(eventName, SIZEOF(eventName), _T("%s/ExitEvent"), eventPrefix);
hExitEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
- hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)FlashThreadFunction, NULL, 0, &IDThread);
+ hThread = mir_forkthread(FlashThreadFunction, 0);
HookEvent(ME_MC_ENABLED, OnMetaChanged);
HookEvent(ME_DB_EVENT_ADDED, PluginMessageEventHook);