我有连接到运行良好的 dll 的 ac# 类。
现在我在 Delphi 中需要相同的功能。最好的方法是什么?我不想在 Delphi 中再次编写所有导入。有没有办法在delphi中导入c#类或任何其他快速简便的方法..
这是我的 c# 类中的一个函数:
/// Return Type: ABS_STATUS->ABS_LONG->int
///pszDsn: ABS_CHAR*
///phConnection: ABS_CONNECTION*
[System.Runtime.InteropServices.DllImportAttribute("bsapi.dll", EntryPoint = "ABSOpen", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
public static extern int ABSOpen([System.Runtime.InteropServices.InAttribute()] [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string pszDsn, ref uint phConnection);