Setting dllimport programmatically in C#

后端 未结 9 1972
情话喂你
情话喂你 2020-12-30 11:10

I am using DllImport in my solution.
My problem is that I have two versions of the same DLL one built for 32 bit and another for 64 bit.

They both e

9条回答
  •  孤独总比滥情好
    2020-12-30 11:33

    One alternative option is to have both the 32- and 64-bit versions of the unmanaged DLL have the same name, but have them live in separate folders in your build output (say, x86\ and x64\).

    Then, your installer or however else you're distributing this is updated so it knows to install the proper DLL for the platform it's installing on.

提交回复
热议问题