> The given code is correct. The lower-case string is a C# alias for the
> System.String class. System.Int64 is an opaque 64-bit pointer value.

Seems like the grasping deficiencies are on my side :D.

> The code so far is correct. What is missing though is the calling
> convention, which by default is cdecl, but .NET doesn't use that one
> by default for P/Invoke. It uses stdcall/winapi as the default calling
> convention. Change the CallingConvention in the DllImport line.
> 
> Additionally using CharSet=CharSet.Unicode adds an implicit W as per
> Win32 calling conventions to the function name. Since the
> sqlite3_open16
> doesn't have that you need to use ExactSpelling to prevent it from
> adding
> that W.

Off topic: God, that's ugly.

> Instead of rolling your own P/Invoke wrapper I'd suggest using one of
> the available .NET wrappers for SQLite.

Best idea so far!

- Sherief

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to