Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
        }