Jump to content

Recommended Posts

Posted

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

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

Posted

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

  • 1 month later...
Posted

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.

Posted

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.

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
  • Recently Browsing   0 members

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