Jump to content

Loading @SystemDir&"\winsqlite3.dll" with _SQLite_Startup (64bit problem) - (Moved)


Recommended Posts

winsqlite3.dll is default Windows sqlite dll

32bit _SQLite_Startup(@SystemDir & "\winsqlite3.dll") not problem.

64bit problem, requires _x64.dll

Why can't it be solved somehow by default SQLite.au3?

Example:

SQLite.au3 (add $add_x64):

...

Func _SQLite_Startup($sDll_Filename = "", $bUTF8ErrorMsg = False, $iForceLocal = 0, $hPrintCallback = $__g_hPrintCallback_SQLite, $bAutoItTypeConversion = False, $add_x64 = True)

...

If $add_x64 And @AutoItX64 And (StringInStr($sDll_Filename, "_x64") = 0) Then $sDll_Filename = StringReplace($sDll_Filename, ".dll", "_x64.dll")

...

and 32bit and 64bit not problem:

_SQLite_Startup(@SystemDir & "\winsqlite3.dll", False, 0, $__g_hPrintCallback_SQLite, False, False)

Edited by Krakatoa
Link to comment
Share on other sites

  • Krakatoa changed the title to Loading @SystemDir&"\winsqlite3.dll" with _SQLite_Startup (64bit problem)

Yes, that part (at least) needs rewrite. Post in the bug tracker to leave a trace.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

3 minutes ago, Andreik said:

Why not applying your logic when the function is called.

_SQLite_Startup(@SystemDir & "\winsqlite3" & (@AutoItX64 ? '_x64' : '') & ".dll", False, 0, $__g_hPrintCallback_SQLite, False, False)

 

I want to use default SQLite.au3 + 64bit autoit script + default Windows c:\Windows\System32\winsqlite3.dll

... but default SQLite.au3 won't let me:

If @AutoItX64 And (StringInStr($sDll_Filename, "_x64") = 0) Then $sDll_Filename = StringReplace($sDll_Filename, ".dll", "_x64.dll")

I have to use modified SQLite.au3

That's why I wrote here a proposal to override SQLite.au3 to use the default SQLite.au3 to load 64bit winsqlite3.dll

Link to comment
Share on other sites

10 minutes ago, Andreik said:

winsqlite3.dll has the same name for x64? Otherwise it should work fine. I agree though with jchd that this could have been written better.

Yes.

32bit is c:\Windows\SysWOW64\winsqlite3.dll

64bit is c:\Windows\System32\winsqlite3.dll

But default SQLite.au3 64bit winsqlite3.dll can't, only winsqlite3_x64.dll can, but it doesn't exist.

Edited by Krakatoa
Link to comment
Share on other sites

I recommend against placing user sqlite.dll in system folders, irrespective of 32- or 64-bit.

This is because there are many common programs using their version of SQLite with potentially proprietary-modified DLL. For instance in my humble system:

AutoIt
ActiveTCL
Abobe Acrobat (and many other Adobe prgms)
PCloud file hosting service
Wolfram Mathematica
AOMEI Backuper
Acronis
Various Epson support prgms
Windows Installer
Windows 10 or 11 itself provides its own SQLite DLLs
... and my own SQLite GUI front-ends or my own programs.

Other common programs use SQLite linked in their code, like FireFox, Chome, etc.

SQLite is probably the most common library used worldwide, not counting devices using it internally without saying like smart TVs, routers, GPSs, smartphones, tablets, ...

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

..for the size of the DLL and the potential mishaps that can happen, I'd carry/use my own.
Who is to know what happens in a windows update or whatnot.

My 2 cents of fear based freaking out "what did happen" type of thing.

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

winsqlite3.dll not user sqlite dll, but winsqlite3.dll is in Windows by default.

They don't change often.

winsqlite3.dll is not recommendation, but that should be choice if the programmer sees fit.

What is my point? The user should be able to set the sqlite dll name without _x64 in the 64bit script with default SQLite.au3.

 

 

 

 

 

Edited by Krakatoa
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...