'RecordLoop'이라는 함수가 포함 된 SoundManager 클래스가 있습니다. ,_begintheadex 함수 호출 문제
error C3867: 'SoundManager::recordLoop': function call missing argument list; use '&SoundManager::recordLoop' to create a pointer to member
IntelliSense: argument of type "unsigned int (__stdcall SoundManager::*)(void *params)" is incompatible with parameter of type "unsigned int (__stdcall *)(void *)"
그래서 내가 제안으로 &)와 SoundManager (사운드 :: recordLoop를 사용하여 시도했다 :
recordHandle = (HANDLE)_beginthreadex(NULL,0,recordLoop,
(void*)exinfo->length,CREATE_SUSPENDED,0);
그것은 나에게주고 다음과 같은 오류 다음)와 SoundManager (사운드의 생성자에서이 코드를 사용하고 하지만이 날 준다 :
error C2664: '_beginthreadex' : cannot convert parameter 3 from 'unsigned int (__stdcall SoundManager::*)(void *)' to 'unsigned int (__stdcall *)(void *)'
IntelliSense: argument of type "unsigned int (__stdcall SoundManager::*)(void *params)" is incompatible with parameter of type "unsigned int (__stdcall *)(void *)"
클래스 메서드에서 스레드를 시작하는 것은 불법입니까 아니면 내가 잘못 했습니까? 사전에
감사
편집 : 죄송합니다>는 recordLoop를 추가하는 것을 잊었다. <는 여기있다 :
public:
unsigned __stdcall recordLoop(void* params);
recordloop 함수는 정적이며 void *를 인수로 사용합니까? 알았어 – programmer