Import external dll based on 64bit or 32bit OS
- by Mike_G
I have a dll that comes in both 32bit and 64bit version. My .NET WinForm is configured for "Any CPU" and my boss will not let us have separate installs for the different OS versions. So I am wondering: if I package both dlls in the install, then is there a way to have the WinForm determine if its 64bit/32bit and load the proper dll.
I found this article for determining version. But i am not sure how to inject the proper
way to define the DLLImport attribute on the methods i wish to use. Any ideas?