Use:

// start of image to relocate
pVoid imageStart = ...;
switch (LdrIsValidPeImage(imageStart))
{
    case 1: // x86
    {
        // address to relocate to
        pVoid target = IntToPointer(1024*1024);
        // copy and relocate image.
        pImageHeader ih = LdrCopyImagex86((pImageHeader)imageStart, target);
        // used to calculate size of relocated image
        pVoid endOfImage = LdrGetImageEndPointer(ih);
        // get entry point
        pStage2EntryPoint entry = (pStage2EntryPoint)LdrRelocateImagex86(ih);
        // invoke enty point.
        (*entry)(&LdrServices32);
    }
    case 2: // x64
    {
        ...
    }
    default:
    {
        // No valid PE image found.
        LdrWriteErrorAndReboot(L"No PE image found.");
    }
}


Header files contain lots of probably irrelevant definitions. Ignore them.
