• Welcome, Guest. Please login.
 
September 17, 2019, 01:56:32 pm

News:

Welcome to the SQLitening support forums!


FreeBasic

Started by cj, November 01, 2016, 02:04:07 pm

Previous topic - Next topic

Paul Squires

I recompiled all sqlitening source and downloaded the latest sqlite.dll so at least now everything is 100% current for the testing.
If you are running in local mode then I believe you need to issue a:
slSetProcessMods("E0")
Otherwise the popup error box message will display when sqlitening attempts to issue the slExe on an sql statement.

Paul Squires

Quote from: cj on January 11, 2017, 07:33:03 pm
Thanks, Paul.
Made changes to above source.

I'm trying to get rid of the warning implicit conversion

SUB showit(s AS STRING)
DIM hFile  AS LONG
DIM sFile  AS STRING *32
sFile = "test.txt"
hFile = FREEFILE
OPEN sFile FOR OUTPUT AS #hFile
PRINT #hFile, s
CLOSE #hFile
hFile = ShellExecuteA(BYVAL 0, "open", BYVAL sfile, BYVAL 0,BYVAL 0,sw_normal)  'implicit conversion
END SUB

rem FUNCTION ShellExecuteA(BYVAL hwnd AS HWND, BYVAL lpOperation AS LPCSTR, BYVAL lpFile AS LPCSTR, BYVAL lpParameters AS LPCSTR, BYVAL lpDirectory AS LPCSTR, BYVAL nShowCmd AS INT_) AS HINSTANCE


Here is one way to fix it:

SUB showit(s AS STRING)
dim as HINSTANCE hInst
DIM as long hFile = freefile
DIM as string sFile = "test.txt"
OPEN sFile FOR OUTPUT AS #hFile
PRINT #hFile, s
CLOSE #hFile
hInst = ShellExecute(BYVAL 0, "open", BYVAL sfile, BYVAL 0,BYVAL 0,sw_normal)
END SUB


cj

Nice. Thanks, Paul.
Also,  removing the return value works and it is still an asynchronous shell.

Changed a batch file above to  this to add -s gui
@cls
erase %1.exe
"\program files\freebasic\fbc.exe " %1.bas -s gui
pause
%1

Paul Squires

I have edited Post #7 http://sqlitening.com/support/index.php?topic=9635.msg25492#msg25492

Corrected libSQLitening.dll.a import file. Recompiled all DLL's and EXE's. Downloaded latest sqlite DLL. Created a FB port of ExampleB.bas example file.

cj

January 12, 2017, 03:50:50 pm #19 Last Edit: January 12, 2017, 03:57:04 pm by cj
SqliteningClient.dll doesn't match mine.
Get version error 23 when running against local server or remote server at 45.40.133.16, 51234

Looked at version info in sql\src\sqliteningclient.bas

#RESOURCE VERSIONINFO
#RESOURCE FILEVERSION 1, 60, 5, 0
#RESOURCE STRINGINFO "0409", "0000"
#RESOURCE VERSION$ "ProductName",      "SQLitening"
#RESOURCE VERSION$ "ProductVersion",   "1.6" 

When using my sqliteningclient.dll  slDisconnect works

Paul Squires

cj, I believe that I am using the 1.70 source files as per this post: http://sqlitening.com/support/index.php?topic=9427.0

cj

It is my mistake.
When corrections were made to the previous version I did not update the version information.
I will update with the files you have shown.

Thank you!