Thread
-
Here[^] is an excellent article about worker threads. A bit long but very interesting.
Cédric Moonen Software developer
Charting control [v1.5] OpenGL game tutorial in C++ -
I really think you should search the net before sending a query. Hope this link helps you http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=435[^]
-
thank for reply but i need to pass myfunction in thread.Simple i want to create a thread and in this thread i want to pass
Copy Function
.Plz help me
What do you mean by "pass myfunction in thread" ? Do you mean that you have to call your function from within the thread ? If yes, you need to make sure that your function prototype is the same as the one expected by the CreateThread function (see here[^]).
Cédric Moonen Software developer
Charting control [v1.5] OpenGL game tutorial in C++ -
Here[^] is an excellent article about worker threads. A bit long but very interesting.
Cédric Moonen Software developer
Charting control [v1.5] OpenGL game tutorial in C++ -
Ok both are same article.But i need very simple only two line of example how can i pass Copy function in thread.Plz help me i don't need two much high funda article becouse i don't know any thing about THREAD.So plz help me
If you really "don't know anything about threads" then it's the time either to:
- acquire some knowledge about (and hence read that f*!?ing article!!! :mad:).
or
- simply abandon the idea of using threads.
BTW option two is for the weaks, so, once again, read the article. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Ok both are same article.But i need very simple only two line of example how can i pass Copy function in thread.Plz help me i don't need two much high funda article becouse i don't know any thing about THREAD.So plz help me
As far as I understand, you want to pass a function pointer to a thread procedure. In a simplified way it could be done like so: void MyFuncToPass(int) { //.. } UINT MyThread(PVOID param) { typedef void (*F)(int); F func = (F)param; func(10); // Call my func passed return 0; } void TheCaller() { // run the thread and pass the function to it. AfxBeginThread(MyThread, (void*)MyFuncToPass); }
-- Arman
-
If you really "don't know anything about threads" then it's the time either to:
- acquire some knowledge about (and hence read that f*!?ing article!!! :mad:).
or
- simply abandon the idea of using threads.
BTW option two is for the weaks, so, once again, read the article. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]or quit programming since you lack the necessary curiosity. :rolleyes:
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
-
or quit programming since you lack the necessary curiosity. :rolleyes:
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
Good point! :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
or quit programming since you lack the necessary curiosity. :rolleyes:
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
Luc Pattyn wrote:
...you lack the necessary curiosity.
Eloquently said. :thumbsup: BTW, there's a type-o on your home page.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Luc Pattyn wrote:
...you lack the necessary curiosity.
Eloquently said. :thumbsup: BTW, there's a type-o on your home page.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Hi David,
DavidCrow wrote:
there's a type-o
there could be several, and they could well be real mistakes, can you be more specific please. I'm a bit in doubt about "client's IP address" ... :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
-
Hi David,
DavidCrow wrote:
there's a type-o
there could be several, and they could well be real mistakes, can you be more specific please. I'm a bit in doubt about "client's IP address" ... :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
Luc Pattyn wrote:
...can you be more specific please.
strengthen
Luc Pattyn wrote:
I'm a bit in doubt about "client's IP address" ...
That's correct.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Luc Pattyn wrote:
...can you be more specific please.
strengthen
Luc Pattyn wrote:
I'm a bit in doubt about "client's IP address" ...
That's correct.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Hi David,
DavidCrow wrote:
strengthen
Waw. Thanks for pointing that out. I had no idea, and Googling both shows both appear in similar quantities. I am struggling with th and ht quite often, e.g. height as opposed to width. is there an easy way to figure it out (apart from Google, Webster and other lookups)? :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Wednesday, February 18, 2009 10:33 AM