我有那个代码,但是当我将鼠标悬停在[DLLImport(" wlanapi.dll")]上时,它会给我一条错误消息:'类型或命名空间名称' DLLImport& #39;未找到(使用指令或汇编引用是否丢失?)'
using System;
using System.Runtime.InteropServices;
using System.Net.NetworkInformation;
using System.Text;
using System.Diagnostics;
using System.ComponentModel;
namespace nativewifi
{
public class Class1
{
[DLLImport("wlanapi.dll")]
public static extern int WlanGetAvailableNetworkList(
[In] IntPtr clientHandle,
[In, MarshalAs(UnmanagedType.LPStruct)] Guid interfaceGuid,
[In] WlanGetAvailableNetworkFlags flags,
[In, Out] IntPtr reservedPtr,
[Out] out IntPtr availableNetworkListPtr);
}
}
答案 0 :(得分:2)
C#是一种区分大小写的语言。正确的名称是SolrClient
,其中" L"是小写。