When I create a signature that refers to user32.dll for example should I be building this with user64.dll if the target is a 64-bit computer?
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern bool ChangeClipboardChain(
IntPtr hWndRemove,
IntPtr hWndNewNext);
Currently this isn’t a problem as I’m targeting only 32-bit due to a library from a vendor (Progress OpenEdge) which only provide 32-bit libraries to access their database.
I don’t currently have a 64-bit windows computer to see if this is the case.
Despite the naming convention, user32.dll (and other 32… dlls) are actually 64 bit on 64 bit machines. These are the historical names for the dlls, and have been kept that way regardless of the changes to the underlying architecture. Have a read of this page to get more details.