Inno Setup Runtime Error Cannot Import Dll
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Runtime Error At 1 0 Cannot Import Dll Utf8
About Us Learn more about Stack Overflow the company Business Learn more runtime error (at-10) cannot import dll fix about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Runtime Error At 1 0 Cannot Import Dll C:
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Problem with importing cannot import iswin7 dll DLL into Inno-Setup up vote 1 down vote favorite I am importing an C++ DLL in an innosetup install script. The DLL code is as follows: void __stdcall SetFbParam(char *dbFileName,char *dbTableName,char *dbParamName,char *dbParamValue){ //of no use here and doesn't change anything} In the Innosetup, I import it using procedure FBset(dbFileName,dbTableName,dbParamName,dbParamValue: String;); external 'SetFbParam@files:MyDll.dll stdcall setuponly'; However, I always get a runtime error during launch of cannot import dll issproc dll the installer, saying that it cannot import my dll. I tried it with various calling conventions, but it always fails. If it's of any importance, I'm running Win7 x64 with UAC on ( the installer requests rights elevation and crashes after that). The exact message is: Error Runtime error (at -1:0): Cannot import dll:C:\Users\Nevod\AppData\Local\Temp\is-6LOEC.tmp\MyDll.dll The dll is there. Thanks! c++ dll dllimport inno-setup share|improve this question edited Aug 23 '10 at 23:14 asked Aug 23 '10 at 17:15 nnevod 2115 Don't make us guess at the runtime error message. –Hans Passant Aug 23 '10 at 17:26 The exact message is: Error Runtime error (at -1:0): Cannot import dll:C:\Users\Nevod\AppData\Local\Temp\is-6LOEC.tmp\MyDll.dll The dll is there. –nnevod Aug 23 '10 at 17:34 And the function you're importing is also actually exported? –deemok Aug 26 '10 at 20:39 add a comment| 3 Answers 3 active oldest votes up vote 5 down vote Is MyDll.dll 32-bit? Does MyDll.dll depend on any other DLLs in the same directory? If so, you need to list the name(s) of those DLLs after "MyDll.dll" to ensure that they are extracted before MyDll.dll is loaded, and yo
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Runtime Error At -1:0 : Cannot Import Dll
this site About Us Learn more about Stack Overflow the company Business Learn runtime error (at-1:0) cannot import wizardform more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Inno http://stackoverflow.com/questions/3549977/problem-with-importing-dll-into-inno-setup Setup failing to import DLL up vote 2 down vote favorite 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 http://stackoverflow.com/questions/21435282/inno-setup-failing-to-import-dll 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:
assemblies can be called. Open the "CodeDll.iss" file in the "Examples" subdirectory in your Inno Setup directory for an example script using DLLs. http://www.jrsoftware.org/ishelp/topic_scriptdll.htm The "Examples" subdirectory also contains three custom DLL example projects, one for Microsoft Visual C++, one for Microsoft Visual C# and one for Borland Delphi. The C# example shows how to make your .NET assemblies callable by the Pascal script. To be able to call a DLL function you should first write the function prototype as normal but cannot import instead of then writing the function body, you use the 'external' keyword to specify a DLL. If your function has for example prototype function A(B: Integer): Integer;, the following three forms are supported: [Code] function A(B: Integer): Integer; external '