Check if unmanaged DLL is 32-bit or 64-bit?

后端 未结 5 1733
一生所求
一生所求 2020-11-30 21:47

How can I programmatically tell in C# if an unmanaged DLL file is x86 or x64?

5条回答
  •  我在风中等你
    2020-11-30 22:04

    Instead of Assembly.LoadFile, use Assembly.ReflectionOnlyLoadFrom. This will let you work around the "Bad Image Format" exceptions.

提交回复
热议问题