Erik. Posted April 5, 2010 Share Posted April 5, 2010 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 Link to comment Share on other sites More sharing options...
Steveiwonder Posted April 5, 2010 Share Posted April 5, 2010 (edited) Your code works fine (tested). You should check the file path, thats probably the issue. Edited April 5, 2010 by Steveiwonder They call me MrRegExpMan Link to comment Share on other sites More sharing options...
Erik. Posted April 5, 2010 Author Share Posted April 5, 2010 (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 April 5, 2010 by Erik. I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
Zedna Posted April 5, 2010 Share Posted April 5, 2010 (edited) Instead of $sDLL = @ScriptDir & "/libmysql.dll" use $sDLL = @ScriptDir & "\libmysql.dll" Also check @error and @extended after DllOpen, DllCall Edited April 5, 2010 by Zedna Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
Erik. Posted April 5, 2010 Author Share Posted April 5, 2010 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. Alenis 1 I little problem, hard to find and fix Link to comment Share on other sites More sharing options...
laurin1 Posted May 10, 2010 Share Posted May 10, 2010 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 10, 2010 Share Posted May 10, 2010 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 ) then press Tools > Compile > Select "Use X86 version." > Save Only. Alenis and PoojaKrishna 1 1 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
laurin1 Posted May 10, 2010 Share Posted May 10, 2010 Or if you're to lazy to copy-paste (like me ) 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 10, 2010 Share Posted May 10, 2010 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. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
laurin1 Posted May 10, 2010 Share Posted May 10, 2010 Yes, I installed the SciTE4AutoIt3 from this page http://www.autoitscript.com/autoit3/scite/downloads.shtml, and no, I don't hafve that option. Keith Davis MCSA, ZCE, A+, N+ http://www.laurinkeithdavis.com Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 11, 2010 Share Posted May 11, 2010 Yes you do. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
laurin1 Posted May 11, 2010 Share Posted May 11, 2010 Yes you do.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 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