Click here to Skip to main content
15,891,633 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Best way to measure time interval of external events Pin
CPallini25-Mar-09 7:34
mveCPallini25-Mar-09 7:34 
AnswerRe: Best way to measure time interval of external events Pin
Joe Woodbury25-Mar-09 7:43
professionalJoe Woodbury25-Mar-09 7:43 
GeneralRe: Best way to measure time interval of external events Pin
CPallini25-Mar-09 7:52
mveCPallini25-Mar-09 7:52 
AnswerRe: Best way to measure time interval of external events Pin
Jonathan Davies25-Mar-09 7:06
Jonathan Davies25-Mar-09 7:06 
QuestionMAC adresss code error Pin
optical12325-Mar-09 3:42
optical12325-Mar-09 3:42 
AnswerRe: MAC adresss code error Pin
Electron Shepherd25-Mar-09 4:40
Electron Shepherd25-Mar-09 4:40 
GeneralRe: MAC adresss code error Pin
optical12325-Mar-09 5:05
optical12325-Mar-09 5:05 
GeneralRe: MAC adresss code error Pin
Electron Shepherd25-Mar-09 7:06
Electron Shepherd25-Mar-09 7:06 
QuestionHow to Display Radio button dynamically on Dialog. Pin
hemlat25-Mar-09 3:39
hemlat25-Mar-09 3:39 
AnswerRe: How to Display Radio button dynamically on Dialog. Pin
led mike25-Mar-09 4:37
led mike25-Mar-09 4:37 
AnswerRe: How to Display Radio button dynamically on Dialog. Pin
Electron Shepherd25-Mar-09 4:45
Electron Shepherd25-Mar-09 4:45 
GeneralRe: How to Display Radio button dynamically on Dialog. [modified] Pin
hemlat25-Mar-09 18:08
hemlat25-Mar-09 18:08 
GeneralRe: How to Display Radio button dynamically on Dialog. Pin
mutpan4-Feb-10 5:46
mutpan4-Feb-10 5:46 
QuestionI/O operation sytem error Pin
LCI25-Mar-09 3:33
LCI25-Mar-09 3:33 
I am in a loop, reading from an RS232 port. There are times when i receive an exception with a system message that says:
"The I/O operation has been aborted because of either a thread exit or an application request"

// read a byte from port
while (!m_bExit)
{

// reset flag variables
dwBytesRead = 0;

// read
bRC = ReadFile(m_hCommPort, pDataBuff, 20, &dwBytesRead, NULL);
dwError = GetLastError();

if (!bRC)
{
if (ERROR_HANDLE_EOF != dwError || ERROR_TIMEOUT != dwError)
{
LPVOID SysMsg;

// reterieve system message
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dwError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&SysMsg,
0,
NULL );

// show system message
ZeroMemory( m_szBuffer, sizeof(m_szBuffer) );
wsprintf(m_szBuffer, TEXT("ReadRS232Data() over %s: ReadFile(), %s"), m_Port, (LPCTSTR)SysMsg);

LocalFree(SysMsg);
return 0;
}
}

Has anyone ever found a solution to this or know what would cause this error? Cause once this happens you cannot read from the port until it is out of this conditions which seems to just happen on its own.

Thanks in advance for any help or direction.
AnswerRe: I/O operation sytem error Pin
led mike25-Mar-09 4:33
led mike25-Mar-09 4:33 
GeneralRe: I/O operation sytem error Pin
Cedric Moonen25-Mar-09 4:40
Cedric Moonen25-Mar-09 4:40 
GeneralRe: I/O operation sytem error Pin
LCI25-Mar-09 5:37
LCI25-Mar-09 5:37 
QuestionCatch(exception) Pin
NewVC++25-Mar-09 2:39
NewVC++25-Mar-09 2:39 
AnswerRe: Catch(exception) Pin
Cedric Moonen25-Mar-09 2:41
Cedric Moonen25-Mar-09 2:41 
JokeRe: Catch(exception) Pin
Yusuf25-Mar-09 3:12
Yusuf25-Mar-09 3:12 
GeneralRe: Catch(exception) Pin
ThatsAlok25-Mar-09 17:43
ThatsAlok25-Mar-09 17:43 
GeneralRe: Catch(exception) Pin
Cedric Moonen25-Mar-09 21:05
Cedric Moonen25-Mar-09 21:05 
QuestionIE Toolbar development? Pin
ritz123425-Mar-09 2:25
ritz123425-Mar-09 2:25 
AnswerRe: IE Toolbar development? Pin
Mahesh Kulkarni25-Mar-09 2:57
Mahesh Kulkarni25-Mar-09 2:57 
GeneralRe: IE Toolbar development? Pin
ritz123425-Mar-09 3:14
ritz123425-Mar-09 3:14 

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.