Check a dll is x64 or x86

Just read two good articles on this topic:

http://stackoverflow.com/questions/480696/how-to-find-if-a-native-dll-file-is-compiled-as-x64-or-x86/

http://stackoverflow.com/questions/1001404/check-if-unmanaged-dll-is-32-bit-or-64-bit

To recap:

For native dlls, we can use:

dumpbin /headers cv210.dll

For .NET dlls, we can use:

corflags "C:WindowsMicrosoft.NETFrameworkv2.0.50727System.Data.dll"

You're looking at PE and 32BIT specifically.

    • Any CPU:

      PE: PE32
      32BIT: 0

    • x86:

      PE: PE32
      32BIT: 1

    • x64:

      PE: PE32+
      32BIT: 0

原文地址:https://www.cnblogs.com/feishunji/p/3820240.html