Показать сообщение отдельно
Старый 20.04.2012, 04:01   #16
Пользователь
 
Регистрация: 14.01.2011
Сообщений: 48
Сказал Спасибо: 19
Имеет 4 спасибок в 3 сообщенях
Denever пока неопределено
По умолчанию

Конечно спасибо но всеравно как-то..
Помогите пож припоять http://coderx.ru/showthread.php?t=50 к l2.ru
Примерно:
Код:
program Project1;

{$APPTYPE CONSOLE}

uses
  Windows;

var lib_NWindow:THandle;
lib:integer;
p:pointer;
OldPageProtection: Cardinal;
begin
lib_NWindow := LoadLibrary('nWindow.dll');
lib := lib_NWindow + $563D0; // ïîìåíÿòü íàäî
if VirtualProtect(pointer(lib), 6, PAGE_EXECUTE_READWRITE, OldPageProtection) then begin
writeLn('change old-new attributes.');
p := pointer(lib);
byte(p^) := $e9; writeLn('#1.');
byte(pointer(dword(p) + 1)^) := $eb; writeLn('#2.');
byte(pointer(dword(p) + 2)^) := $00; writeLn('#3.');
byte(pointer(dword(p) + 3)^) := $00; writeLn('#4.');
byte(pointer(dword(p) + 4)^) := $00; writeLn('#5.');
byte(pointer(dword(p) + 5)^) := $90; writeLn('#6.');
end;
if VirtualProtect(pointer(lib), 6, OldPageProtection, OldPageProtection) then begin
writeLn('change new-old attributes.');
end;
Readln;
end.

Последний раз редактировалось Denever, 20.04.2012 в 05:00. Причина: add code.
Denever вне форума   Ответить с цитированием