Using a .tlb file to access the sqlite3 functions from VB6. Sofar when the arguments of the sqlite3 function are declared as int I have been using long in the IDL source to compile the tlb and this has been fine.
sqlite3_compileoption_get is defined like this: const char *sqlite3_compileoption_get(int N); but using long here for the N argument causes a problem and it took me a while to unravel this problem. The .tlb compiles fine and all shows fine in the object browser in VB6, but the ActiveX can't be registered with Windows. The solution was to use int or byte instead in the IDL for the N argument: [entry("_sqlite3_compileoption_get at 4"), helpstring("Allows iterating over the list of options that were defined at compile time by returning the N-th compile time option string.")] long _stdcall sqlite3_compileoption_get([in] byte lIndex); My question is how could I have foreseen this problem, so how could I have known that using long is no good here? Not from the documentation of sqlite3_compileoption_get: https://www.sqlite.org/c3ref/compileoption_get.html Could I see it from the sqlite3.c source? Should this be documented somehow better? RBS