1
この質問には答えがありますが、彼は私を助けません。私は記事を見た:linkとlinkが、私は問題があります。私のコード:InnoセットアップでC#DLLをインポートするときに「DLLをインポートできません」
のC#:
[DllExport("ServerOfDataBases", CallingConvention = CallingConvention.StdCall)]
public static int ServerOfDataBases(
string server, string user, string password,
[MarshalAs(UnmanagedType.BStr)] out string strout)
{
string resultStr = String.Empty;
// ...
strout = resultStr;
return 0;
}
Inno Setupの:
[Files]
Source: "GetDataBases.dll"; Flags: dontcopy
[Code]
function ServerOfDataBases(server, user, password: string; out strout: WideString): Integer;
external '[email protected]:GetDataBases.dll stdcall';
私はこのエラー
は、DLLをインポートすることはできません取得:C:ユーザー\ ... \のAppData \ローカル\ Temp \ is-ECJ5V.tmp \ GetDataBases.dll
ありがとうございました。
あなたの記事はとても良いです。それは私を助けた。誰かがC#DLLから文字列を返すことを望むなら、記事[link](https://stackoverflow.com/questions/20776847/returning-a-string-from-ac-sharp-dll-with-unmanaged- exports-inno-setup-scrip)を実行します。 –
申し訳ありませんが、私はコメントを修正しました。私の英語は良いことではありません。 –
@ДжирайяNp、私の記事を参考にしてくれたら、アップしてください。 –