Tag: mobile broadband api

当没有MBN设备时,来自IMbnInterfaceManager :: GetInterfaces的hresult

我在Windows 7中使用以下代码: MbnInterfaceManager mbnInfMgr = new MbnInterfaceManager(); IMbnInterfaceManager mbnInfMgrInterface = mbnInfMgr as IMbnInterfaceManager; if (mbnInfMgrInterface != null) { IMbnInterface[] mobileInterfaces = mbnInfMgrInterface.GetInterfaces() as IMbnInterface[]; } MBN设备存在但MBN设备不存在时没有问题我在调用GetInterfaces()时遇到以下exception: {System.Runtime.InteropServices.COMException(0x80070490):找不到元素。 (来自HRESULT的exception:0x80070490)位于foo的MbnApi.IMbnInterfaceManager.GetInterfaces(),foo中的.Program.configureConnection() 问题在调用GetInterfaces之前,是否应该检查MBN接口? 我可以简单地捕获此exception,但我找不到任何文档说明此exception与没有接口相同。 我在statckoverflow上发现的最接近的事情就是使用C#在移动宽带api windows 7和Windows 8上挣扎,不知道安装什么意味着Windows 7的行为可能与Windows 8.1不同。