Interop.cs

(开头部分) 56KB

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

using System;
using System.Runtime.InteropServices;
using System.Net.NetworkInformation;
using System.Text;
using System.Diagnostics;
using System.ComponentModel;

namespace NativeWifi
{
	// TODO: Separate the functions and the structs/enums. Many of the structs/enums should remain public
	// (since they're reused in the OOP interfaces) -- the rest (including all P/Invoke function mappings)
	// should become internal.

	// All structures which native methods rely on should be kept in the Wlan class.
	// Only change the layout of those structures if it matches the native API documentation.
	// Some structures might have helper properties but adding or changing fields is prohibited.
	// This class is not documented since all the documentation resides in the MSDN. The code
	// documentation only covers details which concern interop users.
	// Some identifier names were modified to correspond to .NET naming conventions
	// but otherwise retain their native meaning.

	/// <summary>
	/// Defines the Native Wifi API through P/Invoke interop.
	/// </summary>
	/// <remarks>
	/// This class is intended for internal use. Use the <see cref="WlanCliient"/> class instead.
	/// </remarks>
	public static class Wlan
	{
		#region P/Invoke API
		/// <summary>
		/// Defines various opcodes used to set and query parameters for an interface.
		/// </summary>
		/// <remarks>
		/// Corresponds to the native <c>WLAN_INTF_OPCODE</c> type.
		/// </remarks>
		public enum WlanIntfOpcode
		{
			/// <summary>
			/// Opcode used to set or query whether auto config is enabled.
			/// </summary>
			AutoconfEnabled = 1,
			/// <summary>
			/// Opcode used to set or query whether background scan is enabled.
			/// </summary>
			BackgroundScanEnabled,
			/// <summary>
			/// Opcode used to set or query the media streaming mode of the driver.
			/// </summary>
			MediaStreamingMode,
			/// <summary>
			/// Opcode used to set or query the radio state.
			/// </summary>
			RadioState,
			/// <summary>
			/// Opcode used to set or query the BSS type of the interface.
			/// </summary>
			BssType,
			/// <summary>
			/// Opcode used to query the state of the interface.
后面还有 1546 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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