I know that this question has answer, but he does not help me. I saw articles: link and link, but I have problem. My code:
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 'ServerOfDataBases@files:GetDataBases.dll stdcall';
I get this error
Cannot Import dll:C:\Users...\AppData\Local\Temp\is-ECJ5V.tmp\GetDataBases.dll
Thank you for any idea.