From: robiwan Date: Tue, 10 Jul 2012 08:16:48 +0000 (+0000) Subject: Added typedef to remove error with _beginthreadex X-Git-Tag: pa_stable_v19_20140130_r1919~48 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=a889a6054613eea0c62b25f04c782de665ffa11b;p=portaudio Added typedef to remove error with _beginthreadex --- diff --git a/examples/paex_record_file.c b/examples/paex_record_file.c index 9e60506..1651f75 100644 --- a/examples/paex_record_file.c +++ b/examples/paex_record_file.c @@ -194,7 +194,8 @@ typedef int (*ThreadFunctionType)(void*); static PaError startThread( paTestData* pData, ThreadFunctionType fn ) { #ifdef _WIN32 - pData->threadHandle = (void*)_beginthreadex(NULL, 0, fn, pData, CREATE_SUSPENDED, NULL); + typedef unsigned (__stdcall* WinThreadFunctionType)(void*); + pData->threadHandle = (void*)_beginthreadex(NULL, 0, (WinThreadFunctionType)fn, pData, CREATE_SUSPENDED, NULL); if (pData->threadHandle == NULL) return paUnanticipatedHostError; /* Set file thread to a little higher prio than normal */