title: CreateRemoteThread 32->64 and/or 64->32
body: <p>I need a way to CreateRemoteThread in x64 windows into both 64 and 32 bit processes. I've worked out how to find instruction set of target process, how to allocate memory in the target process for the assembly sled, and I've almost worked out what to do about address space randomization.</p>
  
  <p>I don't know how to actually start the thread on the remote process when it is of the wrong instruction set.</p>
  
  <p>Notice: I don't care which of the two problems you solve. My own exe can be either 32 or 64 bits (but I really do have to choose before I know the number of bits of the target process).</p>
  
  <p>Before somebody complains that I really shouldn't have to do this, ask Microsoft why I have to set <code>FILE_SHARE_DELETE</code> on all open handles before I can delete a file that is in use. No, there's no way around needing to delete files that other process have open either.</p>