AMonari Posted July 9, 2013 Share Posted July 9, 2013 I'm attempting to open a .dll file which is present in my filepath through an AutoIt program I have converted to an exe using Aut2Exe. When I convert the program to a .exe file, I'm unable to open file as DllOpen() returns a -1 but when I run it SciTE Script Editor it works fine i.e. it is is able to open the .dll file. The manner in which I've used the DllOpen can be found on this link i.e. GistHub specifically in function _CommSetPort. Any ideas as to why the function DllOpen when the program is a .exe file would be returning -1 as its return value when clearly the .dll fine it is asked to open is available. Any ideas/suggestions are appreciated. Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 9, 2013 Share Posted July 9, 2013 When you say "present in my filepath" do you mean that both the exe and dll are in the same directory? Link to comment Share on other sites More sharing options...
Mat Posted July 9, 2013 Share Posted July 9, 2013 Link to stackoverflow question. AutoIt Project Listing Link to comment Share on other sites More sharing options...
AMonari Posted July 9, 2013 Author Share Posted July 9, 2013 (edited) @ Richard Robertson: yes the exe and dll are in the same file path. Edited July 9, 2013 by AMonari Link to comment Share on other sites More sharing options...
Developers Jos Posted July 9, 2013 Developers Share Posted July 9, 2013 (edited) @AMonari, Do you want to have the dialog here or at StackOverflow? If you want it here then please post all the relevant info here and we don't have to swap between many different websites. Items to check: FileInstall works differently when run via Autoit3.exe or compiled. When run with autoit3 it will perform a filecopy. Are you compiling with the same version as running, also x86 or x64? How to you shell the compiled version? When shelling in SciTE, the Workdir will be the scriptdir, so what is it when you shell the compiled version? Jos Edited July 9, 2013 by Jos AMonari 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 11, 2013 Share Posted July 11, 2013 Oh yes, Jos brings up an excellent question. The bitness of your compiled script and dll must match. 32 bit exe calls 32 bit dll, and 64 bit exe calls 64 bit dll. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now