Click here to Skip to main content
15,894,410 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: fixing vc6 installation Pin
_AnsHUMAN_ 18-Jul-11 18:16
_AnsHUMAN_ 18-Jul-11 18:16 
AnswerRe: fixing vc6 installation Pin
Richard MacCutchan18-Jul-11 21:11
mveRichard MacCutchan18-Jul-11 21:11 
GeneralRe: fixing vc6 installation Pin
John R. Shaw19-Jul-11 4:11
John R. Shaw19-Jul-11 4:11 
GeneralRe: fixing vc6 installation Pin
Richard MacCutchan19-Jul-11 6:09
mveRichard MacCutchan19-Jul-11 6:09 
GeneralRe: fixing vc6 installation Pin
Rolf Kristensen27-Jul-11 12:22
Rolf Kristensen27-Jul-11 12:22 
Questionvcredist_x86.exe Pin
RomTibi18-Jul-11 4:52
RomTibi18-Jul-11 4:52 
AnswerRe: vcredist_x86.exe Pin
Rajesh R Subramanian18-Jul-11 5:40
professionalRajesh R Subramanian18-Jul-11 5:40 
GeneralRe: vcredist_x86.exe Pin
RomTibi18-Jul-11 5:47
RomTibi18-Jul-11 5:47 
QuestionError while fetching null value Pin
Pranit Kothari18-Jul-11 1:02
Pranit Kothari18-Jul-11 1:02 
AnswerRe: Error while fetching null value Pin
dasblinkenlight18-Jul-11 2:44
dasblinkenlight18-Jul-11 2:44 
Questionproblem in setting font to CComboBox in XP? Pin
yogish29317-Jul-11 23:55
yogish29317-Jul-11 23:55 
AnswerRe: problem in setting font to CComboBox in XP? Pin
«_Superman_»18-Jul-11 3:57
professional«_Superman_»18-Jul-11 3:57 
GeneralRe: problem in setting font to CComboBox in XP? Pin
yogish29318-Jul-11 20:41
yogish29318-Jul-11 20:41 
QuestionHow to delete char Array-Memory leak detection Pin
Anu_Bala17-Jul-11 20:55
Anu_Bala17-Jul-11 20:55 
AnswerRe: How to delete char Array-Memory leak detection Pin
CPallini17-Jul-11 21:36
mveCPallini17-Jul-11 21:36 
AnswerRe: How to delete char Array-Memory leak detection Pin
Code-o-mat17-Jul-11 21:55
Code-o-mat17-Jul-11 21:55 
GeneralRe: How to delete char Array-Memory leak detection Pin
Anu_Bala17-Jul-11 22:14
Anu_Bala17-Jul-11 22:14 
GeneralRe: How to delete char Array-Memory leak detection Pin
Code-o-mat17-Jul-11 22:31
Code-o-mat17-Jul-11 22:31 
GeneralRe: How to delete char Array-Memory leak detection Pin
Anu_Bala17-Jul-11 22:39
Anu_Bala17-Jul-11 22:39 
GeneralRe: How to delete char Array-Memory leak detection Pin
Code-o-mat17-Jul-11 22:47
Code-o-mat17-Jul-11 22:47 
GeneralRe: How to delete char Array-Memory leak detection Pin
Stefan_Lang20-Jul-11 1:21
Stefan_Lang20-Jul-11 1:21 
AnswerRe: How to delete char Array-Memory leak detection Pin
Albert Holguin18-Jul-11 5:31
professionalAlbert Holguin18-Jul-11 5:31 
QuestionHow to open and read/write from multiple serial ports at the same time? Pin
Le@rner17-Jul-11 20:42
Le@rner17-Jul-11 20:42 
Hi all,

i am using CreateFile to open the port,its working fine when i am handle this with only single port.

but now i want to open multiple port at the same time and perform read/write operation on these ports.

In The open port method, it opens the first available port and when it gets the second it closes the opened one and then opens the next port and so on.

if (IsOpen())
  {
    //Close down the comms port
    BOOL bSuccess = CloseHandle(m_hComm);
    m_hComm = INVALID_HANDLE_VALUE;
    if (!bSuccess)
      TRACE(_T("Failed to close up the comms port, GetLastError:%d\n"), GetLastError());
  }
  
  //Free the event object we are using
  if (m_hEvent)
  {
    CloseHandle(m_hEvent);
    m_hEvent = NULL;
  }

//Call CreateFile to open up the comms port
  CString sPort;
  sPort.Format(_T("\\\\.\\COM%d"), nPort);
  m_hComm = CreateFile(sPort, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);


so please help me how can i do this.

thanks in advance.
AnswerRe: How to open and read/write from multiple serial ports at the same time? Pin
Code-o-mat17-Jul-11 20:50
Code-o-mat17-Jul-11 20:50 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Le@rner17-Jul-11 20:56
Le@rner17-Jul-11 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.