Question

The following code exits before it finishes with no exception:

    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);
        }

    }

This line seems to be causing the crash -

MBN_PROVIDER homeProvider = mbnInterface.GetHomeProvider(out homeProvider);

Why would this occur and is there any way to see what is really happening inside the Mobile Broadband API?

Was it helpful?

Solution

Have you registered a broadband device in your system?

  1. Open your network and sharing center and see if there is a Mobile Broadband Connection device.
  2. Try to run the following command: netsh mbn show interfaces
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top