>>Look at the UDFs in my ClsHeap class; I'd recommend using ClsHeap rather than the in-line code approach shown here for handling the memory issues. The class comments describe what's going on in detail; there are examples of the use of lstrcopy() and RtlMoveMemory in detail in the code that can be used for reference, and the management of the memory space is simplified. It uses a private heap rather than the global memory pool, which may be significant if you ever try running in a multithreaded environment
>
>Yes, but in case of interprocess operations (such as clipboard functions) the use of global heap is required.
In Win16; under all Win32 environments, it's a linear address space, and the gloabal heap has no existence outside the process space, unlike Win16 where the global heap is shared by all Win16 apps. See Jeff Richter's "Advanced Windows" for a thorough discussion.