I do not think that's possible. If you are using .net, compile the project for "Any processor." In your post-assembly, copy the dll and run CorFlags.exe / 32BIT + so that the copied dll starts the 32-bit version, while the original will run on x64 on the x64 OS.
source share