Esempio n. 1
1
 private static Line GetCellLine(Tapi tapi)
 {
     for (int count = 0; count <tapi.NumDevices; count++)
      {
          try
          {
              LINEDEVCAPS dc = new LINEDEVCAPS(1024);
              dc.Store();
              int dwVersion = tapi.NegotiateVersion(count);
              NativeTapi.lineGetDevCaps(tapi.hLineApp, count, dwVersion, 0, dc.Data);
              dc.Load();
              if (dc.LineName == CellTSP.CELLTSP_LINENAME_STRING)
              {
                  return tapi.CreateLine(count, LINEMEDIAMODE.INTERACTIVEVOICE, LINECALLPRIVILEGE.OWNER);
              }
          }
          catch { }
      }
      return null;
 }