【问题标题】:Windows 7 Mobile Broadband API - Crash with no exceptionWindows 7 移动宽带 API - 崩溃无一例外
【发布时间】:2011-03-28 03:30:47
【问题描述】:

以下代码在完成前退出,无一例外:

    private void Form1_Load(object sender, EventArgs e)
    {
        MbnConnectionManager connectionManager = new MbnConnectionManager();
        IMbnConnectionManager connectionManagerInterface = (IMbnConnectionManager)connectionManager;
       IMbnConnection[] connections = (IMbnConnection[])connectionManagerInterface.GetConnections();


       (IMbnConnectionProfileManager)connectionProfile;
        MbnApi.MbnInterfaceManager interfaceManager = new MbnInterfaceManager();
        MbnApi.IMbnInterfaceManager interfaceManagerInterface = (IMbnInterfaceManager)interfaceManager;

        IMbnInterface[] interfaces = interfaceManagerInterface.GetInterfaces() as IMbnInterface[];

        foreach (IMbnInterface mbnInterface in interfaces)
        {
            MBN_PROVIDER homeProvider = mbnInterface.GetHomeProvider(out homeProvider);
        }

    }

这条线似乎是导致崩溃的原因 -

MBN_PROVIDER homeProvider = mbnInterface.GetHomeProvider(out homeProvider);

为什么会发生这种情况?有什么方法可以查看移动宽带 API 内部的实际情况?

【问题讨论】:

    标签: c# windows-7 com mobile-broadband-api


    【解决方案1】:

    您是否在系统中注册了宽带设备?

    1. 打开您的网络和共享中心,查看是否有移动宽带连接设备。
    2. 尝试运行以下命令:netsh mbn show interfaces

    【讨论】:

    • 我无法再访问我用来测试它的设备,但我会检查我拥有的任何其他设备是否使用此 API。对于其他搜索这方面信息的人来说,华为设备似乎使用此 API。感谢您的回答 - 无论如何,很高兴获得额外的信息。
    • netsh>mbn show interfaces 没有移动宽带接口
    • 设备是否使用MBN API取决于设备驱动。这是由获得定制驱动程序的设备提供商(电信公司)指定的,而不是制造商。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-09
    • 1970-01-01
    相关资源
    最近更新 更多