// (HANDLE)crt_beginthreadex(LPSECURITY_ATTRIBUTES security, DWORD stack_size, LPTHREAD_START_ROUTINE start_address, LPVOID arglist, DWORD initflag, LPDWORD thrdaddr );
#if defined(_MSC_VER) || defined(__WATCOMC__)
#define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \
-(HANDLE)_beginthreadex((void *)security,(unsigned)stack_size,(MSVC_BEGINTHREAD_START_ADDRESS)start_address,(void *)arglist,(unsigned)initflag,(unsigned *)thrdaddr)
+(HANDLE)_beginthreadex((void *)security,(unsigned)stack_size,start_address,(void *)arglist,(unsigned)initflag,(unsigned *)thrdaddr)
#elif defined(_BORLANDC_)
#define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \
(HANDLE)_beginthreadNT((BCC_BEGINTHREAD_START_ADDRESS)start_address,(unsigned)stack_size,(void *)arglist,(void *)security_attrib,(unsigned long)create_flags,(unsigned long *)thread_id)
static ptr_size_t value_thread = 0;
static void w32g_ext_control_sub_thread(int rc, ptr_size_t value);
-static void w32g_ext_control_thread(void)
+static unsigned __stdcall w32g_ext_control_thread(void *param)
{
for(;;){
WaitForSingleObject(hEventTcv, INFINITE); // \83X\83\8c\83b\83h\8aJ\8en\83C\83x\83\93\83g\91Ò\8b@
ResetEvent(hEventTcv); // \83X\83\8c\83b\83h\8aJ\8en\83C\83x\83\93\83g\83\8a\83Z\83b\83g
thread_finish = 1; // \83X\83\8c\83b\83h\8fI\97¹\83t\83\89\83O\83Z\83b\83g
}
- crt_endthread();
+
+ return 0;
}
static void w32g_uninit_ext_control_thread(void)
hEventTcv = CreateEvent(NULL,FALSE,FALSE,NULL); // reset manual
if(hEventTcv == NULL)
return;
- hThread = crt_beginthreadex(NULL, 0, (LPTHREAD_START_ROUTINE)w32g_ext_control_thread, 0, 0, &ThreadID);
+ hThread = crt_beginthreadex(NULL, 0, w32g_ext_control_thread, 0, 0, &ThreadID);
if(hThread == NULL)
return;
}