LittlePerson
asked on
Serial Communications
Hi
I am re-jigging some code I have used for some time now and have hit a small
problem.
I have two apps using the same serial comm code. On a call to
OnSerialMsg in the new app I am building
The debugger keeps bringing up the file
C\...\SRC\Intel\CHKSTK.ASM
File Header....
page ,132
title chkstk - C stack checking routine
;***
;chkstk.asm - C stack checking routine
;
; Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
;
;Purpose:
; Provides support for automatic stack checking in C procedures
; when stack checking is enabled.
End File Header
Then as soon as it hits any one of the if statements the debugger jumps to
return 0 and exits the function. I have debugged this code many times
and have never had this happen
LRESULT CSerialDlg::OnSerialMsg(WP ARAM wParam, LPARAM /*lParam*/)
{
CSerialAPI::EEvent eEvent = CSerialAPI::EEvent(LOWORD( wParam));
CSerialAPI::EError eError = CSerialAPI::EError(HIWORD( wParam));
if (eError)
// what a do?
if (eEvent & CSerialAPI::EEventBreak)
if (eEvent & CSerialAPI::EEventError)
if (eEvent & CSerialAPI::EEventRcvEv)
....................
return 0;
}
Any help much appreciated
LittlePerson
I am re-jigging some code I have used for some time now and have hit a small
problem.
I have two apps using the same serial comm code. On a call to
OnSerialMsg in the new app I am building
The debugger keeps bringing up the file
C\...\SRC\Intel\CHKSTK.ASM
File Header....
page ,132
title chkstk - C stack checking routine
;***
;chkstk.asm - C stack checking routine
;
; Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
;
;Purpose:
; Provides support for automatic stack checking in C procedures
; when stack checking is enabled.
End File Header
Then as soon as it hits any one of the if statements the debugger jumps to
return 0 and exits the function. I have debugged this code many times
and have never had this happen
LRESULT CSerialDlg::OnSerialMsg(WP
{
CSerialAPI::EEvent eEvent = CSerialAPI::EEvent(LOWORD(
CSerialAPI::EError eError = CSerialAPI::EError(HIWORD(
if (eError)
// what a do?
if (eEvent & CSerialAPI::EEventBreak)
if (eEvent & CSerialAPI::EEventError)
if (eEvent & CSerialAPI::EEventRcvEv)
....................
return 0;
}
Any help much appreciated
LittlePerson
ASKER
I am not understanding !!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the replies.
I will post more code later as time is tight at the moment. The only change I made
is that instead of writing CString* over the serial communication I am now sending
an unsigned char.
Till later...
Thanks
I will post more code later as time is tight at the moment. The only change I made
is that instead of writing CString* over the serial communication I am now sending
an unsigned char.
Till later...
Thanks
ASKER
Thanks again for the reply and sorry for the delay in getting
back to the question. Fortunately the code is performing OK now
(well I have a new problem now - new question to be posted)
Hopefully you can help with this new problem.
Regards
LittlePerson
back to the question. Fortunately the code is performing OK now
(well I have a new problem now - new question to be posted)
Hopefully you can help with this new problem.
Regards
LittlePerson
Standard for C/C++ is __cdecl which means right to left pushing of arguments. Callee must clean the stack.