I'm not having any luck importing a Delphi DLL into Inno Setup (Unicode). The DLL has a simple procedure..
procedure Foo(); stdcall;
begin
end;
exports
Foo;
The DLL is included in the installer source, and added to the files list:
[Files]
Source: "MyDLL.dll"; Flags: dontcopy
Then, I extract this DLL in the initialization:
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('MyDLL.dll');
end;
And finally, declared this procedure in the script:
function DoFoo(): Bool;
external 'Foo@MyDLL.dll stdcall';
However, when I run the setup, I get an error:
Cannot Import dll: <utf8>MyDLL.dll.
What am I doing wrong?