_beginthread 创建线程发送参数

unsigned long _beginthread(
void(_cdecl *start_address)(void *), //声明为void (*start_address)(void *)形式
unsigned stack_size, //是线程堆栈大小,一般默认为0
void *arglist //向线程传递的参数,一般为结构体
);

 

    uintptr_t hthread = _beginthread(SendHeartBeat, 0, g_pLogInstance);
    WaitForSingleObject((HANDLE)hthread, INFINITE);

 

posted on 2019-09-19 09:14  lydstory  阅读(606)  评论(0)    收藏  举报

导航