Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to stop program execution ( follow up)

Status
Not open for further replies.

JackMorris

Technical User
Jan 30, 2003
18
IE
thanx to tchouch and pencilbiter answering my question.

Isnt there any options to stop the program execution at any time during its execution? Using SetTimer() is an option if i know when i would like to stop the execution.If i want to stop while it is running ( as like in stop build option in visual c++)then is there any way i can do that?

Jack
 
What do You mean with stop program execution? There are many things You can interrupt:
1) Close/exit application manually or from
1.1 program
1.1.1 the same program
1.1.1.1 program is not busy (user can use mouse
and keyboard to control program)
1.1.1.2 program (main thread) is busy
1.1.2 another program
1.1.2.1 on the same computer
1.1.2.2 on another computer
1.2 service
1.3 driver
....
2) Hold a thread : main thread or another thread
3) Hold process (like debugger)
4) Interrupt a thread
5) Wait for an event (Semafore, Mutex etc.) in thread(s)
And there are many things You can do in all this cases - there are no best way for all cases. You should say, which situation You have exactly.
 
Can you not just use the PostQuitMessage API ?
Greetings,
Rick
 
Yes, if you use the loop
while(GetMessage.....
you can simply PostQuitMessage(0);
Else you can use exit* functions. Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top