易截截图软件、单文件、免安装、纯绿色、仅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图像处理

    本文的线性亮度/对比度调整方法是在《改进的图像线性亮度调整方法》一文中线性亮度调整方法与《Delphi图像处理 -- Photoshop图像亮度/对比度调整》中的对比度调整方法基础上形成的,其原理和特点可参见这2篇文章:
    过程定义:
// 线性调整亮度,Value亮度值
procedure ImageL ......

Delphi图像处理

    本文是基于《GDI+在Delphi程序的应用 – Photoshop色相/饱和度/明度功能》一文的BASM实用性过程,有关实现原理可参见《GDI+ 在Delphi程序的应用 -- 图像饱和度调整》和《GDI+ 在Delphi程序的应用 -- 仿Photoshop的明度调整》,纯PAS实现代码和测试例子代码见《GDI+在Delphi程序的应用 – Phot ......

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

1. 产品类
{《HeadFirst设计模式》工厂模式之简单工厂 }
{ 产品类 }
{ 编译工具 :Delphi7.0 }
{ 联系方式 :xshlife@163.com }

unit uProducts;

interface

type
TPizza = class(TObject)
public
procedure Prepare; virt ......

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 设计模式:《HeadFirst设计模式》Delphi7代码

1. 复杂的子系统
unit uSubObject;

interface

type

{ TAmplifier与TTuner,TCDPlayer,TDVDPlayer相互依赖。 }
{ 在TTuner等的简单实现时用不到对TAmplifier的引用, }
{ 但现实生活中就应该让TAmplifier提供服务,所以这里保留了。 }
{ TProjector对T ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号