title: Visual Studio 2008 WriteFile
body: <p>Im using VS2008 for compiling and developing my application. Im required to take Adc input and serial print it through RS232 in a WinCE6 OS over some termianl like putty or hyperterminal. The problem is when I use the WriteFile function it gives me the following error.</p>
  
  <pre><code> Error  3   error C2440: '=' : cannot convert from 'double' to 'char [32]'  c:\Users\Sohan\Downloads\uartdemo\uartdemo\src\main.c   137 Sohan_1
  </code></pre>
  
  <p>I want to take the input from ADC channel and then after converting it to voltage i have to transmitt. I have tried using a constant char string and it works but when i take the input from the channel and then try it doesnt work.</p>
  
  <pre><code>HANDLE portHandle;
  DWORD noOfBytesRead = 0;
  DWORD bytesTransmitted = 0;   
  DWORD firstChoice = 0;
  BOOL retVal = FALSE;
  char c="hello";
  
  char transmit2Buffer[BUFFER_SIZE] = "7.8888v";
  
  char volt[BUFFER_SIZE];
  WriteFile(portHandle, transmit2Buffer, strlen(transmit2Buffer), &amp;bytesTransmitted, NULL);
  
  WriteFile(portHandle, volt, strlen(volt), &amp;bytesTransmitted, NULL); 
  </code></pre>
  
  <p>the first write function works but the second doesnt. variable volt will keep on changing so how should i write it.please help..</p>