Click here to Skip to main content
15,899,474 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionEnterCriticalSection() problem on Vista Pin
SRKSHOME11-Jul-08 3:31
SRKSHOME11-Jul-08 3:31 
AnswerRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery11-Jul-08 5:27
Mark Salsbery11-Jul-08 5:27 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME14-Jul-08 4:58
SRKSHOME14-Jul-08 4:58 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery14-Jul-08 5:43
Mark Salsbery14-Jul-08 5:43 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME14-Jul-08 19:09
SRKSHOME14-Jul-08 19:09 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery15-Jul-08 5:36
Mark Salsbery15-Jul-08 5:36 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME17-Jul-08 3:12
SRKSHOME17-Jul-08 3:12 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Mark Salsbery17-Jul-08 5:37
Mark Salsbery17-Jul-08 5:37 
Forget about the difference between XP and Vista. It's not relevant
at all. The same threading rules apply as always. Vista can be much
more efficient at exposing faulty threading code. If it works on one
OS and not on another, then it DOESN'T WORK. I've found bugs YEARS
after I wrote the code that suddenly fail on a new OS. Also moving
from single core to multi-core machines can expose threading bugs.

Back to your code...

If WaitForSingleObject(INFINITE) is blocking forever, then the handle
is never getting signaled. It's that simple.

What code is responsible for signaling the event?

(FWIW, "event" is a keyword in C++ - you may not want to use that as a variable name Smile | :) )

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME12-Aug-08 1:05
SRKSHOME12-Aug-08 1:05 
AnswerRe: EnterCriticalSection() problem on Vista Pin
Joe Woodbury11-Jul-08 10:26
professionalJoe Woodbury11-Jul-08 10:26 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME11-Jul-08 23:35
SRKSHOME11-Jul-08 23:35 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Joe Woodbury12-Jul-08 7:07
professionalJoe Woodbury12-Jul-08 7:07 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Stephen Hewitt13-Jul-08 15:29
Stephen Hewitt13-Jul-08 15:29 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Stephen Hewitt13-Jul-08 15:29
Stephen Hewitt13-Jul-08 15:29 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME13-Jul-08 18:52
SRKSHOME13-Jul-08 18:52 
GeneralRe: EnterCriticalSection() problem on Vista Pin
SRKSHOME17-Jul-08 3:15
SRKSHOME17-Jul-08 3:15 
GeneralRe: EnterCriticalSection() problem on Vista Pin
Joe Woodbury17-Jul-08 5:45
professionalJoe Woodbury17-Jul-08 5:45 
QuestionVC ++ help Pin
paresh_sarjani11-Jul-08 3:31
paresh_sarjani11-Jul-08 3:31 
AnswerRe: VC ++ help Pin
Cedric Moonen11-Jul-08 3:56
Cedric Moonen11-Jul-08 3:56 
GeneralRe: VC ++ help Pin
sudhir_Kumar11-Jul-08 19:53
sudhir_Kumar11-Jul-08 19:53 
Questionhow data is managed in CString class? Pin
nisha0000011-Jul-08 3:12
nisha0000011-Jul-08 3:12 
AnswerRe: how data is managed in CString class? Pin
Mark Salsbery11-Jul-08 5:38
Mark Salsbery11-Jul-08 5:38 
QuestionTryEnterCriticalSection() problem Pin
SRKSHOME11-Jul-08 2:42
SRKSHOME11-Jul-08 2:42 
AnswerRe: TryEnterCriticalSection() problem Pin
CPallini11-Jul-08 2:48
mveCPallini11-Jul-08 2:48 
GeneralRe: TryEnterCriticalSection() problem Pin
SRKSHOME11-Jul-08 2:54
SRKSHOME11-Jul-08 2:54 

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.