How to determine the CPU type of a .dll file by .NET compact framework?
I need to be able to lookup the type o开发者_开发知识库f CPU for which a native .dll file is intended. When the CPU type is same as the CPU on which my application is running, my application will use the .dll files to do some operations. I would like to do this task using .Net Compact Framework.
You should open the dll file as a binary stream and interpret it. The format of a dll is PE - Portable Executable: http://msdn.microsoft.com/en-us/windows/hardware/gg463119 and somewhere here the CPU type is specified. I've google it a little and I've found something that you could use as an example: http://wiki.tcl.tk/9351
精彩评论