Archived Forum Post

Index of archived forum posts

Question:

Proper method of using AnyCPU and dynamically loading the correct 32/64 bit DLL (.NET)

Jun 08 '16 at 18:23

Hi everyone.

Can someone please illustrate how to use AnyCPU and somehow dynamically load the correct Chilkat DLL (32 or 64 bit) depending on OS? Is this possible?

All of my other DLLs (mostly DevExpress) work fine in AnyCPU mode so I just need to make Chilkat work the same way so I don't have to create two separate versions every new build.

I am using VB.NET, 4.0 Framework.

Thanks for your help.


Answer

Here are two links to pages with information about it:

http://cknotes.com/dynamically-loading-net-assembly-32-bit-or-64-bit/

http://www.codeproject.com/Articles/528178/Load-DLL-From-Embedded-Resource