Windows CE下通过LoadLibraryW()获取HINSTANCE后如何获取PE文件的基地址?
因为 HMODULE 与 Windows CE 下加载的 PE 的加载地址不同。通过LoadLibraryW()获取HINSTANCE后如何获取加载地址?
As a HMODULE isn't the same as the load address of a loaded PE under Windows CE. How can I get the load address after geting the HINSTANCE by LoadLibraryW()?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那么我建议您阅读这篇文章:http://support.microsoft.com/kb/326163 它会对你有帮助。您首先需要了解 WinCE 的工作原理,我指的是内存架构。
这个想法是 WinCE 有一个称为 XIP 的功能 - 就地代码执行,因此可以从 ROM 或闪存(通常是 NOR)加载代码。这可以让您节省宝贵的 RAM。当然,它仍然是加载要在 RAM 中执行的代码的经典方法。这里有一个权衡,从 RAM 执行会更快,但如果您的模块的性能对就地代码执行并不重要,那就没问题了。
第一个链接很旧,但它可以帮助您获取图片。第二个链接更相关:http://msdn.microsoft.com/en- us/library/bb331824.aspx 因为它针对的是 WinCE 6.0(因此它也适用于 WinCe 7.0)。所以你应该看看你的模块是什么类型的 dll,我认为不同的算法可能适用于每种情况。
无论如何,这是一项艰巨的任务:)成功!请分享您所获得的知识!我也很好奇。
Well I recommend you to read this article: http://support.microsoft.com/kb/326163 it will help you. You need to understand first how WinCE works, the memory architecture I mean.
The idea is that WinCE has a feature called XIP - In Place Code execution, so the code can be loaded from ROM or Flash (usually NOR). This allows you to save valuable RAM. Of course it remains also the classic way to load the code to be execute in RAM. Here there is a trade-off, the execution will be faster from RAM, but if you have modules where the performance is not critical In Place Code execution it's fine.
The first link is quite old, but it helps you to get a picture. This second link is more relevant: http://msdn.microsoft.com/en-us/library/bb331824.aspx because it is targeting WinCE 6.0 (so it applies for WinCe 7.0 too). So you should see what kind of dll is it your module and I think that different algorithms may apply for each case.
Anyway is a daunting task :) success! Please share with was the knowledge you gained! I am curious too.