예제 #1
0
            /// <summary>
            /// 搜索设备
            /// </summary>
            /// <param name="password">通讯密码</param>
            /// <param name="timeOut">超时时间</param>
            /// <returns></returns>
            public static List <NET_SEARCH> Search(string password, UInt32 timeOut)
            {
                int count = AccessV2_NetSearchOpen(password, timeOut);
                List <NET_SEARCH> list = new List <NET_SEARCH>();

                for (UInt32 index = 0; index < count; index++)
                {
                    NET_SEARCH one     = new NET_SEARCH();
                    int        success = AccessV2_NetSearchGet(index, ref one);
                    if (success != 0)
                    {
                        list.Add(one);
                    }
                }
                return(list);
            }
예제 #2
0
 private static extern int AccessV2_NetSearchGet(UInt32 index, ref NET_SEARCH search);