First of all, when posting questions like this, you should identify the
exact line that triggers the error, and the complete error message.
Otherwise we have to read through all of the code, trying to figure out
which line it might be.
> Hi, I have a multithread problem like the following lines, when I compile
> this code I caught a "error C2665", the error description is : none of
[quoted text clipped - 6 lines]
> return 0;
> }
This is not the correct function signature for a thread function.
Check MSDN.
> // CReadDatFilesView ÏûÏ¢´¦Àí³ÌÐò
>
[quoted text clipped - 9 lines]
> }
> }
You supply the wrong arguments.
The first parameter should be the function pointer only.
You try to supply a function pointer together with the function argument.
If your function has the correct signature, it will receive the 2nd
parameter of AfxBeginThread as a parameter when it is executed.
Read the documentation for AfxBeginThread for more information.

Signature
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"
Michael Buechel - 17 Jul 2006 13:35 GMT
> //-----------------------------
> UINT ReadDatFile(int i_thread)
> {
> AfxMessageBox(i_thread);
^---- This should be a resource ID or a text

Signature
Kind regards, Michael Buechel
while(!sleep())
sheeps++;
> First of all, when posting questions like this, you should identify the
> exact line that triggers the error, and the complete error message.
[quoted text clipped - 36 lines]
> parameter of AfxBeginThread as a parameter when it is executed.
> Read the documentation for AfxBeginThread for more information.