私は、うまく動作するdllに接続するc#クラスを持っています。アンマネージコードをC#からデルファイにインポートする
私はDelphiでも同じ機能が必要です。それをする最善の方法は何ですか?私はDelphiで再びすべてのインポートを書きたいとは思わない。
/// 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);
ネイティブDelphi、またはDelphi for .NET? –
はい、それは.net dllではありません。私はそのC++と思います。デルファイで直接インポートする方法、私はすべてのmedhodsとデルファイのコードで関数を書き換える必要がありますか? – Ezi
@Jim Mischel私はネイティブDelphiのバージョン5を使用しています – Ezi