BisherSH Posted February 14, 2017 Share Posted February 14, 2017 Good day , I have the code below , and i would like to embed SQLite3.dll to the compiled file Is it possible ? Thanks in advance #include <SQLite.au3> #include <SQLite.dll.au3> _SQLite_Startup() If @error Then MsgBox($MB_SYSTEMMODAL, "SQLite Error", "SQLite3.dll Can't be Loaded!") Exit -1 EndIf $DB = _SQLite_Open("C:\Temp\Test.db") $Action = "TestAction" $Time = @HOUR&":"&@MIN&":"&@SEC $Date = @YEAR&"-"&@MON&"-"&@MDAY $User = @UserName $Computer = @ComputerName $DC = @LogonServer If @error Then MsgBox($MB_SYSTEMMODAL, "SQLite Error", "Couldnt open Database") Exit -1 EndIf _SQLite_Exec($DB,"INSERT INTO QLogs (Action,Date,Time,User,Computer,DC) " & _ "VALUES ("& _SQLite_FastEscape($Action) & "," & _ _SQLite_FastEscape($Date) & "," & _ _SQLite_FastEscape($Time) & "," & _ _SQLite_FastEscape($User) & "," & _ _SQLite_FastEscape($Computer) & "," & _ _SQLite_FastEscape($DC) & ");") If @error Then MsgBox($MB_SYSTEMMODAL, "SQLite Error", "Couldnt insert!") Exit -1 EndIf _SQLite_Shutdown() Link to comment Share on other sites More sharing options...
jguinch Posted February 14, 2017 Share Posted February 14, 2017 (edited) Use FileInstall to embed the dll in your script. This function extracts the file from the compiled script to the directory you specifiy Edited February 14, 2017 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Starf0x Posted February 14, 2017 Share Posted February 14, 2017 Or you can do this: #AutoIt3Wrapper_Res_File_Add=Sqllite.dll, RT_RCDATA, BIN_DLL ; This file is added during compilation. #include <ResourcesEx.au3> _Resource_SaveToFile('Sqllite.dll', 'BIN_DLL') ; This must be done at startup Cheers, Starf0x Link to comment Share on other sites More sharing options...
BisherSH Posted February 14, 2017 Author Share Posted February 14, 2017 Thank you for the quick reply , It looks very useful , but what i am actually looking for is using the resource DLL file directly from the compiled EXE without saving the DLL to disk . I found something which looks exactly what i need , and i was able to embed the file but I couldt find the correct way to use it inside my code Link to comment Share on other sites More sharing options...
BisherSH Posted February 16, 2017 Author Share Posted February 16, 2017 I mean I need to use the DLL from memory , I found this link too but I also couldn't find the correct way to user it in my code Link to comment Share on other sites More sharing options...
junkew Posted February 20, 2017 Share Posted February 20, 2017 Depending your target OS maybe not needed. SQLite version 3.11.2 is shipping with the Windows 10 Anniversary edition FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
UEZ Posted February 20, 2017 Share Posted February 20, 2017 (edited) Try this: SQLiteMem.au3 Please reply if it works. Edited February 21, 2017 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ 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