首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

退出程序时出现“access violation at address 7C95F350 in module "ntdll dll "wri

2012-03-24 
退出程序时出现“access violation at address 7C95F350 in module ntdll dll ,write of address 0000002

退出程序时出现“access violation at address 7C95F350 in module "ntdll dll ",write of address 00000020” 怎样解决
当我退出程序时出现“access violation at address 7C95F350 in module "ntdll dll ",write of address 00000020”错误提示框, 怎样解决

[解决办法]
关闭的时候出现CPU窗口 : ntdll.DbgBreakPoint 的解决方法,我不知道你的是不是这种现象



Delphi(Pascal) code
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;initialization  begin    PatchInt3; //防止关闭窗口时出现CPU:  ntdll.DbgBreakPoint  end;
[解决办法]
照这个错误提示的意思是,你在访问一个已经被释放了的对象。
仔细检查。

ps: AV错误就两种,一种地址全0,表示访问一个还没创建的对象。还有一种地址不全0,表示对象已经释放掉了还在访问。
这个应该很好理解的。

热点排行