using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.IO;

namespace com_to_com
{
    class Class1
    {
        [DllImport("FHLedLib.dll")]
        public static extern void SetCommSettings(int portType, int portNo, int baudRate, int flowControl);

        [DllImport("FHLedLib.dll")]
        public static extern int OpenPort();

        [DllImport("FHLedLib.dll")]
        public static extern void ClosePort();

        [DllImport("FHLedLib.dll")]
        public static extern int SetLedOn(int ledNum);

        [DllImport("FHLedLib.dll")]
        public static extern int SetLedOff(int ledNum);

        [DllImport("FHLedLib.dll")]
        public static extern int SetLedFlash(int ledNum, int flashNum);

        [DllImport("FHLedLib.dll")]
        public static extern int SendDataToDevice(byte[] Buffer, uint wLength, ref uint wBytes, uint iWaitTime);

        [DllImport("FHLedLib.dll")]
        public static extern int ReceiveDataFromDevice(byte[] Buffer, int wLength, ref uint wBytes, uint iWaitTime);
    }
}
