Define " that code page". if your device expects a single-byte extended ASCII encoding such as iso8859-5 or cp1251, your code is not sending that, it is sending a wide string (that is, encoded as UTF-16le on Windows, UTF-32 on more Unicode-aware systems).
Thanks to all the experts for your guidance. With your guidance I am progressing slowly but not as expected... :-)<o:p></o:p>
Now, the problem is that when I pass these Russian Characters from edit control. It is again mis-behaving as faced during starting of this discussion. But the same is working fine if I pass the data statically (hard code).
Code snippet used by me is like this one...
CString pBuffer;
m_text.GetWindowText(pBuffer); \\m_text is edit control variable.
int nBuffer = (pBuffer.GetLength()+1) * sizeof(TCHAR);
DWORD dwWritten=0;
returnval=WriteFile(pHandle , (void*)pBuffer.GetString(), nBuffer ,&dwWritten , NULL);
Thanks in advance !!