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

C / C++ / MFC

 
Questionbest way to avoid calling virtual methods (directly or indirectly) from a constructor Pin
bob1697218-Jan-11 9:00
bob1697218-Jan-11 9:00 
AnswerRe: best way to avoid calling virtual methods (directly or indirectly) from a constructor Pin
Aescleal18-Jan-11 9:28
Aescleal18-Jan-11 9:28 
AnswerRe: best way to avoid calling virtual methods (directly or indirectly) from a constructor Pin
TheGreatAndPowerfulOz18-Jan-11 11:26
TheGreatAndPowerfulOz18-Jan-11 11:26 
AnswerRe: best way to avoid calling virtual methods (directly or indirectly) from a constructor Pin
Emilio Garavaglia18-Jan-11 22:37
Emilio Garavaglia18-Jan-11 22:37 
GeneralRe: best way to avoid calling virtual methods (directly or indirectly) from a constructor Pin
bob1697219-Jan-11 3:39
bob1697219-Jan-11 3:39 
QuestionBluetooth - COM port reading Pin
tnt00017-Jan-11 21:48
tnt00017-Jan-11 21:48 
AnswerRe: Bluetooth - COM port reading Pin
CPallini17-Jan-11 21:55
mveCPallini17-Jan-11 21:55 
AnswerRe: Bluetooth - COM port reading Pin
Andrew Brock17-Jan-11 22:31
Andrew Brock17-Jan-11 22:31 
Firstly, please put all your code in <pre></pre> tags, or select it and click the code block button above the message content text box. This will make it easier for everyone to read.

0.5s isn't a very long time to wait for something like bluetooth, try waiting for longer.
Make sure the hevtStop isn't set
Add cases to the WaitForMultipleObjects switch for WAIT_FAILED and WAIT_TIMEOUT, in WAIT_FAILED add a call to GetLastError(), if it is hit, find the error code in the System Error Codes[^] page on MSDN

If you are using ReadFile, I wouldn't bother with overlapped operations at this stage. Either get it working then put them in, or put this code into a different thread
GeneralRe: Bluetooth - COM port reading Pin
tnt00017-Jan-11 23:48
tnt00017-Jan-11 23:48 
GeneralRe: Bluetooth - COM port reading Pin
Andrew Brock18-Jan-11 0:40
Andrew Brock18-Jan-11 0:40 
GeneralRe: Bluetooth - COM port reading Pin
tnt00018-Jan-11 2:43
tnt00018-Jan-11 2:43 
GeneralRe: Bluetooth - COM port reading Pin
Andrew Brock18-Jan-11 3:40
Andrew Brock18-Jan-11 3:40 
GeneralRe: Bluetooth - COM port reading Pin
tnt00018-Jan-11 5:27
tnt00018-Jan-11 5:27 
GeneralRe: Bluetooth - COM port reading Pin
Andrew Brock18-Jan-11 14:07
Andrew Brock18-Jan-11 14:07 
QuestionDifference between _stat() and _fstat() Pin
gomathylakshmanan17-Jan-11 19:47
gomathylakshmanan17-Jan-11 19:47 
AnswerRe: Difference between _stat() and _fstat() Pin
Andrew Brock17-Jan-11 19:53
Andrew Brock17-Jan-11 19:53 
QuestionCTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 9:10
mesajflaviu17-Jan-11 9:10 
AnswerRe: CTypedPtrArray & CStringArray Pin
Chris Meech17-Jan-11 10:01
Chris Meech17-Jan-11 10:01 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 19:06
mesajflaviu17-Jan-11 19:06 
AnswerRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 16:04
Andrew Brock17-Jan-11 16:04 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 19:38
mesajflaviu17-Jan-11 19:38 
GeneralRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 19:51
Andrew Brock17-Jan-11 19:51 
AnswerRe: CTypedPtrArray & CStringArray Pin
mesajflaviu17-Jan-11 22:11
mesajflaviu17-Jan-11 22:11 
GeneralRe: CTypedPtrArray & CStringArray Pin
Andrew Brock17-Jan-11 22:36
Andrew Brock17-Jan-11 22:36 
GeneralRe: CTypedPtrArray & CStringArray Pin
mesajflaviu18-Jan-11 1:47
mesajflaviu18-Jan-11 1:47 

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.