sqlite3_db_config(sqlite3 *sqlite3ptr, SQLITE_CONFIG_LOG, sqliteLogCallback, NULL);
where sqliteLogCallback is some C function that takes a char* argument among other things.
The problem I have is that from Java and sqlite4java I have no way of getting a pointer address for the "sqlite3 *sqliteptr". I know SQLiteConnection keeps track of this pointer in "myHandle", though it is private and I can not access it. Does anyone know of a way I can do this?
Cheers
Hi Corey,
I am assuming that you have your own native code, and you need to pass sqlite3* there. In that case, you can use Java reflection (Class.getDefinedField()) to extract the long ptr from myHandle, use field.setAccessible(true) and extract the value. However, be aware that sqlite4java “owns” the connection, so when it is closed and the pointer is freed, you’re risking crashing the process if you use the extracted pointer.
Hope this helps!
Igor
--
You received this message because you are subscribed to the Google Groups "sqlite4java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlite4java...@googlegroups.com.
To post to this group, send email to sqlit...@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlite4java.
For more options, visit https://groups.google.com/groups/opt_out.