Overwriting global memory that you didn't allocate.... the memory directly after your allocated block could be in use by another allocation, so that memory is corrupted
You can't overwrite global memory you did not allocate. You get an immediate protection fault, not corruption. (Win/32). (or maybe now I should say Win/32+ ?)
Both STRING$ and GlobalAlloc allocate from the heap, which is about as close as any process can come to "global" memory.. but true "global memory" only exists in Win/32 when you create a system object (eg a memory mapped file) specifically for that purpose.
MCM
Leave a comment: