> >> I think that unless the argument is going to be altered I have to pass > them always ByVal. > That wasn't quite right, eg: > int sqlite3_close(sqlite3*); > sqlite3* is not going to be altered, but I can see that this should be > passed ByRef
If your VB variable contains an sqlite3* then the item should be passed ByVal. ByRef will pass a pointer to a pointer. Only if the VB Variable is a struct would you pass it ByRef.