Click to See Complete Forum and Search --> : Need little help in Worker threads
amitmistry_petlad
May 4th, 2007, 05:51 AM
hi i have got the link from the forum anwer but i need some real help through which my project can work.
can any body help me.
wel come for code snippest.
Thanks in advance.
golanshahar
May 4th, 2007, 06:40 AM
Look at this FAQ: How to create a worker thread? (http://www.codeguru.com/forum/showthread.php?t=312452)
Cheers
amitmistry_petlad
May 8th, 2007, 08:29 AM
I have checked everything but the parameter which i passed remain same.
why ??????
since last so many days I am running behind but all efforts in water.
please kindly anybody help me ?
hThread[i]=_beginthread(&Thread,0,l) //l i take pointer here
i am going to create the batch of thread here.
but each time i got first value of structure variable.
amit
MikeAThon
May 8th, 2007, 11:15 AM
You're probably passing a pointer to a local stack variable. This will go out of scope long before the thread can see it, resulting in invalid memory access inside the thread .
But that's a guess. You need to post some code, to show us how you create the thread and the "Thread variable, and how you use it in the thread.
Mike
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.