开发者

Check the compatibility of the dll to work on 32/64 bit

How to check the compatibility of a dll to work on 32 bit / 64 bit? is there any tool 开发者_如何学编程available to check this? I saw somewhere that we can use coflags, but wont be ableto read native dll it seems. Somewhere i read few other things like IMAGE_FILE_HEADER. How can i do this check.


You want to read the PE Header and then read the IMAGE_OPTIONAL_HEADER and read the field named "Magic". The magic field will have the following values:

  • 0x010b 32 bit PE File
  • 0x020b 64 bit PE File
  • 0x0107 ROM Image file (in practice you are unlikely to ever see this value)

More details can be found in .Net 2.0 IL Assembler, Chapter 4, which describes the PE format in detail.

If you want a PE file reader DLL (with source) and a GUI that uses the DLL (with source) take a look atPE File Format DLL. Its open source with any GPL encumberence. Use the software as you see fit (take it closed if that suits your needs).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜