public static extern unsafe ResultCode sqlite3_prepare_v3( sqlite3 db, /* Database handle */ byte *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes. */ PrepFlags prepFlags, /* Zero or more SQLITE_PREPARE_ flags */ out sqlite3_stmt ppStmt, /* OUT: Statement handle */ out IntPtr pzTail /* OUT: Pointer to unused portion of zSql */ );
public static unsafe ResultCode sqlite3_prepare_v3(sqlite3 db, string zSql, PrepFlags prepFlags, out sqlite3_stmt ppStmt) { IntPtr pzTail; var bytes = Encoding.UTF8.GetBytes(zSql); fixed(byte *ptr = bytes) { return(sqlite3_prepare_v3(db, ptr, bytes.Length, prepFlags, out ppStmt, out pzTail)); } }