One is provided by win32, another by the Standard C libraries. One is
portable across multiple platforms, another is not. Both of them allocate a
specified amount of memory, both return zero when they fail. LocalAlloc() is
mostly for compatibility with 16 bit Windows. Modern C/C++ programs should
use malloc() or the operator new to allocate memory.
S
"Slava M. Usov" <stripit...@gmx.net> wrote in message
news:uN2TLwDUCHA.1668@tkmsftngp13...
"Tom Stewart" <tast...@msdn.microsoft.com> wrote in message
news:#n$EgdEUCHA.1864@tkmsftngp12...
PVOID pvFoo = malloc(10);
LocalFree(pvFoo);
Conceptually, they're different allocators, and the acquire/free APIs used
must match.
--
Jon Wiswall - Microsoft
This posting is provided AS IS with no warranties, and confers no rights.
"Jeff Henkels" <je...@mapson.privatemail.com> wrote in message
news:#Q2znUGUCHA.2320@tkmsftngp12...