Click here to Skip to main content
15,915,172 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCEdit context menu customizing? Pin
Anonymous23-Oct-02 19:01
Anonymous23-Oct-02 19:01 
AnswerRe: CEdit context menu customizing? Pin
alex.barylski23-Oct-02 20:49
alex.barylski23-Oct-02 20:49 
GeneralRe: CEdit context menu customizing? Pin
Anonymous24-Oct-02 3:41
Anonymous24-Oct-02 3:41 
Questionhow to avoid activex runtime property? Pin
BK Pradeep23-Oct-02 18:23
BK Pradeep23-Oct-02 18:23 
QuestionDLL ? Pin
Stan the man23-Oct-02 18:15
Stan the man23-Oct-02 18:15 
AnswerRe: DLL ? Pin
Stan the man23-Oct-02 18:24
Stan the man23-Oct-02 18:24 
GeneralRe: DLL ? Pin
Stephane Rodriguez.23-Oct-02 21:37
Stephane Rodriguez.23-Oct-02 21:37 
Generalneed a second set of eyes Pin
Mel Feik23-Oct-02 17:28
Mel Feik23-Oct-02 17:28 
Can anyone see why this block, which is reading from the serial port, allows szBuffer to filled with more than 10 bytes? I just dont see how its being allocated more. When I run in the program it will allow an unlimited number of characters to be placed into szBuffer (so long as the '>' isnt sent to it (ASCII 62))

Any help would be appreciated
-Mel

ps. I left the last while statement there to lend clarity to what fContinue is doing but the code above is just error handling of error events and I was tryign to keep the post small so I left it out
-Mel

<br />
if (eEvent & CSerial::EEventRecv)<br />
{<br />
	// read until '>'<br />
	DWORD dwBytesRead = 0;<br />
	char szBuffer[10];<br />
	do<br />
	{<br />
	lLastError = serial.Read(szBuffer,sizeof(szBuffer)- 1,&dwBytesRead);<br />
	if(lLastError != ERROR_SUCCESS)<br />
		return ShowError(serial.GetLastError(), _T("Unable to read from COM-Port"));<br />
				<br />
	if(dwBytesRead >0)<br />
	{<br />
		if (szBuffer[dwBytesRead-1] == 62)<br />
			fContinue = false;<br />
	}<br />
	}while (dwBytesRead == sizeof(szBuffer)-1);<br />
		}//end of if(eEvent & CSerial::EEventRecv)<br />
	}while (fContinue);<br />
<br />


---------------------------------------------

Be good! But if you can't be good, at least be good at it and try not to get any on ya!

-mjf
GeneralRe: need a second set of eyes Pin
valikac23-Oct-02 17:32
valikac23-Oct-02 17:32 
GeneralRe: need a second set of eyes Pin
Mel Feik23-Oct-02 17:40
Mel Feik23-Oct-02 17:40 
GeneralRe: need a second set of eyes Pin
valikac23-Oct-02 18:05
valikac23-Oct-02 18:05 
Generalno good Pin
Mel Feik23-Oct-02 18:09
Mel Feik23-Oct-02 18:09 
GeneralRe: no good Pin
valikac23-Oct-02 20:38
valikac23-Oct-02 20:38 
GeneralRe: need a second set of eyes Pin
Todd Smith23-Oct-02 18:08
Todd Smith23-Oct-02 18:08 
GeneralRe: need a second set of eyes Pin
Mel Feik23-Oct-02 18:16
Mel Feik23-Oct-02 18:16 
GeneralRe: need a second set of eyes Pin
Todd Smith23-Oct-02 18:21
Todd Smith23-Oct-02 18:21 
GeneralRe: need a second set of eyes Pin
Mel Feik23-Oct-02 18:59
Mel Feik23-Oct-02 18:59 
Questionrun a perticuler registry key ? Pin
imran_rafique23-Oct-02 16:17
imran_rafique23-Oct-02 16:17 
AnswerRe: run a perticuler registry key ? Pin
Christian Graus23-Oct-02 16:25
protectorChristian Graus23-Oct-02 16:25 
GeneralRe: run a perticuler registry key ? Pin
imran_rafique23-Oct-02 17:01
imran_rafique23-Oct-02 17:01 
GeneralRe: run a perticuler registry key ? Pin
Christian Graus23-Oct-02 17:03
protectorChristian Graus23-Oct-02 17:03 
GeneralRe: run a perticuler registry key ? Pin
imran_rafique23-Oct-02 17:39
imran_rafique23-Oct-02 17:39 
GeneralRe: run a perticuler registry key ? Pin
Christian Graus23-Oct-02 17:52
protectorChristian Graus23-Oct-02 17:52 
GeneralRe: run a perticuler registry key ? Pin
Stephane Rodriguez.23-Oct-02 21:44
Stephane Rodriguez.23-Oct-02 21:44 
AnswerRe: run a perticuler registry key ? Pin
valikac23-Oct-02 17:36
valikac23-Oct-02 17: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.