hello i'm trying to open a database with VB6 without wrapper

i'm using sqlite3.dll

and it's my code :

Option Explicit
Private Declare Function sqlite3_open Lib "sqlite3.dll" (ByVal filename As String, ByRef dbHandle As Long) As Long Private Declare Function sqlite3_open16 Lib "sqlite3.dll" (ByVal filename As String, ByRef dbHandle As Long) As Long Private Declare Sub sqlite3_close Lib "sqlite3.dll" (ByVal DB_Handle As Long)

Private Sub Form_Load()
   Dim lRet As Long
   Dim lDbHandle As Long
   Dim sFilename As String
sFilename = "c:\toto.db" sqlite3_open sFilename, lDbHandle
   MsgBox ("lRet=" & lRet)
   MsgBox ("ldbhandle=" & lDbHandle)
   sqlite3_close (lDbHandle)
End Sub

when i launch it, i've an error 49 : Bad DLL calling convention

anyone can help me ? where is my fault ?

thx
Gregory Letellier


Reply via email to