title: Port not found when mapping a virtual serial port in Windows Mobile 6 Device Emulator
body: <p>I'm working on a Windows Mobile 6.5 application that utilises a barcode scanner. I'm attempting to emulate the behaviour of the scanner on the Windows Mobile 6 Device Emulator in my development environment. </p>
  
  <p>I've created a pair of virtual serial ports using com0com ('COM2' and 'COMA'). I've confirmed both of these  virtual serial ports are working using HyperTerminal and Portmon. I've mapped COM2 to the first serial port ('Serial port 0') in the emulator. As I understand, this port should then be accessible as 'COM1' on the device.</p>
  
  <p>Calling SerialPort.GetPortNames() on the device reports three serial ports:- 'COM1', 'COM3', 'COM5'. On attempting to open this port an IO exception is being thrown stating that the serial port does not exist.</p>
  
  <p>Any suggestions as to possible causes for this problem?</p>
  
  <p>As requested, the code that opens the port:-</p>
  
  <pre><code>        // Set up the serial port and open
          serialPort.PortName = "COM1";
          serialPort.BaudRate = 9600;
          serialPort.DataBits = 8;
          serialPort.Handshake = Handshake.None;
          serialPort.Parity = Parity.None;
          serialPort.StopBits = StopBits.One;
          serialPort.ReadTimeout = 250;
          serialPort.Open();
  </code></pre>