static void Main(string[] args) { MbnInterfaceManager mbnInfMgr = new MbnInterfaceManager(); IMbnInterfaceManager infMgr = (IMbnInterfaceManager)mbnInfMgr; MbnConnectionManager mbnConnectionMgr = new MbnConnectionManager(); IMbnConnectionManager ImbnConnectionMgr = (IMbnConnectionManager)mbnConnectionMgr; IMbnConnection[] connections = (IMbnConnection[])ImbnConnectionMgr.GetConnections(); foreach (IMbnConnection conn in connections) { IMbnInterface mobileInterface = infMgr.GetInterface(conn.InterfaceID) as IMbnInterface; MBN_INTERFACE_CAPS caps = mobileInterface.GetInterfaceCapability(); MBN_PROVIDER provider = mobileInterface.GetHomeProvider(); Console.WriteLine("Device Id :" + caps.deviceID); Console.WriteLine("DataClass: " + caps.cellularClass); Console.WriteLine("Manufacturer: " + caps.manufacturer); Console.WriteLine("Model : " + caps.model); Console.WriteLine("Firmware Version: " + caps.firmwareInfo); Console.WriteLine("Manufacturer: " + caps.manufacturer); Console.WriteLine("Model: " + caps.model); Console.WriteLine("DeviceID: " + caps.deviceID); Console.WriteLine("FirmwareInfo: " + caps.firmwareInfo); Console.WriteLine("InterfaceID: " + mobileInterface.InterfaceID); Console.WriteLine("Provider: " + provider.providerName); Console.WriteLine("ProviderID: " + provider.providerID); Console.WriteLine("ProviderState: " + provider.providerState); } Console.ReadKey(true); }
// Initialize the MBN interfaces public void InitializeManagers() { try { // Get MbnInterfaceManager if (m_MbnInterfaceManager == null) { m_MbnInterfaceManager = (IMbnInterfaceManager) new MbnInterfaceManager(); } // Get MbnConnectionManager if (m_MbnConnectionManager == null) { m_MbnConnectionManager = (IMbnConnectionManager) new MbnConnectionManager(); } // Get MbnDeviceServicesManager if (m_MbnDeviceServicesManager == null) { m_MbnDeviceServicesManager = (IMbnDeviceServicesManager) new MbnDeviceServicesManager(); } } catch (Exception e) { MessageBox.Show(ParseExceptionCode(e)); } }
public void InitializeManagers() { lock (syncRoot) { try { // Get MbnInterfaceManager if (m_MbnInterfaceManager == null) { m_MbnInterfaceManager = (IMbnInterfaceManager) new MbnInterfaceManager(); } // Get MbnConnectionManager if (m_MbnConnectionManager == null) { m_MbnConnectionManager = (IMbnConnectionManager) new MbnConnectionManager(); } // Get MbnDeviceServicesManager if (m_MbnDeviceServicesManager == null) { m_MbnDeviceServicesManager = (IMbnDeviceServicesManager) new MbnDeviceServicesManager(); } // Register for notifications RegisterForNotifications(); } catch (Exception e) { rootPage.NotifyUser(ParseExceptionCode(e), NotifyType.ErrorMessage); } } }
// Initialize the MBN interfaces public void InitializeManagers() { lock (syncRoot) { try { // Get MbnInterfaceManager if (m_MbnInterfaceManager == null) { m_MbnInterfaceManager = (IMbnInterfaceManager)new MbnInterfaceManager(); } // Get MbnConnectionManager if (m_MbnConnectionManager == null) { m_MbnConnectionManager = (IMbnConnectionManager)new MbnConnectionManager(); } // Get MbnDeviceServicesManager if (m_MbnDeviceServicesManager == null) { m_MbnDeviceServicesManager = (IMbnDeviceServicesManager)new MbnDeviceServicesManager(); } // Register for notifications RegisterForNotifications(); } catch (Exception e) { rootPage.NotifyUser(ParseExceptionCode(e), NotifyType.ErrorMessage); } } }