gpt4 book ai didi

c++ - 'CloseToolhelp32Snapshot' : identifier not found

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

我正在使用基于“WIN32 工具帮助功能”的内存监控库。

在其源代码中调用了 CreateToolhelp32Snapshot()Heap32ListFirst()Heap32ListNext()CloseToolhelp32Snapshot( )

我的问题是相关的 windows 头文件中没有 CloseToolhelp32Snapshot() 的原型(prototype)。

我正在尝试为 Windows PC 平台编译(确切地说是 Win7,但我认为它与 XP 没有区别)。

我在网上搜索了一下,一些中国人说我必须在 PC 平台上使用 CloseHandle() 而另一些人说它会产生内存泄漏。

使用后如何正确关闭 handle ?

感谢您的帮助!

最佳答案

CreateToolhelp32Snapshot 的文档说:

To destroy the snapshot, use the CloseHandle function.

CloseToolhelp32Snapshot 似乎仅适用于 WinCE/Mobile。

关于c++ - 'CloseToolhelp32Snapshot' : identifier not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18019346/

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