it's urgent

thank s in advance
|
Banned
|
|
| 18Mar2010,01:48 | #1 |
|
How can END a process through a C program...... is there any function in C???????
it's urgent ![]() thank s in advance |
|
Go4Expert Member
|
|
| 18Mar2010,10:09 | #2 |
|
Using the function kill() you can end the process ,for this you need the process id .The function raise() will end the current process .
Code:
man 2 kill man raise |
|
Banned
|
|
| 18Mar2010,10:38 | #3 |
|
i think that is under LINUX.... i need in windows environment....... those functions (kill() & raise() ) will it work in DEV C++ compiler?????????
![]()
|
|
Light Poster
|
|
| 18Mar2010,11:46 | #4 |
|
Hi
Try using Exit(0); This will terminate ur calling process |
|
Go4Expert Member
|
|
| 18Mar2010,14:00 | #5 |
|
use the following function
Code:
exit(0) |
|
Mentor
|
![]() |
| 18Mar2010,14:01 | #6 |
|
Help with you is always urgent. Why not try asking sooner? Don't leave it so long before tackling the task then you won't be as stressed out.
|
|
Banned
|
|
| 18Mar2010,17:43 | #7 |
|
hmmm .. you are right..
ok.. can u help me out for my problem.... ![]() thank u |
|
Mentor
|
![]() |
| 18Mar2010,20:00 | #8 |
|
It's not easy: you have to find the process's main window and post it a WM_CLOSE message. There are WinAPI functions to help you with this though; see EnumWindows.
See also http://support.microsoft.com/kb/178893 |
|
Banned
|
|
| 18Mar2010,22:07 | #9 |
|
oh... is it !!!! fine....
..... wat about kill() function , whether we can we use that ........... I am having DEV C++ compiler.... whether kill() will work in my compiler???i saw that function in sys.h file.. i hope u know this ![]() int kill(pid_t pid, int sig); here 'sig' refers to the signal ... in Linux it's easy to get the signal no. which is equivalent to termination of that process corresponding to the given PID no. ... but how to find the same signal number for WINDOWS.... or we have same signal formats for all OS??? ![]() plz. help me out........
|
|
Pro contributor
|
![]() |
| 18Mar2010,22:12 | #10 |