Click here to Skip to main content
15,896,063 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionI need help with my code Pin
bzz073-Aug-09 1:39
bzz073-Aug-09 1:39 
AnswerRe: I need help with my code Pin
Luc Pattyn3-Aug-09 2:17
sitebuilderLuc Pattyn3-Aug-09 2:17 
GeneralRe: I need help with my code Pin
bzz073-Aug-09 2:32
bzz073-Aug-09 2:32 
QuestionSetProxy function throwing exception Pin
Ash_VCPP3-Aug-09 1:39
Ash_VCPP3-Aug-09 1:39 
AnswerRe: SetProxy function throwing exception Pin
Bacon Ultimate Cheeseburger3-Aug-09 12:55
Bacon Ultimate Cheeseburger3-Aug-09 12:55 
GeneralRe: SetProxy function throwing exception Pin
Ash_VCPP3-Aug-09 20:40
Ash_VCPP3-Aug-09 20:40 
GeneralRe: SetProxy function throwing exception Pin
Bacon Ultimate Cheeseburger3-Aug-09 21:56
Bacon Ultimate Cheeseburger3-Aug-09 21:56 
GeneralRe: SetProxy function throwing exception Pin
Ash_VCPP3-Aug-09 22:32
Ash_VCPP3-Aug-09 22:32 
QuestionUINT ThreadProc ( LPVOID param ) Pin
susanne13-Aug-09 1:12
susanne13-Aug-09 1:12 
AnswerRe: UINT ThreadProc ( LPVOID param ) Pin
CPallini3-Aug-09 1:23
mveCPallini3-Aug-09 1:23 
GeneralRe: UINT ThreadProc ( LPVOID param ) Pin
susanne13-Aug-09 3:24
susanne13-Aug-09 3:24 
GeneralRe: UINT ThreadProc ( LPVOID param ) Pin
CPallini3-Aug-09 11:46
mveCPallini3-Aug-09 11:46 
QuestionRe: UINT ThreadProc ( LPVOID param ) Pin
David Crow3-Aug-09 3:55
David Crow3-Aug-09 3:55 
AnswerRe: UINT ThreadProc ( LPVOID param ) Pin
susanne13-Aug-09 5:23
susanne13-Aug-09 5:23 
QuestionRe: UINT ThreadProc ( LPVOID param ) Pin
David Crow3-Aug-09 5:26
David Crow3-Aug-09 5:26 
AnswerRe: UINT ThreadProc ( LPVOID param ) Pin
Michael Dunn3-Aug-09 9:48
sitebuilderMichael Dunn3-Aug-09 9:48 
QuestionNon Ovelapped Serial I/O Pin
sunny_vc2-Aug-09 23:37
sunny_vc2-Aug-09 23:37 
AnswerRe: Non Ovelapped Serial I/O Pin
«_Superman_»2-Aug-09 23:54
professional«_Superman_»2-Aug-09 23:54 
GeneralRe: Non Ovelapped Serial I/O Pin
sunny_vc3-Aug-09 0:16
sunny_vc3-Aug-09 0:16 
GeneralRe: Non Ovelapped Serial I/O Pin
«_Superman_»3-Aug-09 0:21
professional«_Superman_»3-Aug-09 0:21 
GeneralRe: Non Ovelapped Serial I/O Pin
CPallini3-Aug-09 0:46
mveCPallini3-Aug-09 0:46 
GeneralRe: Non Ovelapped Serial I/O Pin
sunny_vc3-Aug-09 0:59
sunny_vc3-Aug-09 0:59 
GeneralRe: Non Ovelapped Serial I/O Pin
CPallini3-Aug-09 1:17
mveCPallini3-Aug-09 1:17 
GeneralRe: Non Ovelapped Serial I/O Pin
sunny_vc3-Aug-09 2:05
sunny_vc3-Aug-09 2:05 
Even If I have to send data in the same receive thread,
I am unable to do as WaitCommEvent never returns.
My code block is:

 if (!SetCommMask( pc->hCommn, EV_RXCHAR))
 {
     //Error
 }
 for ( ; ; )
 {
 if (WaitCommEvent(pc->hCommn, &dwCommEvent, NULL))
 {

     do
     {
     if (ReadFile(pc->hCommn, &chRead, 1, &dwRead, NULL))
       {
          // A byte has been read; process it.
           pc->CopyRx(chRead);
       }
       else
       {
          // An error occurred in the ReadFile call.

          break;
       }
     }while(dwRead);
 }
else
   // Error in WaitCommEvent.
   break;
 }


Where can I call my send fucntion in this thread, if I have some data to send.
Please suggest.

Regards,
Sunil Kumar

QuestionRe: Non Ovelapped Serial I/O Pin
«_Superman_»3-Aug-09 2:35
professional«_Superman_»3-Aug-09 2:35 

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.