serial_error() private method

private serial_error ( RJCP.IO.Ports.Native.Unix.SafeSerialHandle handle ) : IntPtr
handle RJCP.IO.Ports.Native.Unix.SafeSerialHandle
return IntPtr
Exemplo n.º 1
0
        public string serial_error(SafeSerialHandle handle)
        {
            IntPtr errorString = UnsafeNativeMethods.serial_error(handle);

            errno = Marshal.GetLastWin32Error();
            if (errorString.Equals(IntPtr.Zero))
            {
                return(null);
            }
            return(Marshal.PtrToStringAnsi(errorString));
        }