Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What function has replaced GlobalAlloc in Win32?

Since GlobalAlloc has become local in the 32 bit model, it can't be used so that allocated memory to be shared between Win32 applications. What function is replacing GlobalAlloc and uses the same simplicity? (Like retrieving a handler to the memory block, which is converted to pointer later by the application that uses it.)

like image 829
user123189 Avatar asked Nov 01 '25 07:11

user123189


1 Answers

The way you share memory between processes in Win32 is with memory mapped files. Start with CreateFileMapping and MapViewOfFile.

like image 163
David Heffernan Avatar answered Nov 04 '25 07:11

David Heffernan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!