BeerFizz
Technical User
- Jan 23, 2004
- 28
Hi,
I am trying to incorporate several classes I got off of Code-project (which I think were originally written for Visual C++6.0) into a dialog application under Microsoft Visual C++ .NET 2003.
I am having an issue with a particular call and after spending several hour at this, I am still unable to get it to compile correctly and get the following error:
this is the line which is calling causing the issue (i contains a reference to a function)
This is the function prototype:
This is the prototype of the 'class' myThread
What is wrong and how do I fix this (explicitly)
Thanks for all help
Phil
I am trying to incorporate several classes I got off of Code-project (which I think were originally written for Visual C++6.0) into a dialog application under Microsoft Visual C++ .NET 2003.
I am having an issue with a particular call and after spending several hour at this, I am still unable to get it to compile correctly and get the following error:
Code:
error C2664: 'myThread::myThread(LPTHREAD_START_ROUTINE,LPVOID,DWORD,DWORD,BOOL)' : cannot convert parameter 1 from 'DWORD (LPVOID)' to 'LPTHREAD_START_ROUTINE'
this is the line which is calling causing the issue (i contains a reference to a function)
Code:
myThread* serverThread = new myThread(serverHandleThread,(void*)serverArgument);
This is the function prototype:
Code:
DWORD WINAPI serverHandleThread(LPVOID threadInfo);
Code:
myThread(
LPTHREAD_START_ROUTINE pThreadFunc, // address of thread callback
LPVOID pThreadFuncParameter=NULL, // address of callback's parameter,
DWORD exeFlags=0, // creation flag
DWORD sSize=0, // stack size
BOOL inheritable=FALSE // inheritable
);
What is wrong and how do I fix this (explicitly)
Thanks for all help
Phil