public static double?CursorGetDouble(HDFqlCursor cursor) { IntPtr pointer = HDFqlPINVOKE.CursorGetDouble(HDFqlCursor.getCPtr(cursor)); if (pointer == IntPtr.Zero) { return(null); } else { double [] value = new double[1]; Marshal.Copy(pointer, value, 0, 1); return(value[0]); } }