Undoc. comctl32 mem management functions

Felix Nawothnig flexo at holycrap.org
Tue Feb 6 15:28:01 CST 2007

Hi. comctl32 exports (undocumented) Alloc() and friends which call 
LocalAlloc => GlobalAlloc => HeapAlloc since it's doesn't use any fancy 
LMEM / GMEM flags... so shouldn't Alloc() call HeapAlloc() directly?

If Global/Local* behave different than Heap* on Windows - wouldn't it 
then be desirable to replace the Alloc()/etc. calls in our comctl32 (we 
use it all over the place) by Heap*?

Reason I'm asking: Since it's not documented the Free(NULL) semantics 
are not clear (although it's safe in our implementation) - and I'm 
wondering if we really want to internally use undocumented functions 
with unclear semantics when there is an easy (documented) way.

And besides - the comctl32 code is full of "if(p) Free(p);"...


More information about the wine-devel mailing list