Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# OpenNetCf SDF未返回所有适配器_C#_Windows Mobile_Opennetcf - Fatal编程技术网

C# OpenNetCf SDF未返回所有适配器

C# OpenNetCf SDF未返回所有适配器,c#,windows-mobile,opennetcf,C#,Windows Mobile,Opennetcf,通过以下方式调用GetAllNetworkInterfaces()时: 我只返回一个适配器RNDISFN1,它有一个链接本地地址(169.254…。 我怀疑发生了一些不好的事情,导致阵列中没有填充所有适配器;在调试器下,当我启动函数时,我看到: A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll A first chance exception of type 'S

通过以下方式调用GetAllNetworkInterfaces()时:

我只返回一个适配器RNDISFN1,它有一个链接本地地址(169.254…。
我怀疑发生了一些不好的事情,导致阵列中没有填充所有适配器;在调试器下,当我启动函数时,我看到:

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in CSharpSample.exe
A first chance exception of type 'System.MissingMethodException' occurred in OpenNETCF.Net.dll
A first chance exception of type 'OpenNETCF.Net.NetworkInformation.NetworkInformationException' occurred in OpenNETCF.Net.dll
明确地说,这项工作的最终目标是获得无线配置文件列表,并能够在它们之间切换。


现在,有人看到过GetAllNetworkInterfaces()不返回所有适配器的实例吗?我使用的是Windows Mobile 6下的OpenNetCF SDF v2.3版。

事实上,您只看到一个适配器(我可以通过名称来判断),这表明您已处于摇篮状态。ActiveSync非常出色,在摇篮中时会关闭所有其他收音机,因此不会出现其他收音机。在没有摇篮的情况下运行代码,您可能会看到您的WiFi(和任何其他)适配器出现。

事实上,您只看到一个适配器(我可以从名称看出),这表明您已摇篮。ActiveSync非常出色,在摇篮中时会关闭所有其他收音机,因此不会出现其他收音机。在没有摇篮的情况下运行代码,您可能会看到您的WiFi(和任何其他)适配器出现。

这是什么类型的硬件?当您运行相同的代码,但没有通过ActiveSync连接时,结果会如何变化;ActiveSync已禁用收音机。如果我强制打开收音机,我会在列表中看到适配器。不幸的是,OpenNetCF(我相信WinAPI)将此适配器视为以太网;我无法将其转换为WirelessZeroConfigNetworkInterface或WirelessNetworkInterface。@克里斯:这是在Socket Mobile 650上运行的。关于我的第二个评论(为什么我把它看作以太网),我仍然没有将最新的套接字服务包应用到这个单元。适配器可能会在以后将自己作为WZC发布。@Chris:刚刚应用了最新的SP;没有变化;仍以以太网形式报告。不管怎样,你回答“你被抱着了,wifi关闭了”这句话最终回答了我最初的问题。如果你用相同的信息发布了一个答案,我会将其视为已接受。这是什么类型的硬件?当您运行相同的代码,但没有通过ActiveSync连接时,结果会如何变化;ActiveSync已禁用收音机。如果我强制打开收音机,我会在列表中看到适配器。不幸的是,OpenNetCF(我相信WinAPI)将此适配器视为以太网;我无法将其转换为WirelessZeroConfigNetworkInterface或WirelessNetworkInterface。@克里斯:这是在Socket Mobile 650上运行的。关于我的第二个评论(为什么我把它看作以太网),我仍然没有将最新的套接字服务包应用到这个单元。适配器可能会在以后将自己作为WZC发布。@Chris:刚刚应用了最新的SP;没有变化;仍以以太网形式报告。不管怎样,你回答“你被抱着了,wifi关闭了”这句话最终回答了我最初的问题。如果你用相同的信息发布了一个答案,我会将其视为已接受。
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in CSharpSample.exe
A first chance exception of type 'System.MissingMethodException' occurred in OpenNETCF.Net.dll
A first chance exception of type 'OpenNETCF.Net.NetworkInformation.NetworkInformationException' occurred in OpenNETCF.Net.dll