gpt4 book ai didi

windows - LoadLibrary 引用计数

转载 作者:可可西里 更新时间:2023-11-01 13:30:39 28 4
gpt4 key购买 nike

来自 MSDN :

The system maintains a per-process reference count on all loaded modules. Calling LoadLibrary increments the reference count.

引用计数存储在哪里?

最佳答案

实际的 Windows 加载程序在 NTDLL.dll 的 LdrLoadDll 中找到功能。此功能未记录,其内部功能可能会在未来的 Windows 版本中发生变化;只有有权访问 Windows 源代码的人才能确定幕后发生的事情。

然而,wine的来源是可用的,你可以看到where it increments the reference count ;它存储在 LDR_MODULE 的 LoadCount 成员中堆结构。由于这似乎不是 wine 内部结构,因此该结构很可能是基于真实的、逆向工程的 windows 结构,因此 windows 可能以相同的方式存储它。但是,由于这没有记录,因此它可能会在任何 future 版本的 Windows 中发生更改,甚至可能会使用较小的 Windows 补丁。

关于windows - LoadLibrary 引用计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3809767/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com