Jump to content

AutoIt - DllOpen() not opening a present .dll file i.e. it is returning -1


AMonari
 Share

Recommended Posts

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

  • Developers

@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 by Jos

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...