Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionLatency timer settings of communication port Pin
AnayKulkarni25-Mar-09 2:01
AnayKulkarni25-Mar-09 2:01 
AnswerRe: Latency timer settings of communication port Pin
Cedric Moonen25-Mar-09 2:16
Cedric Moonen25-Mar-09 2:16 
GeneralRe: Latency timer settings of communication port Pin
AnayKulkarni25-Mar-09 2:55
AnayKulkarni25-Mar-09 2:55 
GeneralRe: Latency timer settings of communication port Pin
Jonathan Davies25-Mar-09 6:55
Jonathan Davies25-Mar-09 6:55 
AnswerRe: Latency timer settings of communication port Pin
Member 1296297027-Feb-17 18:48
Member 1296297027-Feb-17 18:48 
Questionerror C3861: 'CeGetDeviceId': identifier not found and rapi.lib and ceutil.lib not load successfully. Pin
Le@rner25-Mar-09 1:36
Le@rner25-Mar-09 1:36 

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.