未分类--Windows API--GetProcessHeap Function

150 篇文章 0 订阅
31 篇文章 0 订阅

原文来自MSDN Library for Visual Studio 2008 SP1,翻译部分仅为个人观点,想要看更多信息请看MSDN,如有版权问题请联系QQ 64316601,邮件643166601@qq.com

 

GetProcessHeap Function

Retrieves a handle to the heap of the calling process. This handle can then be used in subsequent calls to the heap functions.
获得一个句柄指向调用进程堆。这个句柄就可以在后来调用堆函数中被使用。

Syntax
HANDLE WINAPI GetProcessHeap(void);

Parameters
This function has no parameters.
这个函数没有参数。
Return Value
If the function succeeds, the return value is a handle to the calling process's heap.
如果函数成功,返回值是一个句柄指向调用进程的堆。
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
如果函数失败,返回值是NULL。获得额外信息。请调用GetLastError。
Remarks
The GetProcessHeap function allows you to allocate memory from the process heap without having to first create a heap using the HeapCreate function.
这个GetProcessHeap函数允许你从进程堆申请内存,不用首先使用HeapCreate函数创建一个堆。
By default, the process heap is a standard heap. To use the low-fragmentation heap, call the HeapSetInformation function.
默认情况下,这个进程堆是一个标准的堆。要使用低碎片堆,调用HeapSetInformation函数。
Example Code
For an example, see AWE Example.
一个例子,请看AWE Example

Requirements
Client Requires Windows Vista, Windows XP, or Windows 2000 Professional.
Server Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
Header Declared in Winbase.h; include Windows.h.
 
Library Use Kernel32.lib.
 
DLL Requires Kernel32.dll.
 

See Also
Heap Functions
HeapAlloc
HeapCreate
HeapDestroy
HeapFree
HeapReAlloc
HeapSize
Memory Management Functions

 

Send comments about this topic to Microsoft

Build date: 4/24/2008

 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值