Of course you must allocate a new block, but you must not copy the temporary data you had in the old one.

With HeapReAlloc you can do something similar to:

	realloc = HeapReAlloc(..., HEAP_REALLOC_IN_PLACE_ONLY, mem, ...);
	if(!realloc)
	{
		HeapFree(..., mem, ...);
		mem = HeapAlloc(...);
	}