WindowsApi/WLAN/WlanManager.cs

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace Utils.WindowsApi
{
    /// <summary>
    /// System WLAN Manager
    /// </summary>
    public class WlanManager
    {
        #region Fields
        /// <summary>
        /// 客户端在此会话中使用的句柄
        /// </summary>
        internal IntPtr _clientHandle;

        /// <summary>
        /// 将在此会话中使用的 WLAN API 版本
        /// </summary>
        internal uint _negotiatedVersion;

        /// <summary>
        /// 通知事件回调
        /// </summary>
        internal WlanapiBase.WlanNotificationCallbackDelegate _wlanNotificationCallback;

        /// <summary>
        /// 无线网卡列表
        /// </summary>
        private Dictionary<Guid, WlanInterface> _ifaces = new Dictionary<Guid, WlanInterface>();
        #endregion

        #region Properties
        /// <summary>
        /// 没有WIFI
        /// </summary>
        public bool NoWifiAvailable { get; set; }

        /// <summary>
		/// Gets the WLAN interfaces.
        /// 获取WLAN接口
		/// 
		/// Possible Win32 exceptions:
        /// 可能的Win32异常:
		/// 
		/// ERROR_INVALID_PARAMETER: A parameter is incorrect. This error is returned if the hClientHandle or ppInterfaceList parameter is NULL. This error is returned if the pReserved is not NULL. This error is also returned if the hClientHandle parameter is not valid.
		/// ERROR_INVALID_HANDLE: The handle hClientHandle was not found in the handle table.
		/// RPC_STATUS: Various error codes.
		/// ERROR_NOT_ENOUGH_MEMORY: Not enough memory is available to process this request and allocate memory for the query results.
		/// </summary>
		/// <value>The WLAN interfaces.</value>
		public WlanInterface[] Interfaces
        {
            get
            {
                if (NoWifiAvailable)
后面还有 192 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。