Hello
Friends
Sorry For My Bad English
I want to hook terminate process api and prevent my application to close by ctrl+alt+del
any solution for vb6?
thanks
Printable View
Hello
Friends
Sorry For My Bad English
I want to hook terminate process api and prevent my application to close by ctrl+alt+del
any solution for vb6?
thanks
Hi soda120, welcometo VBForums! :wave:
That sounds like a rather odd thing to do - why do you not want the user to have the ability to close your program?
I write a program with father-child technology . and my child must be real time checking of cpu (in a systematic center that i work) .then my child program must be open for ever. and i found that the hooking of terminate process can help me
please help me
and thnaks for your welcome to me.
I very much doubt that you will be able to prevent the process being closed by the Task Manager. If you need it to be open throughout the duration of the session I would reccomend that you consider implementing it as a service instead.
excuse me for my english, i'm italian
in the form_unload subroutine or on command exit button insert End
so it will close all forms that you have opened
father and child
the end command terminates the program and all of its components in a very "Unclean" if you will mannor
What ? :eek:Quote:
Originally Posted by penagate
Please More help or a example .
thanks my friend
If the application is running on an XP machine MS has made provisions for this (I just recently learned) type of situation - simply disable the Task Manager with a registry setting. Oh, in case you lock yourself out of something playing with the settings in this area don't say I didn't warn you..I had to write a script to unlock some of this stuff!
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskmgr
Well apparently this is the "easiest" way to create an service in VB6.
http://www.vbrad.com/pf.asp?p=source/tip_service_vb.htm
If I was doing it myself I'd steer clear due to the use of an OCX control, which seems a bit of a clumsy way of doing it, but try it and see if it works for you. If it does then no problems :)
I suggested a service as services cannot be closed using the task manager. They must be manually stopped using the Service snap-in in Computer Management.
you can hide your application from task manager with Hook NtQuerySystemInformation
but it is very complicated, i have the source in c++ from www.codeproject.com
with 2 project from this site, i made a DLL that can :
- disable CTRL-ALT-DEL in win2k/xp
- hide application from task manager
- disable task manager
- disable keys (alt-space, alt-tab, ctrl-esc, alt-esc, ctrl-shift-esc, win key, app popup key)
***EDIT***
i made a much simpler version in vb6 without Hook
but it remove all items in task manager list
Thanks My Friends.
I will test these and then come back
thanks again
sergelac sorry but that is a very bad idea altogether. What if the person has another taskmanager ? I know I do.
OMGQuote:
Originally Posted by Cr250
your right, i just downloaded "security task manager"
and it show my hidden program with Hook NtQuerySystemInformation
but most people use the standard windows task manager