由网友(裂痕中的阳光)分享简介:我想,以确定是否本地组件符合从有管理的code应用程序的x64或x86( C#)。I want to determine if a native assembly is complied as x64 or x86 from a managed code application (C#).我认为,必须在某个地方的P...
我想,以确定是否本地组件符合从有管理的code应用程序的x64或x86( C#)。
I want to determine if a native assembly is complied as x64 or x86 from a managed code application (C#).
我认为,必须在某个地方的PE头,因为操作系统加载器需要知道这个信息,但我怎么也找不到它。当然,我preFER做到在管理code,但如果有必要,我可以用本地C ++。
I think it must somewhere in the PE header since the OS loader needs to know this information, but I couldn't find it. Of course I prefer to do it in managed code, but if it necessary, I can use native C++.
推荐答案
您可以使用的 DUMPBIN 了。使用 /头
或 /所有
标记和它的第一个文件头上市。
You can use DUMPBIN too. Use the /headers
or /all
flag and its the first file header listed.
dumpbin /headers cv210.dll
64位
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file cv210.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
8664 machine (x64)
6 number of sections
4BBAB813 time date stamp Tue Apr 06 12:26:59 2010
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL
32位
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file acrdlg.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
14C machine (x86)
5 number of sections
467AFDD2 time date stamp Fri Jun 22 06:38:10 2007
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
2306 characteristics
Executable
Line numbers stripped
32 bit word machine
Debug information stripped
DLL
查找可以使生活稍微容易:
'find' can make life slightly easier:
dumpbin /headers cv210.dll |find "machine"
8664 machine (x64)
相关推荐
最新文章