Example #1
0
        IntPtr SQLiteProvider.Sqlite3ColumnBlob(IntPtr stm, int columnIndex)
        {
#if NETFX_CORE
            return(NativeMethods.sqlite3_column_blob(stm, columnIndex));
#elif WINDOWS_PHONE
            return(new IntPtr(SQLite3RuntimeProvider.sqlite3_column_blob(stm.ToInt64(), columnIndex)));
#endif
        }
Example #2
0
        byte[] ISQLite3Provider.sqlite3_column_blob(IntPtr stm, int columnIndex)
        {
            IntPtr blobPointer = new IntPtr(SQLite3RuntimeProvider.sqlite3_column_blob(stm.ToInt64(), columnIndex));

            if (blobPointer == IntPtr.Zero)
            {
                return(null);
            }

            var length = SQLite3RuntimeProvider.sqlite3_column_bytes(stm.ToInt64(), columnIndex);

            byte[] result = new byte[length];
            Marshal.Copy(blobPointer, (byte[])result, 0, length);
            return(result);
        }
 IntPtr ISQLite3Provider.Sqlite3ColumnBlob(IntPtr stm, int columnIndex)
 {
     return(new IntPtr(SQLite3RuntimeProvider.sqlite3_column_blob(stm.ToInt64(), columnIndex)));
 }