Weil Windows 10 in der TH1 Variante (10.0.10240) im Network Connectivity Assistant (das Teil unten im Systray) und im “immversive Control Panel” den Status der WWAN Verbindung nicht angezeigt hat (TH2/10.0.10586 machts jetzt eh) wollte ich wissen wie man das programmatisch ausliest weil auf der Loginmaske konnte auch TH1 sehr wohl die Info anzeigen – das Ganze geht über Mobile Broadband API, da die COM basiert ist (C:\Windows\System32\wwanapi.dll als Referenz hinzufügen) kann man das auch recht fein von managed Code machen:

using System;
using MbnApi;

namespace CellularStatus
{
   class Program
   {
      static void Main(string[] args)
      {
         MbnConnectionManager oConnMgr = new MbnConnectionManager();
         MbnInterfaceManager oIntMgr = new MbnInterfaceManager();
         MBN_ACTIVATION_STATE oState;
         string sProfile;

         try
         {
            foreach (IMbnConnection oConn in ((IMbnConnectionManager)oConnMgr).GetConnections())
            {
               oConn.GetConnectionState(out oState, out sProfile);

               Console.WriteLine("State      : " + oState);
               Console.WriteLine("Profile    : " + sProfile);
            }
         }
         catch (Exception oExc)
         {
            Console.WriteLine("Exception getting connection(s): " + oExc.Message);
         }


         try
         {
            foreach (IMbnInterface oInt in ((IMbnInterfaceManager)oIntMgr).GetInterfaces())
            {
               Console.WriteLine("Data Class : " + (MBN_DATA_CLASS)((IMbnRegistration)oInt).GetCurrentDataClass());
            }
         }
         catch (Exception oExc)
         {
            Console.WriteLine("Exception getting interface(s): " + oExc.Message);
         }

      }
   }
}