Bolle
12.05.2002, 12:19
so, hab mal eine frage zu threads.
hier erst mal der quellcode, vielleicht seht ihr ja auf anhieb fehler.
typedef struct{bool bKill;}KPARAM, *PKPARAM;
static KPARAM Param;
DWORD dwThreadID[1];
void sockets(PVOID Param);
...
void sockets(PVOID Param)
{
PKPARAM pparams = (PKPARAM) Param;
while(!pparams->bKill)
{...}
}
...
CreateThread( NULL,0, sockets, &Param ,0 ,&dwThreadID[0] );
so, wenn ich das nun versuche mit vc++ 6 zu kompilieren, bekomme ich folgende fehlermeldung.
error C2664: ´CreateThread´ : cannot convert parameter 3 from ´void (void *)´ to ´unsigned long (__stdcall *)(void *)´
None of the functions with this name in scope match the target type
kann mir einer sagen was das zu bedeuten hat?
hab auch schon in die msnd geguck, hat aber nicht wirklich was herorgebracht.
hier erst mal der quellcode, vielleicht seht ihr ja auf anhieb fehler.
typedef struct{bool bKill;}KPARAM, *PKPARAM;
static KPARAM Param;
DWORD dwThreadID[1];
void sockets(PVOID Param);
...
void sockets(PVOID Param)
{
PKPARAM pparams = (PKPARAM) Param;
while(!pparams->bKill)
{...}
}
...
CreateThread( NULL,0, sockets, &Param ,0 ,&dwThreadID[0] );
so, wenn ich das nun versuche mit vc++ 6 zu kompilieren, bekomme ich folgende fehlermeldung.
error C2664: ´CreateThread´ : cannot convert parameter 3 from ´void (void *)´ to ´unsigned long (__stdcall *)(void *)´
None of the functions with this name in scope match the target type
kann mir einer sagen was das zu bedeuten hat?
hab auch schon in die msnd geguck, hat aber nicht wirklich was herorgebracht.