Can anyone tell me whats wrong with this code?
It throws this exception:
A call to PInvoke function 'Web!Web.SQLiteBase::sqlite3_open' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
The code is as follows:
if (sqlite3_open(baseName, out database) != SQL_OK)
[DllImport("sqlite3.dll", EntryPoint = "sqlite3_open")]
private static extern int sqlite3_open(string filename, out IntPtr db);
I converted it from VB and cannot get it to work properly under .Net framework 4.0
Any help is appreciated!
Thanks