Reputation: 675
My program installs fine in my computer, which has ISSkin installed. I tried then to install my program in a different computer that has not got ISSkin installed and I get this message upon installation : "Runtime error (at -1:0): Cannot import dll:c:\Folder00\ISSkin.dll".
I searched on the net but nothing so far. I have the following code in my INNO:
[Files]
Source: "c:\Folder00\ISSkin.dll"; DestDir: {tmp}; Flags: dontcopy; Attribs: hidden system
[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@c:\Folder00\ISSkin.dll cdecl';
procedure UnloadSkin();
external 'UnloadSkin@c:\Folder00\ISSkin.dll cdecl'
Im am using a *.cjstyles skin for the innosetup. I changed from STDCALL to CDECL but to no avail. Has anyone had this problem and how it can be solved?
Upvotes: 2
Views: 28150
Reputation: 54772
You're extracting the dll to temporary files but trying to load it from some 'c:\folder00\', which most probably won't exist in the target computer.
Follow the example on the product page and you'll be fine. Relevant pieces from the linked example:
[Files]
Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
Source: Office2007.cjstyles; DestDir: {tmp}; Flags: dontcopy
[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFile('Office2007.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Office2007.cjstyles'), '');
Result := True;
end;
Upvotes: 3