Files
2021-12-03 11:25:35 +08:00

21 lines
724 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace Sys
{
public partial class RS232_API
{
[DllImport("RS232_DLL.dll", EntryPoint = "init_rs232",
SetLastError = true, CharSet = CharSet.Unicode,
ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern bool init_rs232(IntPtr hwnd, UInt16 com_type, UInt16 baud);
[DllImport("RS232_DLL.dll", EntryPoint = "Write_Com",
SetLastError = true, CharSet = CharSet.Unicode,
ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern void Write_Com(byte[] Str, int len);
}
}