Click here to Skip to main content
15,893,622 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: kill COM calls in thread Pin
viperlogic4-Apr-06 7:40
viperlogic4-Apr-06 7:40 
AnswerRe: kill COM calls in thread Pin
David Crow4-Apr-06 7:28
David Crow4-Apr-06 7:28 
GeneralRe: kill COM calls in thread Pin
viperlogic4-Apr-06 8:01
viperlogic4-Apr-06 8:01 
GeneralRe: kill COM calls in thread Pin
David Crow4-Apr-06 8:13
David Crow4-Apr-06 8:13 
GeneralRe: kill COM calls in thread Pin
viperlogic4-Apr-06 10:19
viperlogic4-Apr-06 10:19 
QuestionRe: kill COM calls in thread Pin
David Crow4-Apr-06 10:37
David Crow4-Apr-06 10:37 
AnswerRe: kill COM calls in thread Pin
viperlogic4-Apr-06 10:41
viperlogic4-Apr-06 10:41 
GeneralRe: kill COM calls in thread Pin
David Crow4-Apr-06 11:02
David Crow4-Apr-06 11:02 
viperlogic wrote:
i am scanning alot of hosts with this app, waiting 2mins for every host would take for ever to scan the network, hence i use the thread timeout of 3secs


I did something very similar to this in a ping-type application. For each machine that I was going to ping, I just created a secondary thread and put the ping-related code in it. Given that the machines each responded in their own time, the threads all completed at different times; some were instantaneous while others took a lot longer. If your UI has some sort of listbox or list control for these machines, give them a default status of "Establishing connection. Please wait...". When that machine's thread terminates, replace the default status with what actually happened.

viperlogic wrote:
i just read about _endthread and it appears to work so far. is this a proper solution?


Not unless you also used _beginthread(). Regardless, it is called from within the secondary thread. Terminating a thread from within itself is vastly different than terminating a thread from some other thread.


"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

"There is no death, only a change of worlds." - Native American Proverb


QuestionTreeView_CreateDragImage Pin
Luther Baker4-Apr-06 5:01
Luther Baker4-Apr-06 5:01 
Questionhackers delight, how to parse all compbinations Pin
9ine4-Apr-06 4:55
9ine4-Apr-06 4:55 
QuestionRe: hackers delight, how to parse all compbinations Pin
David Crow4-Apr-06 5:01
David Crow4-Apr-06 5:01 
AnswerRe: hackers delight, how to parse all compbinations Pin
9ine4-Apr-06 5:05
9ine4-Apr-06 5:05 
AnswerRe: hackers delight, how to parse all compbinations Pin
toxcct4-Apr-06 5:11
toxcct4-Apr-06 5:11 
GeneralRe: hackers delight, how to parse all compbinations Pin
9ine4-Apr-06 5:36
9ine4-Apr-06 5:36 
GeneralRe: hackers delight, how to parse all compbinations Pin
9ine4-Apr-06 6:25
9ine4-Apr-06 6:25 
QuestionRe: hackers delight, how to parse all compbinations Pin
David Crow4-Apr-06 7:31
David Crow4-Apr-06 7:31 
AnswerRe: hackers delight, how to parse all compbinations Pin
9ine4-Apr-06 23:05
9ine4-Apr-06 23:05 
GeneralRe: hackers delight, how to parse all compbinations Pin
David Crow5-Apr-06 4:09
David Crow5-Apr-06 4:09 
QuestionCListCtrl Pin
Anthony98874-Apr-06 4:52
Anthony98874-Apr-06 4:52 
AnswerRe: CListCtrl Pin
David Crow4-Apr-06 4:59
David Crow4-Apr-06 4:59 
AnswerRe: CListCtrl Pin
Laxman Auti4-Apr-06 18:36
Laxman Auti4-Apr-06 18:36 
QuestionWhere do u declare m_pSet? Pin
swapna_signsin4-Apr-06 4:48
swapna_signsin4-Apr-06 4:48 
AnswerRe: Where do u declare m_pSet? Pin
toxcct4-Apr-06 4:54
toxcct4-Apr-06 4:54 
GeneralRe: Where do u declare m_pSet? Pin
swapna_signsin4-Apr-06 5:02
swapna_signsin4-Apr-06 5:02 
AnswerRe: Where do u declare m_pSet? Pin
David Crow4-Apr-06 4:57
David Crow4-Apr-06 4:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.