HAASDLL.cs 661 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Runtime.InteropServices;
  7. public class Mnet
  8. {
  9. [DllImport("HAASDLL.dll", EntryPoint = "ConnetDevie")]
  10. public static extern bool ConnetDevie(string ip, UInt16 port);
  11. [DllImport("HAASDLL.dll", EntryPoint = "Revc")]
  12. public static extern int Revc(IntPtr pbuf, int len, int timeOut);
  13. [DllImport("HAASDLL.dll", EntryPoint = "Send")]
  14. public static extern int Send(string pbuf, int len, int timeOut);
  15. [DllImport("HAASDLL.dll", EntryPoint = "Close")]
  16. public static extern void Close();
  17. }