serial_getdevicename() private method

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

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