避免重新初始化关键部分

发布于 2024-07-16 19:42:30 字数 336 浏览 5 评论 0原文

我有一个 dll,它创建一个全局临界区、初始化并使用它。

现在,第三方应用程序多次使用/加载 dll,这会导致堆损坏。

appverifier 警告我

--> VERIFIER STOP 00000211:pid 0x1470:关键部分已初始化。 <--

使用全局标志来检查关键部分对象是否已初始化没有帮助,有什么想法可以实现相同的目的吗?

谢谢

I have a dll that creates a global critical section, initializes and use it.

Now a third party application is using / loading the dll more than once which leads to a heap corruption.

The appverifier warns me with a

-->
VERIFIER STOP 00000211: pid 0x1470: Critical section is already initialized.
<--

Using a global flag to check if the critical section object is already initialized doesn't help, any ideas on accomplishing the same ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

骄兵必败 2024-07-23 19:42:30

现在第三方应用程序正在多次使用/加载 dll

Windows 不会多次重新加载同一 DLL。 其中相同表示相同的路径。 如果第 3 方应用程序从不同位置加载,那就是问题所在。

Now a third party application is using / loading the dll more than once

Windows does not reload the same DLL multiple times. Where same means same path. If the 3rd party app is loading from different locations, that is the problem.

我的奇迹 2024-07-23 19:42:30

可能使用“setAtom”和“getAtom”API 有帮助吗? 我知道他们有点“老派”,但你永远不会知道。

May be using the "setAtom" and "getAtom" APIs help? I know they are a bit "old-school" but you can never know.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文