i am a beginer and am curently writing a simple password program, the program its self works fine its just that windows lets CTRL,ALT,DEL stop the program at will, is ther any way of stopping this just while the program is running.
: i am a beginer and am curently writing a simple password program, the program its self works fine its just that windows lets CTRL,ALT,DEL stop the program at will, is ther any way of stopping this just while the program is running. : Here is a small function, which will disable all keys to windows: [code] procedure DisableTaskmanager(State : boolean); var OldSysParam : longint; begin SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(State),@OldSysParam,0); end; [/code] If you pass TRUE for the state, then all keys (ctrl+alt+del, ctrl+esc, alt+tab, etc.) are disabled. The only way I know of to get into windows is to reset the computer. Note: Be sure to pass FALSE after your program is finished protecting your computer.
: : i am a beginer and am curently writing a simple password program, the program its self works fine its just that windows lets CTRL,ALT,DEL stop the program at will, is ther any way of stopping this just while the program is running. : : : Here is a small function, which will disable all keys to windows: : [code] : procedure DisableTaskmanager(State : boolean); : var : OldSysParam : longint; : begin : SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(State),@OldSysParam,0); : end; : [/code] : If you pass TRUE for the state, then all keys (ctrl+alt+del, ctrl+esc, alt+tab, etc.) are disabled. The only way I know of to get into windows is to reset the computer. Note: Be sure to pass FALSE after your program is finished protecting your computer. :
Looks good, but where is the unit containing "SystemParametersInfo"?
: : : i am a beginer and am curently writing a simple password program, the program its self works fine its just that windows lets CTRL,ALT,DEL stop the program at will, is ther any way of stopping this just while the program is running. : : : : : Here is a small function, which will disable all keys to windows: : : [code] : : procedure DisableTaskmanager(State : boolean); : : var : : OldSysParam : longint; : : begin : : SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(State),@OldSysParam,0); : : end; : : [/code] : : If you pass TRUE for the state, then all keys (ctrl+alt+del, ctrl+esc, alt+tab, etc.) are disabled. The only way I know of to get into windows is to reset the computer. Note: Be sure to pass FALSE after your program is finished protecting your computer. : : : : Looks good, but where is the unit containing "SystemParametersInfo"? : : : Iby : : It should be in the WinProcs or Windows function. If it is not, then here it is directly from the source: [code] const SPI_SCREENSAVERRUNNING = 97;
function SystemParametersInfo(uiAction, uiParam: LongWord; pvParam: Pointer; fWinIni: LongWord): boolean; stdcall; external 'user32.dll' name 'SystemParametersInfoA'; [/code] This only works within a windows environment. If your version of pascal doesn't recognize the name directive, then you need to change the function name to the one listed.
im not sure about this,but i have read sometime ago something about that topic on the msdn.there where an article about disabling crtl-alt-del on Win9x machines.i think there was something,that your way doesnt work on WinNT/ME/XP machines.they also have a article about doing this on newer win32-OSes with services or so.it looks fairly complicated.
: im not sure about this,but i have read sometime ago something about that topic on the msdn.there where an article about disabling crtl-alt-del on Win9x machines.i think there was something,that your way doesnt work on WinNT/ME/XP machines.they also have a article about doing this on newer win32-OSes with services or so.it looks fairly complicated. : It works on ME (I'm using it right now), as for the other systems, it is very difficult (if not impossible) to trap crtl-alt-del. I know of just one way to do it, but cannot implement it myself. Your programs needs to read the keyboard-port directly, even before windows. Then if it sees a crtl-alt-del, you can trap it and not send it to windows.
Comments
:
Here is a small function, which will disable all keys to windows:
[code]
procedure DisableTaskmanager(State : boolean);
var
OldSysParam : longint;
begin
SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(State),@OldSysParam,0);
end;
[/code]
If you pass TRUE for the state, then all keys (ctrl+alt+del, ctrl+esc, alt+tab, etc.) are disabled. The only way I know of to get into windows is to reset the computer. Note: Be sure to pass FALSE after your program is finished protecting your computer.
: :
: Here is a small function, which will disable all keys to windows:
: [code]
: procedure DisableTaskmanager(State : boolean);
: var
: OldSysParam : longint;
: begin
: SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(State),@OldSysParam,0);
: end;
: [/code]
: If you pass TRUE for the state, then all keys (ctrl+alt+del, ctrl+esc, alt+tab, etc.) are disabled. The only way I know of to get into windows is to reset the computer. Note: Be sure to pass FALSE after your program is finished protecting your computer.
:
Looks good, but where is the unit containing "SystemParametersInfo"?
Iby
: : :
: : Here is a small function, which will disable all keys to windows:
: : [code]
: : procedure DisableTaskmanager(State : boolean);
: : var
: : OldSysParam : longint;
: : begin
: : SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(State),@OldSysParam,0);
: : end;
: : [/code]
: : If you pass TRUE for the state, then all keys (ctrl+alt+del, ctrl+esc, alt+tab, etc.) are disabled. The only way I know of to get into windows is to reset the computer. Note: Be sure to pass FALSE after your program is finished protecting your computer.
: :
:
: Looks good, but where is the unit containing "SystemParametersInfo"?
:
:
: Iby
:
:
It should be in the WinProcs or Windows function. If it is not, then here it is directly from the source:
[code]
const
SPI_SCREENSAVERRUNNING = 97;
function SystemParametersInfo(uiAction, uiParam: LongWord;
pvParam: Pointer; fWinIni: LongWord): boolean;
stdcall; external 'user32.dll' name 'SystemParametersInfoA';
[/code]
This only works within a windows environment. If your version of pascal doesn't recognize the name directive, then you need to change the function name to the one listed.
:
It works on ME (I'm using it right now), as for the other systems, it is very difficult (if not impossible) to trap crtl-alt-del. I know of just one way to do it, but cannot implement it myself. Your programs needs to read the keyboard-port directly, even before windows. Then if it sees a crtl-alt-del, you can trap it and not send it to windows.