one is
Virtualallocc, Function prototype:
LPVOID Virtualalloc (LPVOID LPADDRESS, DWORD DWSIZE, DWORD FLALLOCTIONTYPETYPETYPETYPETYPETYPETYPE, DWORD FLPROTECT); if the first parameter is NULL, the allocated memory must be a memory start address of 64K, even if you only assign a word
Section.
the other is
Localalloc, function prototype
Hlocal Localaloc (uint uflags, uint ubytes); this is more user-friendly, and does not assign memory with 64K as a zone, usually use this time
It is better.
After dynamic allocation, don't forget to release, corresponding to the two memory allocation functions, the released functions are VirtualFree, respectively, respectively.
Localfree.