Click here to Skip to main content
16,005,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
xcavin16-Jul-07 7:40
xcavin16-Jul-07 7:40 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
Mark Salsbery16-Jul-07 7:46
Mark Salsbery16-Jul-07 7:46 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
xcavin16-Jul-07 7:53
xcavin16-Jul-07 7:53 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
David Crow16-Jul-07 7:57
David Crow16-Jul-07 7:57 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
xcavin16-Jul-07 8:04
xcavin16-Jul-07 8:04 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
Mark Salsbery16-Jul-07 8:10
Mark Salsbery16-Jul-07 8:10 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
xcavin16-Jul-07 8:21
xcavin16-Jul-07 8:21 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
Mark Salsbery16-Jul-07 8:30
Mark Salsbery16-Jul-07 8:30 
Right. I'm following you.

No thread should be deleting the critical section, except for a thread that's in charge of the
lifetime of the critical section.

The problem here is an object shouldn't be accessible by a thread when it's being destructed or
after it's destructed.

If an object has its own CS for access that's fine.

In your scenario you also need synchronized access external from the object to control access to
the object's scope/lifetime.

Make sense?

Mark


Mark Salsbery
Microsoft MVP - Visual C++


"Great job team! Head back to base for debriefing and cocktails."

GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
led mike16-Jul-07 10:46
led mike16-Jul-07 10:46 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
xcavin16-Jul-07 11:00
xcavin16-Jul-07 11:00 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
Stephen Hewitt16-Jul-07 14:06
Stephen Hewitt16-Jul-07 14:06 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
Hamid_RT25-Jul-07 7:48
Hamid_RT25-Jul-07 7:48 
AnswerRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
Mike Dimmick16-Jul-07 11:37
Mike Dimmick16-Jul-07 11:37 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
xcavin16-Jul-07 11:50
xcavin16-Jul-07 11:50 
GeneralRe: How to make sure the LPCRITICAL_SECTION i have is valid Pin
Stephen Hewitt16-Jul-07 14:21
Stephen Hewitt16-Jul-07 14:21 
QuestionMonday morning mapping (CDC::SetMapMode) question. Pin
Maximilien16-Jul-07 5:09
Maximilien16-Jul-07 5:09 
AnswerRe: Monday morning mapping (CDC::SetMapMode) question. Pin
bob1697216-Jul-07 6:20
bob1697216-Jul-07 6:20 
QuestionWindowProc() precision Pin
rp_suman16-Jul-07 5:08
rp_suman16-Jul-07 5:08 
QuestionRe: WindowProc() precision Pin
Mark Salsbery16-Jul-07 5:22
Mark Salsbery16-Jul-07 5:22 
AnswerRe: WindowProc() precision Pin
rp_suman16-Jul-07 21:32
rp_suman16-Jul-07 21:32 
GeneralRe: WindowProc() precision Pin
Mark Salsbery17-Jul-07 5:28
Mark Salsbery17-Jul-07 5:28 
GeneralRe: WindowProc() precision Pin
rp_suman17-Jul-07 19:53
rp_suman17-Jul-07 19:53 
GeneralRe: WindowProc() precision Pin
rp_suman17-Jul-07 22:01
rp_suman17-Jul-07 22:01 
GeneralRe: WindowProc() precision Pin
Mark Salsbery18-Jul-07 5:47
Mark Salsbery18-Jul-07 5:47 
QuestionListbox multi select problem [modified] Pin
pirat316-Jul-07 4:53
pirat316-Jul-07 4:53 

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.