Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RyoxSinfar

creating threads with arguements

This topic is 5266 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I jsut realized that in all the CreateThread functions I have seen there are no arguement paranthasesis... yeah well anyway, I need to start a thread with arguements. Does anyone know how to do this?

Share this post


Link to post
Share on other sites
Advertisement
There''s a DWORD argument which gets passed to your thread proc. set that to be a pointer to a structure with whatever data you need.

Share this post


Link to post
Share on other sites
quote:
From MSDN
lpParameter
[in] Pointer to a variable to be passed to the thread.




Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud

Share this post


Link to post
Share on other sites
Okay so say I wanted to pass a value X which I get from the function it is called in, and used which tells me which thread handle to use. (I use a function to find the next open one)

and do I just do a regular pointer for the arguement? Or does it have to be a struct?

Are all arguements passed by reference always?

[edited by - RyoxSinfar on April 23, 2004 7:38:50 AM]

[edited by - RyoxSinfar on April 23, 2004 8:14:24 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!