more heap allocation stuff plus shifting around the HeapCreate function signature