public override byte[] GetSlice(int sliceLength) { int[] statusVector = FesConnection.GetNewStatusVector(); int dbHandle = this.db.Handle; int trHandle = this.transaction.Handle; ArrayDescMarshaler marshaler = ArrayDescMarshaler.GetInstance(); IntPtr arrayDesc = marshaler.MarshalManagedToNative(this.Descriptor); byte[] buffer = new byte[sliceLength]; FbClient.isc_array_get_slice( statusVector, ref dbHandle, ref trHandle, ref this.handle, arrayDesc, buffer, ref sliceLength); // Free memory marshaler.CleanUpNativeData(ref arrayDesc); FesConnection.ParseStatusVector(statusVector); return(buffer); }