Ejemplo n.º 1
0
        /// <summary>
        /// 设置网卡
        /// </summary>
        /// <returns></returns>
        public int SetCurrentNetCard()
        {
            int cardIndex           = Properties.Settings.Default.NetCardIndex;
            eagle_all_netcards nics = new eagle_all_netcards();
            int ret = SDKApi.EagleControl_GetSystemNICs(ref nics);

            if (nics.card_num > 0)
            {
                var infoList = new eagle_netcard_info[10];
                infoList[0] = nics.cards[cardIndex];
                var setnice = new eagle_all_netcards();
                setnice.card_num = 1;
                setnice.cards    = infoList;
                ret = SDKApi.EagleControl_SetControlNICs(ref setnice);
            }
            return(ret);
        }