I want to call a function from a .NET DLL (coded in C#) from an Inno Setup script.
I have:
marked the Register for COM interop option in the project properties,
changed the
ComVisible
setting in theAssemblyInfo.cs
file,added these lines to the ISS script:
[Files] Source: c:\temp\1\MyDLL.dll; Flags: dontcopy
[Code] function MyFunction(): string; external 'MyFunction@files:MyDLL.dll stdcall setuponly';
But I still get the following error:
Runtime Error (at -1:0):
Cannot Import dll:C:\DOCUME~1\foo\LOCALS~1\Temp\is-LRL3E.tmp\MyDLL.dll.
What am I doing wrong?