【发布时间】:2015-11-26 20:30:41
【问题描述】:
这是一个项目rawinput_latest.zip
目标框架:.Net 4
输出类型:类库
Building Solution 创建 dll 文件。
dumpbin /exports RawInput.dll 的输出
Microsoft (R) COFF/PE Dumper Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file C:\Users\Qet\Documents\Visual Studio 2015\Projects\rawinput latest\RawInput\bin\x86\Debug\RawInput.dll
File Type: DLL
Summary
2000 .reloc
2000 .rsrc
6000 .text
为什么dumpbin 不显示RawInput.dll 的功能? 我可以在另一个项目中使用 dll 吗?
【问题讨论】:
-
C# 无法创建非托管导出。您需要 C++/CLI 或像 Giesecke 的 Unmanaged Exports 这样的 IL 重写器工具。该项目确实使用 [DllImport],使用 Dumpbin.exe /imports 选项也不会出现。此类函数在运行时与 LoadLibrary() 和 GetProcAddress() 绑定。