Terminate Process Terminate Process belthurgp (Instructor) (OP) 6 Jun 00 08:44 I want to make a program of mine not killable under NT. My program should be able to trap TerminateProcess. Any ideas on how to do this. RE: Terminate Process palbano (Programmer) 6 Jun 00 12:34 Dear belthurgp,If you read the SDK for 'TerminateProcess' it states that the function 'unconditionally' causes a process to exit. Furthermore it warns that it should be used only in extreme circumstances which is why I did not recommend using it in my post to gleason's question.I don't believe there is anyway to completely block your process from being terminated. However you can make it more difficult by having your process run under an admin account, or make it a service which will run under the system account.Good luck-pete RE: Terminate Process belthurgp (Instructor) (OP) 7 Jun 00 07:36 hi pete,I really appreciate your views on using TerminateProcess in very rare cases. But my experience tells me not to take Microsoft's advice very seriously. They are very good at discouraging people from interfering into OS internals.Regarding my query, what I have in mind is to try if i can hook API functions, but I know it is not easy. Service is an easy way out (comparatively), but MSDN doesn't make my life easier if I have to write a service. I have not written one till now, have u ?.I have another idea, that is , put in a message hook, and see if task manager is active(FindWindow or EnumWindow),then trap all SendMessage with ListBox handle and the DataPtr of that message with my window handle. Simply put,don't let task manager display my window id. But i am not very sure, bcos, is taskmgr Ring0 application ?. that i need to find out.thanx. GuruPrasad Belthurbelthurgp@yahoo.comMy Personal PageCommerce Graduate, but have lived purely on computers. All the work i have done till now is only with computers and I love it. Written lot of programs that are actually small utils. Can crack MS-ACCESS Password. RE: Terminate Process Karl Blessing (Programmer) 7 Jun 00 08:05 um, his post is correct, the reason is logical, it kills the process, creating memory leaks, preventing data from being saved, locking drivers in memory where you cant get to them, in otherwords, it could just crash your computer, as if some vital process crashed, And I would know because myself and others have gone through the experiements. A thing about microsoft's advise, any functions they give away, they wholeheartly tell you everything thats important about it, its the APIs that they dont show you or dont want you to know is the ones they put hardly any documentation, but if you wont take their advise, least take the advise from a programmer who has tried it. Karlkb244@kb244.8m.com Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL) RE: Terminate Process belthurgp (Instructor) (OP) 7 Jun 00 10:24 hi karl,i am not against taking microsoft documentation seriously, but i definielty think twice. There are lot of functions which windows uses and is not available for us. those undocumented functions will definitely make our lives a little bit easier, yes we have to be careful while using it. As far as TerminateProcess goes that is what the task manager does to kill it. When u say "End Task", it will send a WM_CLOSE, and if the program refuses to ack, windows will kill it. I know it's a painful procedure, but it works.All I want is my program should not be killed by Terminateprocess. any ideas. GuruPrasad Belthurbelthurgp@yahoo.comMy Personal PageCommerce Graduate, but have lived purely on computers. All the work i have done till now is only with computers and I love it. Written lot of programs that are actually small utils. Can crack MS-ACCESS Password.