Hello!
We have developed an application using a threaded XPCOM-object. Now we
are moving this application to Win32 from Linux, but we have a
compilingproblem with the PR_CreateThread function.
Our code looks like this:
void nsCorba::runorb() {
orb->run();
}
void *the_thread(void *obj) {
((nsCorba *)obj)->runorb();
return obj;
}
void nsCorba::start() {
185 pthread = PR_CreateThread(PR_USER_THREAD,
186 the_thread,
187 this,
188 PR_PRIORITY_NORMAL,
189 PR_LOCAL_THREAD,
190 PR_UNJOINABLE_THREAD,
191 0);
}
We get this compiling error:
"nsCorba.cpp(185) : error C2664: 'PR_CreateThread' : cannot convert
parameter 2 from 'void *(void *)' to 'void (__cdecl *)(void *)'
None of the functions with this name in scope match the target type
What are we doing wrong???
//Henrik