How to detect that a given PE file (exe or dll) is 64 bit or 32 bit

后端 未结 2 1147
既然无缘
既然无缘 2020-12-09 21:34

I need to detect whether a given .dll or .exe file is 32 bit or 64 bit

At the moment I have only one solution: read the PE Header from the specified file and take th

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 22:09

    Check this: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680339%28v=vs.85%29.aspx Look for "Magic" member - you can find out whether PE header is 32 bit(PE32) or 64 bit(PE32+).

提交回复
热议问题