以下代码在完成之前退出,无一例外:
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 中实际发生的情况?