title: Receive NMEA0183 data from COM PORT C++
body: <p>Hy everybody!</p>
  
  <p>I wrote a small gps application in simple C++, what switch the protocoll, send command to the gps chip...etc.
  The write to the GPS port is working good.
  But when I try to read the port (for check the accepted commands) I receive a lot of stupid characters. Normally an NMEA output message is something like this: </p>
  
  <pre><code>$GPGLL,4916.45,N,12311.12,W,225444,A
  </code></pre>
  
  <p>And I received similar:</p>
  
  <pre><code>1C0CFC14
  </code></pre>
  
  <p>I dont know whats wrong...
  This part of my code is the next:</p>
  
  <pre><code>LPCVOID buffer[100];
  ReadFile(hSerial, buffer, 100, 0, 0);
  </code></pre>
  
  <p>Or an other for log some data:</p>
  
  <pre><code>LPCVOID buffer[100];
  ReadFile(hSerial, buffer, 100, 0, 0);
  ofstream log ("log.txt");
  log &lt;&lt; buffer;
  log.close();
  </code></pre>
  
  <p>Of course the Hserial is declared before and its working good for write.
  When Im declared the HANDLE I opened the hSerial file to read and write too.
  The targeted platform is Windows Mobile 5.0 and 6.0.
  Whats wrong?
  Many thanks for the help!</p>