private void SearchHandler(IntPtr Dev, IntPtr Data) { uint ip = 0; StringBuilder DevName = new StringBuilder(100); StringBuilder MacAdd = new StringBuilder(100); DevControl.tagErrorCode eCode = DevControl.DM_GetDeviceInfo(Dev, ref ip, MacAdd, DevName); Ip = ip; }
private bool StartBroadcast() { uint broadcastIp = 0xffffffff; int timeout = 1500; DevControl.tagErrorCode InitErrorCode = DevControl.DM_Init(new SearchCallBack(SearchHandler), IntPtr.Zero); DevControl.tagErrorCode SearchErrorCode = DevControl.DM_SearchDevice(broadcastIp, timeout); return(SearchErrorCode == DevControl.tagErrorCode.DM_ERR_OK ? true : false); }