cs_neub
Messages postés6Date d'inscriptionmercredi 30 octobre 2002StatutMembreDernière intervention22 janvier 2003
-
22 nov. 2002 à 11:58
cs_llo
Messages postés45Date d'inscriptionjeudi 10 octobre 2002StatutMembreDernière intervention 6 décembre 2002
-
26 nov. 2002 à 17:57
Salut à tous,
j'ecris un module de visionnement d'image et
je souhaiterai pouvoir stopper ma fonction OnPlay au moment voulu mais j'ai un pb a la creation d'un thread (novice en CPP)
error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)'
la fonction appelee est:
DWORD CEssaiMFCDlg::Play(LPVOID pdata)
{-------}
la fonction appelante:
void CEssaiMFCDlg::OnStock()
{
// TODO: Add your control notification handler code here
HANDLE hThread;
LPVOID pdata;
hThread = CreateThread(NULL, 0, Play, pdata, 0, NULL);
j'ai teste d'autre manières proposees sur le net (exemple inserer unsigned long (__stdcall *)(void *))Play devant Play) mais ca n'aboutit pas.
bolbtb
Messages postés4Date d'inscriptionmercredi 23 octobre 2002StatutMembreDernière intervention23 novembre 2002 23 nov. 2002 à 00:22
Salut,
Je suis pas un pro des threads mais ceux que j'ai fait fonctionnent... je déclare ma fonction appelée :
DWORD WINAPI ThreadFunc( LPVOID lpParam )
{ ... ; return 0; }
Sinon t'as des super exemples sur MSDNonline en cherchant CreateThread sur google.fr