Click here to Skip to main content
15,919,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionfrom C++ header files to UML class diagrams? Pin
T.T.H.18-Oct-04 23:15
T.T.H.18-Oct-04 23:15 
Generalcheck keyword at the end of a line Pin
td8018-Oct-04 23:09
td8018-Oct-04 23:09 
GeneralRe: check keyword at the end of a line Pin
David Crow19-Oct-04 2:39
David Crow19-Oct-04 2:39 
GeneralRe: check keyword at the end of a line Pin
td8019-Oct-04 4:03
td8019-Oct-04 4:03 
Questionhow i can access usb port Pin
neo boyz18-Oct-04 23:08
neo boyz18-Oct-04 23:08 
Questionhow to send byte (Device) Pin
vc-programmer-18-Oct-04 22:59
vc-programmer-18-Oct-04 22:59 
AnswerRe: how to send byte (Device) Pin
Cedric Moonen18-Oct-04 23:10
Cedric Moonen18-Oct-04 23:10 
GeneralRe: how to send byte (Device) Pin
jan larsen19-Oct-04 2:59
jan larsen19-Oct-04 2:59 
Out to confuse the newbies, hmm?... Wink | ;)

Here is his code (rewritten for clarity Smile | :) ):

<br />
BOOL CSerialCom::WriteByte(BYTE bybyte)<br />
{<br />
    iBytesWritten=0;<br />
<br />
    if( WriteFile(hComm,&bybyte,1,&iBytesWritten,NULL) == 0 )<br />
    {<br />
        return FALSE;<br />
    }<br />
    else <br />
    {<br />
        return TRUE;<br />
    }<br />
}<br />


And here is, some of, the documentation for WriteFile:

If the function succeeds, the return value is nonzero.


So, this is actually perfectly valid code...


"After all it's just text at the end of the day. - Colin Davies

"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
GeneralRe: how to send byte (Device) Pin
Cedric Moonen19-Oct-04 3:09
Cedric Moonen19-Oct-04 3:09 
QuestionHow to convert a byte array to decimal integer? Pin
ting66818-Oct-04 22:08
ting66818-Oct-04 22:08 
AnswerRe: How to convert a byte array to decimal integer? Pin
Lim Bio Liong18-Oct-04 22:36
Lim Bio Liong18-Oct-04 22:36 
AnswerRe: How to convert a byte array to decimal integer? Pin
Lim Bio Liong18-Oct-04 22:36
Lim Bio Liong18-Oct-04 22:36 
AnswerRe: How to convert a byte array to decimal integer? Pin
David Crow19-Oct-04 2:49
David Crow19-Oct-04 2:49 
GeneralRe: How to convert a byte array to decimal integer? Pin
ting66818-Oct-04 22:57
ting66818-Oct-04 22:57 
GeneralRe: How to convert a byte array to decimal integer? Pin
Lim Bio Liong19-Oct-04 18:00
Lim Bio Liong19-Oct-04 18:00 
GeneralRe: How to convert a byte array to decimal integer? Pin
Lim Bio Liong18-Oct-04 23:18
Lim Bio Liong18-Oct-04 23:18 
GeneralRe: How to convert a byte array to decimal integer? Pin
Lim Bio Liong18-Oct-04 23:31
Lim Bio Liong18-Oct-04 23:31 
GeneralRe: How to convert a byte array to decimal integer? Pin
ting66818-Oct-04 23:32
ting66818-Oct-04 23:32 
GeneralRe: How to convert a byte array to decimal integer? Pin
Lim Bio Liong18-Oct-04 23:46
Lim Bio Liong18-Oct-04 23:46 
QuestionCan't change the font and text color of an edit box using CFontDialog ? Pin
VCSharp00718-Oct-04 20:47
VCSharp00718-Oct-04 20:47 
AnswerRe: Can't change the font and text color of an edit box using CFontDialog ? Pin
22491718-Oct-04 21:26
22491718-Oct-04 21:26 
GeneralMaximize MDI Child window when Main window is maximized Pin
ledallam18-Oct-04 20:45
ledallam18-Oct-04 20:45 
GeneralRe: Maximize MDI Child window when Main window is maximized Pin
Azghar Hussain18-Oct-04 22:38
professionalAzghar Hussain18-Oct-04 22:38 
GeneralFtpOpenFile Error Pin
antonimasso18-Oct-04 20:41
antonimasso18-Oct-04 20:41 
General2 DirectX questions Pin
Cedric Moonen18-Oct-04 20:26
Cedric Moonen18-Oct-04 20:26 

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.