Modify

Opened 7 years ago

Closed 7 years ago

#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 Changed 7 years ago by TicketCleanup

  • Version 3.3.14.0 deleted

Automatic ticket cleanup.

comment:2 Changed 7 years ago by jchd18

_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 Changed 7 years ago by anonymous

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 Changed 7 years ago by jchd18

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 Changed 7 years ago by Jpm

  • Resolution set to Rejected
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.