移动宽带API异常 [英] Mobile Broadband API Exception

查看:164
本文介绍了移动宽带API异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我尝试使用C#在托管代码中使用Windows Mobile宽带API,首先,我使用.net工具tlbimp.exe将Mbnapi.tlb转换为Mbnapi.dll,之后,我使用Visual Studio 2010在C#中创建控制台项目,然后添加我的项目中对Mbnapi.dll的引用,当我编写此代码简单时,我遇到了此异常:

Hi,

I try to use the Windows Mobile Broadband API in managed code with C#, First I convert the Mbnapi.tlb to Mbnapi.dll with .net tool tlbimp.exe, After that I create the console project in C# with Visual Studio 2010 and I add reference of Mbnapi.dll in my project, when i write this code simple I have this exception :

<br />
MbnConnectionManager mcm = new MbnConnectionManager();<br />
IMbnConnectionManager icm = (IMbnConnectionManager)mcm;<br />
IMbnConnection[] connections = (IMbnConnection[])icm.GetConnections();<br />



不幸的是,它们不能很好地工作.我在第3行有此异常:



Unfortunately they not work very well. I have this exception in line 3 :

<br />
Element not found. (Exception from HRESULT: 0x80070490)<br />

推荐答案

您是否已在系统中注册设备?
尝试命令行:netsh mbn show interfaces
Do you have registered devices in your system?
Try command line: netsh mbn show interfaces


这篇关于移动宽带API异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆