在D2006应用程序中获取外部异常C0000006 - 如何强制delphi加载整个可执行文件? [英] Getting External Exception C0000006 in D2006 app - how can I force delphi to load the whole executable?

查看:224
本文介绍了在D2006应用程序中获取外部异常C0000006 - 如何强制delphi加载整个可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我退出我的应用程序时,我偶尔会收到这个消息 - 我的应用程序正在通过网络运行EXE。我明白这是一个页面错误,当EXE的一部分是按需加载的。

I get this occasionally when exiting my app - my app is running the EXE over a network. I understand it's a page fault when part of the EXE is loaded on demand.

我也在TDrawGrid的OnDrawCell方法中观察到,所以我很神秘这可能导致页面加载。另外,这个例外情况一直在发生。

I have also observed it in the OnDrawCell method of a TDrawGrid, so I'm mystified how that might have caused a page load. Also, the exception kept happening.

所以我的问题:

可以由其他原因导致错误C0000006?我对应用程序管理内存的方式做了相当大的改变,虽然没有什么是普通的,我相信代码行为。

Can Error C0000006 result from other causes? I have made fairly major changes to the way the app manages memory, though nothing out of the ordinary, and I'm confident the code is behaving.

你怎么能应用程序在启动时将其全部加载到内存中(在Delphi 2006中 - 我了解有关Delphi的更高版本的指令)。

How can you make the app load all of itself into memory on startup (in Delphi 2006 - I understand there are directives for later versions of Delphi).

TIA

推荐答案

指令 $ SetPEFlags 似乎是Delphi 2006的一部分,至少哈尔滨谈论它在D2006的上下文中这篇文章。看看这里如何使用它。

The directive $SetPEFlags seems to be part of Delphi 2006, at least Hallvard talks about it in this article in the context of D2006. Have a look here on how to use it.

这篇关于在D2006应用程序中获取外部异常C0000006 - 如何强制delphi加载整个可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆