"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
public static class UnsafeNativeMethods { [System.Runtime.InteropServices.DllImportAttribute("System.Data.SQLite.dll", EntryPoint = "sqlite3_value_blob", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)] public static extern IntPtr sqlite3_value_blob([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.SysUInt)]IntPtr p); } [SQLiteFunction(Name = "rank", Arguments = 3, FuncType = FunctionType.Scalar)] class myFunction: SQLiteFunction { public override object Invoke(object[] args) { //return base.Invoke(args); return myFunction((byte[])args[0],(long)args[1],(long)args[2]); public static double myFunction(byte[] pCtx, long nVal, long b) { IntPtr xAsIntPtr = new IntPtr(x); long x = b; long[] apVal = digitArr(b); //digitArr convert the long to array of long long[]matchinfo=digitArr((long)UnsafeNativeMethods.sqlite3_value_blob(xAsIntPtr));//<small>--exception</small> ...Continue
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)