文章内容
之前写的一点windows下编程的内容,每一篇都会设立几个目标(题目来自国外某大学),并写一个可运行的实例出来用于熟悉各种API,并把相关的API的官方MSDN文档附上,大伙可自行参考学习相关API用法
进程默认堆中分配内存的示例一共有三个部分,该部分为第二部分,其余部分传送如下:
(一)
(三)
目标
原版
You should implement a function, which performs the following actions:
- Create a new private process’s heap using the HeapCreate function.
- Allocate a memory region (buffer) in the created heap for storing 10 elements of DWORD type. The allocated memory region should initially be initialized with zero values (HEAP_ZERO_MEMORY flag).
- Get the size of the allocated memory region using the HeapSize function and disp