易截截图软件、单文件、免安装、纯绿色、仅160KB

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;


相关文档:

Delphi 设计模式:《HeadFirst设计模式》Delphi代码

一、一个叫声接口和几只鸭子
1、从一个叫声接口开始
{《HeadFirst设计模式》Delphi代码之模式小结 }
{ 一个叫声接口 }
{ 编译工具:Delphi2010 for win32 }
{ E-Mail :xshlife@163.com }

unit uQuackable;

interface

type
IQuackable = in ......

DELPHI深度探索 (第2版)PDF电子书

 推荐给大家[url=DELPHI深度探索 (第2版)PDF电子书][/url]
因为需要前几天在网上搜搜过这本书书,可没有,源码倒是有,今天打开经常去的网站,居然发现提供下载了,这个网站自己差不多每天都要打开看看,这几天忙糊涂了,居然没有看到,在这推荐给大家,能下载的,速度很快。
[url=http://www.delphifans.com/Soft ......

delphi 友元类

 在一个单元中声明的多个类互为友元类
type
TMyClass = class
GUID: string;
Name: string;
bSex: Boolean;
Tel : string;
end;
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedu ......

delphi 继承类

 继承是为了表现类与类之间“是一种”关系,是多态存在的基础,继承是面象对象必不可少的基础,只支持封装而不支持继承的语言只能称为“基于对象”(Object-Based)面非面向对象“Object-Oriented”;
Object Pascal只支持单继承,也就是一个派生类只能有一个基类
但可以实现多个接口 ......

Delphi 设计模式:《HeadFirst设计模式》Delphi7代码

1.被装饰者
{《HeadFirst设计模式》之装饰模式 }
{ 本单元中的类为被装饰者 }
{ 编译工具: Delphi7.0 }
{ E-Mail : xshlife@163.com }

unit uComponent;

interface

type
TBeverage = class(TObject) //抽象饮料类
protected
FDescription: String;
public
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号