corgano Posted December 7, 2016 Share Posted December 7, 2016 (edited) I have a script working on a windows 7, 64 bit OS that uses SQLite. I went to transfer to to my laptop so i could work on it while on the go, but it's not running on my laptop (Windows 10, 64 bit). The script / autoit is configured to compile and run as x86 for compatibility's sake, via the option during autoit setup. Here is the minimal code to reproduce my problem: #include <SQLite.au3> #include <SQLite.dll.au3> ;Without this, downloading fails HttpSetUserAgent("Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0") If @CPUArch = "x86" and Not FileExists("sqlite3.dll") then InetGet("https://www.autoitscript.com/autoit3/pkgmgr/sqlite/sqlite3.dll", @ScriptDir&"\sqlite3.dll") ConsoleWrite("Error = "&@error&@CRLF) EndIf If @CPUArch = "x64" and Not FileExists("sqlite3_x64.dll") then InetGet("https://www.autoitscript.com/autoit3/pkgmgr/sqlite/sqlite3_x64.dll", @ScriptDir&"\sqlite3_x64.dll") ConsoleWrite("Error = "&@error&@CRLF) EndIf _SQLite_Startup() If @error Then MsgBox($MB_SYSTEMMODAL, "SQLite Error "&@error, "SQLite3.dll Can't be Loaded!") ConsoleWrite("https://www.autoitscript.com/autoit3/pkgmgr/sqlite/sqlite3_x64.dll"&@CRLF) ConsoleWrite(@ScriptDir&"\sqlite3_x64.dll"&@CRLF) Exit -1 EndIf Downloading works, files are downlaoded to @scriptdir properly. However no matter what I do with _SQLite_Startup() it fails with @error = 1. I've tried explicitly telling it to use both versions of the dll as well as leaving it to choose for itself and nothing works. Help? Edited December 7, 2016 by corgano 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
corgano Posted December 7, 2016 Author Share Posted December 7, 2016 2 hoursof trial and error, came back to ask for help literally 8 minutes later I found the solution The dll I had already in the folder was corrupt. Deleted thedll's, just used the 32 bit one, and everything worked This thread could be deleted with no loss to humanity. I am a complete idiot. 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e 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