I'm please to announce that Charles has updated his efforts with using OxygenBasic to create ScriptBasic DLL extension modules. (early beta) Charles created a SQLite3 extension module as an example of wrapping standard libraries with the SB extension module interface.
declare sub SQLite3_Demo alias "sqlite3_demo" lib "sqlite3_mdl"
declare sub SQLite3_ErrMsg alias "sqlite3_errmsg" lib "sqlite3_mdl"
declare sub SQLite3_Open alias "sqlite3_open" lib "sqlite3_mdl"
declare sub SQLite3_Close alias "sqlite3_close" lib "sqlite3_mdl"
declare sub SQLite3_Exec alias "sqlite3_exec" lib "sqlite3_mdl"
declare sub SQLite3_Prepare_v2 alias "sqlite3_prepare_v2" lib "sqlite3_mdl"
declare sub SQLite3_Step alias "sqlite3_step" lib "sqlite3_mdl"
declare sub SQLite3_Column_Text alias "sqlite3_column_text" lib "sqlite3_mdl"
SQLITE_ROW = 100
'print SQLite3_Demo()
hdb=0
dberr=0
stmt=0
pr="DataBase Listing:\n"
result=0
'
sqlite3_open("testsql",hdb)
'
sqlite3_exec (hdb, "CREATE TABLE demo(someval INTEGER, sometxt TEXT);", 0, 0, dberr)
sqlite3_exec (hdb, "INSERT INTO demo VALUES (123, 'Hello');", 0, 0, dberr)
sqlite3_exec (hdb, "INSERT INTO demo VALUES (234, 'cruel');", 0, 0, dberr)
sqlite3_exec (hdb, "INSERT INTO demo VALUES (345, 'world');", 0, 0, dberr)
'
result = sqlite3_prepare_v2 (hdb, "SELECT * FROM demo;", -1, stmt, 0)
'
if dberr then
print SQLite3_ErrMsg(dberr) & "\n"
endif
'
while (sqlite3_step(stmt) = SQLITE_ROW)
pr=pr & sqlite3_column_text(stmt, 0) & " - " & sqlite3_column_text(stmt, 1) & "\n"
wend
'
sqlite3_close(hdb)
print pr
line input w
C:\scriptbasic\test>scriba sqlite3test.sb
DataBase Listing:
123 - Hello
234 - cruel
345 - world
C:\scriptbasic\test>