#3553 closed Feature Request (Rejected)
_SQLite_Startup() - cannot use SQLite.dll without "_x64" suffix in 64 bit script
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
Now _SQLite_Startup() prohibit use dll without "_x64" in dll name in 64 bit script. It not very convenient.
Func _SQLite_StartupEX($sDll_Filename = "", $bUTF8ErrorMsg = False, $iForceLocal = 0, $hPrintCallback = $__g_hPrintCallback_SQLite) #forceref $iForceLocal If $sDll_Filename = Default Or $sDll_Filename = -1 Then $sDll_Filename = "" If $hPrintCallback = Default Then $hPrintCallback = __SQLite_ConsoleWrite $__g_hPrintCallback_SQLite = $hPrintCallback If $bUTF8ErrorMsg = Default Then $bUTF8ErrorMsg = False $__g_bUTF8ErrorMsg_SQLite = $bUTF8ErrorMsg If $sDll_Filename = "" Then $sDll_Filename = "sqlite3.dll" Local $hDll = DllOpen($sDll_Filename) If $hDll = -1 Then $__g_hDll_SQLite = 0 Return SetError(1, 0, "") Else $__g_hDll_SQLite = $hDll Return SetExtended(0, $sDll_Filename) EndIf EndFunc ;==>_SQLite_Startup
Attachments (0)
Change History (5)
comment:1 by , on May 24, 2017 at 7:00:02 PM
| Version: | 3.3.14.0 |
|---|
comment:2 by , on May 25, 2017 at 10:01:40 AM
_SQLite_Startup currently adds the _X64 suffix to the DLL name as needed. This way you can host both versions of the DLL in the same place and yet use the same source code for both X86 and X64.
Changing the UDF as in your example would inconveniently require changing the DLL name in the code when compiling for the other architecture.
comment:3 by , on May 25, 2017 at 6:46:46 PM
my example is only example. It make possible to load "sqlite3.dll" without "_x64" suffix in 64 bit script. Original version error out not finding dll file in this case.
Main point - make UDF use dll with was provided, and to not make any assumptions if provided file exist on provided full path.
comment:4 by , on May 25, 2017 at 10:29:22 PM
I get that but the point of adding the "conventional" _X64 suffix is to distinguish between 32- and 64-bit versions of the DLL, allowing them to coexist in the same directory. This makes building X86 or X64 applications completely transparent using the exact same source code.
comment:5 by , on Jan 29, 2018 at 4:09:01 PM
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |

Automatic ticket cleanup.