Create declerations for the functions you are going to call.
HANDLE (WINAPI *myHeapCreate)( DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize );
LPVOID (WINAPI *myHeapAlloc)( HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes);
HMODULE kernel32dll = GetModuleHandleA("kernel32.dll");
myHeapCreate = GetProcAddress(kernel32dll, "HeapCreate");
myHeapAlloc = GetProcAddress(kernel32dll, "HeapAlloc");
HANDLE hHeap = myHeapCreate(HEAP_CREATE_ENABLE_EXECUTE, 0, 0);
void* hmem = myHeapAlloc(hHeap, 0, 0x1000);
You can ideally encode hardcode strings like "kernel32.dll", "HeapCreate" etc.