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