Example #1
0
        public unsafe int Find(byte[] value)
        {
            var result = IntPtr.Zero;

            MarshalHelpers.SetByteArray(value, (IntPtr buffer, IntPtr bufferSize, bool hasValue, out NativeException ex) =>
            {
                result = NativeMethods.find_binary(this, buffer, bufferSize, hasValue, out ex);
            });

            return((int)result);
        }
Example #2
0
 public unsafe void SetByteArray(IntPtr propertyIndex, byte[] value)
 {
     MarshalHelpers.SetByteArray(value, (IntPtr buffer, IntPtr bufferSize, bool hasValue, out NativeException ex) =>
     {
         if (hasValue)
         {
             NativeMethods.set_binary(this, propertyIndex, buffer, bufferSize, out ex);
         }
         else
         {
             NativeMethods.set_null(this, propertyIndex, out ex);
         }
     });
 }
Example #3
0
 public unsafe void Insert(int targetIndex, byte[] value)
 {
     MarshalHelpers.SetByteArray(value, (IntPtr buffer, IntPtr bufferSize, bool hasValue, out NativeException ex) =>
                                 NativeMethods.insert_binary(this, (IntPtr)targetIndex, buffer, bufferSize, hasValue, out ex));
 }
Example #4
0
 public unsafe void Add(byte[] value)
 {
     MarshalHelpers.SetByteArray(value, (IntPtr buffer, IntPtr bufferSize, bool hasValue, out NativeException ex) =>
                                 NativeMethods.add_binary(this, buffer, bufferSize, hasValue, out ex));
 }