![](/img/trans.png)
[英]How can I access a running instance of a .NET standalone executable from a .NET Dll or Exe?
[英]Can i read file properties from unmanged .dll or .exe in .NET
如何使用 C# 從非托管 dll 和 exe 中讀取文件信息,如標題、描述、版權等,用 c++ 編寫?
我知道如何使用MetadataLoadContext
從托管代碼中獲取這些信息,但是加載 C++ Exe/DLL 將引發異常: System.BadImageFormatException: This PE image is not a managed executable
。
只需使用System.Diagnostics.FileVersionInfo
而不是反射。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.