简体   繁体   中英

Can i read file properties from unmanged .dll or .exe in .NET

How can i read file informations like title, description, copyright etc from unmanaged dlls and exe, written in c++, with C#?

I know how to get these informations from managed code with MetadataLoadContext , but loading an C++ Exe/DLL will throw an exception: System.BadImageFormatException: This PE image is not a managed executable .

Just use System.Diagnostics.FileVersionInfo instead of reflection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM