文章内容
之前写的一点windows下编程的内容,每一篇都会设立几个目标(题目来自国外某大学),并写一个可运行的实例出来用于熟悉各种API,并把相关的API的官方MSDN文档附上,大伙可自行参考学习相关API用法
进程默认堆中分配内存的示例一共有三个部分,该部分为第三部分,其余部分传送如下:
(一)
(二)
目标
原版
You should implement a function, which performs the following actions:
- Allocate the memory region (buffer) in the address space of the process using the VirtualAlloc function sufficient to store 10 elements of DWORD type. The type of memory allocation (the third parameter of the VirtualAlloc function) should be set in MEM_COMMIT | MEM_RESERVE. The type of access to the memory region (the fourth parameter of the VirtualAlloc f