Sign in to follow this  
Followers 0
Erik.

DLLopen failed

12 posts in this topic

I am trying to access mysql on my website.

I found an udf here: http://www.autoitscript.com/forum/index.php?showtopic=85617&st=0

The first problem i got is opening the dll file.

After some debugging i got the error -1

I realy do not know what the problem is. I also asked the question there but there is not answer.

Hope you can help me.

Some debug information:

$sDLL = @ScriptDir & "/libmysql.dll"
$ghMYSQL_LIBMYSQL = DllOpen($sDLL)
msgbox(0,"",$ghMYSQL_LIBMYSQL)

I little problem, hard to find and fix

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Your code works fine (tested).

You should check the file path, thats probably the issue.

Edited by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It does not work sorry.

I put the file into the windows/system32 folder

Also added @scriptdir to be sure it will be opend but it does not work sorry.

An example:

In the help file i found this script:

$dll = DllOpen("user32.dll")
$result = DllCall($dll, "int", "MessageBox", "hwnd", 0, "str", "Some text", "str", "Some title", "int", 0)
DllClose($dll)

Edit it to:

$dll = DllOpen("libmysql.dll")
$result = DllCall($dll, "int", "MessageBox", "hwnd", 0, "str", "Some text", "str", "Some title", "int", 0)
DllClose($dll)

The file user32.dll is in the system folder, i also put the libmysql.dll in the system folder but i got the same error.

What could be the problem?

Edited by Erik.

I little problem, hard to find and fix

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Instead of $sDLL = @ScriptDir & "/libmysql.dll"

use $sDLL = @ScriptDir & "\libmysql.dll"

Also check @error and @extended after DllOpen, DllCall

Edited by Zedna

Share this post


Link to post
Share on other sites

I got the error, running on 64 bit and the dll file is 32 bit.

I am running the script in 32 mode and everything works fine now.


I little problem, hard to find and fix

Share this post


Link to post
Share on other sites

I got the error, running on 64 bit and the dll file is 32 bit.

I am running the script in 32 mode and everything works fine now.

I am having this same issue. How do I tell AutoIt to run in 32 bit?


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites

I am having this same issue. How do I tell AutoIt to run in 32 bit?

Install SciTE4AutoIt3 if you haven't, then add the following line to the top of your script:

#AutoIt3Wrapper_UseX64=n

Or if you're to lazy to copy-paste (like me :idea:) then press Tools > Compile > Select "Use X86 version." > Save Only.

1 person likes this

Share this post


Link to post
Share on other sites

Or if you're to lazy to copy-paste (like me Posted Image) then press Tools > Compile > Select "Use X86 version." > Save Only.

I am using SciTE, the newest version, and I don't see the Use X86 version option.


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites

I am using SciTE, the newest version, and I don't see the Use X86 version option.

What is that supposed top mean? Did you install SciTE4AutoIt3, yes or no? It is only in that package all the advanced tools are, not in "SciTE lite" that comes with AutoIt.

Share this post


Link to post
Share on other sites

Yes you do.

Posted Image

Oh, yea, from that screen. Sucks it can't be done from Scite via keyboard shortcut. I almost never use that screen.

I just reinstalling AutoIt and said no to the 64 Bit question. That seems to work fine.


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
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
Sign in to follow this  
Followers 0