网站首页  词典首页

请输入您要查询的函数:

 

术语 heapunlock
释义 HeapUnlock
语法:
C++
BOOL WINAPI HeapUnlock(
__in HANDLE hHeap
);
HeapUnlock功能
发布所有权临界区对象,或锁定,这是与指定的堆关联。这颠倒了的HeapLock功能的行动。
参数
hHeap [in]
阿堆句柄被锁定。这是处理无论是HeapCreate或GetProcessHeap函数返回。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该HeapLock功能主要是防止有用的分配和释放堆内存,而其他线程调用线程使用HeapWalk功能。该HeapUnlock职能是HeapLock逆。
每个HeapLock的要求,必须有相应的相应调用HeapUnlock功能。不调用HeapUnlock将阻止调用进程的任何其他线程执行的尝试访问堆。
如果HeapUnlock功能上与HEAP_NO_SERIALIZATION旗创建了一个名为堆,结果是不确定的。
实例
他列举了堆
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
堆函数
HeapLock
HeapWalk
内存管理功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==HeapUnlock Function
Releases ownership of the critical section object, or lock, that is associated with a specified heap. It reverses the action of the HeapLock function.
Syntax
C++
BOOL WINAPI HeapUnlock(
__in HANDLE hHeap
);
Parameters
hHeap [in]
A handle to the heap to be unlocked. This handle is returned by either the HeapCreate or GetProcessHeap function.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The HeapLock function is primarily useful for preventing the allocation and release of heap memory by other threads while the calling thread uses the HeapWalk function. The HeapUnlock function is the inverse of HeapLock.
Each call to HeapLock must be matched by a corresponding call to the HeapUnlock function. Failure to call HeapUnlock will block the execution of any other threads of the calling process that attempt to access the heap.
If the HeapUnlock function is called on a heap created with the HEAP_NO_SERIALIZATION flag, the results are undefined.
Examples
Enumerating a Heap
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Heap Functions
HeapLock
HeapWalk
Memory Management Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa366707(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:25:14