我偶然发现了一个为Microsoft自己的非托管DLL生成P/Invoke签名的工具:PInvoke Interop Assistant
是否有类似的工具将为第三方非托管DLL生成P/Invoke签名?
或者,任何方式将第三方DLL提供给PInvoke Interop Assistant
编辑:我试图解决的实际问题
我试图从C#调用一个C DLL,但我没有任何快乐.DLL的文档提供了VB的示例函数delaration,看起来像;
Declare Function TransGeogPt Lib "c:\DLLS\GDAit.dll" (ByVal sGridFile As String, ByVal lDirection As
Long, ByVal dLat As Double, ByVal dLong As Double, pdLatNew As Double, pdLongNew As Double,
pdLatAcc As Double, pdLongAcc As Double) As Long
Declare Function TransProjPt Lib "c:\DLLS\GDAit.dll" (ByVal sGridFile As String, ByVal lDirection As
Long, ByVal dLat As Double, ByVal dLong As Double, ByVal lZone As Long, pdLatNew As Double,
pdLongNew As Double, pdLatAcc As Double, pdLongAcc As Double) As Long
Run Code Online (Sandbox Code Playgroud)
因此我做了以下事情;
public class GDAIt …Run Code Online (Sandbox Code Playgroud)