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

C / C++ / MFC

 
QuestionRe: Working with DB Pin
David Crow26-Jan-09 2:56
David Crow26-Jan-09 2:56 
AnswerRe: Working with DB Pin
Jose David Pujo26-Jan-09 4:38
Jose David Pujo26-Jan-09 4:38 
QuestionAfxGetInstanceHandle Crash in MFC Extension dlls Pin
Neptunex25-Jan-09 17:55
Neptunex25-Jan-09 17:55 
AnswerRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Randor 25-Jan-09 18:23
professional Randor 25-Jan-09 18:23 
AnswerRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Neptunex26-Jan-09 0:53
Neptunex26-Jan-09 0:53 
GeneralRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Randor 26-Jan-09 9:21
professional Randor 26-Jan-09 9:21 
GeneralRe: AfxGetInstanceHandle Crash in MFC Extension dlls Pin
Neptunex3-Mar-09 20:27
Neptunex3-Mar-09 20:27 
QuestionCommunication app. using dial-up modem times out Pin
Member 171596825-Jan-09 17:51
Member 171596825-Jan-09 17:51 
Hello,

I developed an application for my client using VC++ 2005 (unmanaged) that monitors equipment at different remote sites. It communicates with the equipment through Leased Line or Dial-up modem. In my case, same modem is working as leased line and dial-up modem. The application is working fine when leased line is used, but with dial-up connection, sometimes it shows timeout. My client has a similar Win16 application which is working fine with same phone line, modem and equipment.

The equipment uses ACK/NAK for successful/unsuccessful data communication.

I am using a small speed of 2400 baud, opened for overlapped operation, "ReadIntervalTimeout" value is set to 1 and all the other timeout values are set to 0.

My port reader function is reading 1 byte at a time, and it is working fine for all other cases except for the dial-up modem. Is this the problem for timeout?

I have captured the data at timeout and analyzed the data byte by byte, found that port reader function is reading invalid data. Suppose, a valid data stream is 32 bytes in length, the reader function is reading all 32 bytes, failed to read last few byte(s) in time, but end up with a complete data stream of perfect length of 32.

Say, this is a valid data:
10 02 1c 00 43 4d 54 00 00 00 00 00 00 00 31 00
00 00 00 00 00 00 01 00 62 00 65 07 74 49 8a a1

But when timeout occurs, this data is getting read like this
10 02 1c 00 43 4d 54 00 00 00 00 00 00 00 31 00
00 00 00 00 00 00 00 01 00 62 00 65 07 74 49 8a

The last byte "a1" is read later but before that my function send the previous data for CRC check that will obviously failed. This thing is happening for large data stream.

Someone please tell me how I can handle this TIMEOUT problem.

Thanks in advance.
AnswerRe: Communication app. using dial-up modem times out Pin
Jonathan Davies25-Jan-09 23:51
Jonathan Davies25-Jan-09 23:51 
GeneralRe: Communication app. using dial-up modem times out Pin
Member 171596827-Jan-09 20:00
Member 171596827-Jan-09 20:00 
GeneralRe: Communication app. using dial-up modem times out Pin
Jonathan Davies27-Jan-09 21:27
Jonathan Davies27-Jan-09 21:27 
QuestionIs "Create window in Work thread" a bad design? Pin
fitatc25-Jan-09 15:16
fitatc25-Jan-09 15:16 
AnswerRe: Is "Create window in Work thread" a bad design? Pin
«_Superman_»25-Jan-09 16:20
professional«_Superman_»25-Jan-09 16:20 
AnswerRe: Is "Create window in Work thread" a bad design? Pin
Joshua Tully25-Jan-09 16:31
Joshua Tully25-Jan-09 16:31 
GeneralRe: Is "Create window in Work thread" a bad design? Pin
fitatc25-Jan-09 21:17
fitatc25-Jan-09 21:17 
QuestionNeed help to create GUI application form in C++ and create instalation program for it. Pin
hdavari25-Jan-09 3:11
hdavari25-Jan-09 3:11 
AnswerRe: Need help to create GUI application form in C++ and create instalation program for it. Pin
Maximilien25-Jan-09 4:01
Maximilien25-Jan-09 4:01 
QuestionRe: Need help to create GUI application form in C++ and create instalation program for it. Pin
David Crow26-Jan-09 3:00
David Crow26-Jan-09 3:00 
QuestionItems are not visible in a ListBox [modified] Pin
Elsie25-Jan-09 1:45
Elsie25-Jan-09 1:45 
AnswerRe: Items are not visible in a ListBox Pin
Hans Dietrich25-Jan-09 6:25
mentorHans Dietrich25-Jan-09 6:25 
GeneralRe: Items are not visible in a ListBox Pin
Elsie25-Jan-09 17:40
Elsie25-Jan-09 17:40 
QuestionHow to get message when tab is changed in one MDI multiple tab application Pin
fujoey24-Jan-09 22:52
fujoey24-Jan-09 22:52 
QuestionUnable to move slider position using mouse [modified] Pin
John50224-Jan-09 12:29
John50224-Jan-09 12:29 
AnswerRe: Unable to move slider position using mouse Pin
David Crow24-Jan-09 14:08
David Crow24-Jan-09 14:08 
GeneralRe: Unable to move slider position using mouse [modified] Pin
John50225-Jan-09 0:42
John50225-Jan-09 0:42 

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.