delphi µ÷ÊÔʱ×ܳöÏÖcpu´°¿Ú£¬ntdll.dllµãµÄ½â¾ö·½·¨
ÔÚÖ÷½çÃæµÄimplementation {$R *.dfm} Ï·ÅÈëÒÔÏ´úÂ룺
procedure PatchInt3;
var
NOP: Byte;
NTDLL: THandle;
BytesWritten: DWORD;
Address: Pointer;
begin
if Win32Platform <> VER_PLATFORM_WIN32_NT then
Exit;
NTDLL := GetModuleHandle('NTDLL.DLL');
if NTDLL = 0 then
Exit;
Address := GetProcAddress(NTDLL, 'DbgBreakPoint');
if Address = nil then
Exit;
try
if Char(Address^) <> #$CC then
Exit;
NOP := $90;
if WriteProcessMemory(GetCurrentProcess, Address, @NOP, 1, BytesWritten) and (BytesWritten = 1) then FlushInstructionCache(GetCurrentProcess, Address, 1);
except // Do not panic if you see an EAccessViolation here, it is perfectly harmless!
on EAccessViolation do ;
else
raise;
end;
end;
È»ºóÔÚ´°ÌåµÄCreateÖе÷Óà PatchInt3 £»»òÕßÔÚ´°Ìå´úÂëµÄ×îºóÒ»¸öend.ǰ¼ÓÈëһϴúÂë¼´¿ÉÒÔ½â¾ö
//-------------------------------------------------------------- i
nitialization
begin
PatchInt3; //·ÀÖ¹¹Ø±Õ´°¿Úʱ³öÏÖCPU: ntdll.DbgBreakPoint
end;
Ïà¹ØÎĵµ£º
ÍÆ¼ö¸ø´ó¼Ò[url=DELPHIÉî¶È̽Ë÷ £¨µÚ2°æ£©PDFµç×ÓÊé][/url]
ÒòΪÐèҪǰ¼¸ÌìÔÚÍøÉÏËÑËѹýÕâ±¾ÊéÊ飬¿ÉûÓУ¬Ô´Âëµ¹ÊÇÓУ¬½ñÌì´ò¿ª¾³£È¥µÄÍøÕ¾£¬¾ÓÈ»·¢ÏÖÌṩÏÂÔØÁË£¬Õâ¸öÍøÕ¾×Ô¼º²î²»¶àÿÌì¶¼Òª´ò¿ª¿´¿´£¬Õ⼸ÌìæºýÍ¿ÁË£¬¾ÓȻûÓп´µ½£¬ÔÚÕâÍÆ¼ö¸ø´ó¼Ò£¬ÄÜÏÂÔØµÄ£¬ËٶȺܿ졣
[url=http://www.delphifans.com/Soft ......
ÊÊÅäÆ÷ģʽµÄÖ÷ÒªÒâͼÊǶÔÏÖÓÐÀàµÄ½Ó¿Ú½øÐÐת»»£¬ÒÔÂú×ãÄ¿±êÀàµÄÐèÇ󡣯ä´Î£¬¿ÉÒÔ¸øÄ¿±êÀàµÄ½Ó¿ÚÌí¼ÓеÄÐÐΪ£¨Ö÷ÒªÖ¸·½·¨£©¡£ÕâÒ»µãÈÝÒ×Óë×°ÊÎģʽ»ìÏý¡£´ÓÒâͼ·½ÃæÀ´¿´£¬×°ÊÎģʽ²»¸Ä±ä£¨Í¨³£Ö¸Ôö¼Ó£©½Ó¿ÚÖеÄÐÐΪ£¨Ö÷ÒªÖ¸·½·¨£©£¬¶øÊÇÔÚÔÓÐÐÐΪ£¨Ö÷ÒªÖ¸·½·¨£©µÄ»ù´¡ÉÏÌí¼ÓÐµĹ¦ÄÜ£»´ÓÀà½á¹¹· ......
1.²ßÂÔÀà
{¡¶HeadFirstÉè¼ÆÄ£Ê½¡·Ö®²ßÂÔģʽ }
{ ±¾µ¥ÔªÖеÄÀàΪ²ßÂÔÀà }
{ ±àÒ빤¾ß: Delphi7.0 }
{ E-Mail : xshlife@163.com }
unit uStrategy;
interface
type
{·ÉÐнӿڣ¬¼°ÆäʵÏÖÀà }
IFlyBehavior = Interface(IInterface)
procedure Fly;
......