Click here to Skip to main content
16,008,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionXP Screensaver and VS2008 Pin
CryoK14-May-08 20:34
CryoK14-May-08 20:34 
AnswerRe: XP Screensaver and VS2008 Pin
fefe.wyx14-May-08 22:30
fefe.wyx14-May-08 22:30 
GeneralRe: XP Screensaver and VS2008 Pin
CryoK16-May-08 4:44
CryoK16-May-08 4:44 
GeneralRe: XP Screensaver and VS2008 Pin
fefe.wyx16-May-08 6:13
fefe.wyx16-May-08 6:13 
GeneralRe: XP Screensaver and VS2008 Pin
lubbe7528-May-09 1:19
lubbe7528-May-09 1:19 
QuestionDilemma with threads and exception :confused: Pin
ta_isr14-May-08 20:16
ta_isr14-May-08 20:16 
QuestionRe: Dilemma with threads and exception :confused: Pin
CPallini14-May-08 21:02
mveCPallini14-May-08 21:02 
AnswerRe: Dilemma with threads and exception :confused: Pin
Cedric Moonen14-May-08 21:12
Cedric Moonen14-May-08 21:12 
It's a bit difficult to understand your problem Unsure | :~
Is the problem related to the fact that the critical section won't be release because you throw an exception ? If that's the problem, there's a little trick you can implement: wrap the critical section into a class, enter the critical section in your class ctor and leave the critical section in your class destructor.

Now, when you want to use this, just declare an instance of the class (it will call the constructor and enter the CS). When the function is exited, the class goes out of scope and the destructor is called (leaving the CS). Thus, if your function throw an exception, you are sure that the CS is left.

Cédric Moonen
Software developer

Charting control [v1.4]

GeneralRe: Dilemma with threads and exception :confused: Pin
ta_isr15-May-08 2:45
ta_isr15-May-08 2:45 
GeneralRe: Dilemma with threads and exception :confused: Pin
Cedric Moonen15-May-08 2:47
Cedric Moonen15-May-08 2:47 
AnswerRe: Dilemma with threads and exception :confused: Pin
ta_isr15-May-08 3:14
ta_isr15-May-08 3:14 
QuestionRegFlushKey Pin
Ajay L D14-May-08 20:10
Ajay L D14-May-08 20:10 
AnswerRe: RegFlushKey Pin
ShilpiP14-May-08 21:22
ShilpiP14-May-08 21:22 
GeneralRe: RegFlushKey Pin
Ajay L D15-May-08 1:14
Ajay L D15-May-08 1:14 
QuestionMultiple Monitor Pin
Soumyadipta14-May-08 19:46
Soumyadipta14-May-08 19:46 
Questionunsuccessful move file? Pin
monsieur_jj14-May-08 19:36
monsieur_jj14-May-08 19:36 
AnswerIt's still open! Pin
enhzflep15-May-08 6:28
enhzflep15-May-08 6:28 
QuestionModal or Modeless ? Pin
nitin314-May-08 19:21
nitin314-May-08 19:21 
Answer[Message Deleted] Pin
toxcct14-May-08 21:59
toxcct14-May-08 21:59 
GeneralRe: Modal or Modeless ? Pin
nitin314-May-08 22:24
nitin314-May-08 22:24 
QuestionRe: Modal or Modeless ? Pin
CPallini15-May-08 0:15
mveCPallini15-May-08 0:15 
QuestionText Field in MFC Pin
T.RATHA KRISHNAN14-May-08 19:20
T.RATHA KRISHNAN14-May-08 19:20 
AnswerRe: Text Field in MFC Pin
Mukesh Kumar14-May-08 19:59
Mukesh Kumar14-May-08 19:59 
QuestionEEPROM and BlueTooth Pin
IamPoojaa14-May-08 19:10
IamPoojaa14-May-08 19:10 
GeneralRe: EEPROM and BlueTooth Pin
CPallini14-May-08 21:04
mveCPallini14-May-08 21:04 

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.