Корректен ли код?
bool started_cs = false;
try {
// ...
EnterCriticalSection(&cs);
started_cs = true;
// ...
LeaveCriticalSection(&cs);
started_cs = false;
} catch(SomeException&) {
if (started_cs)
LeaveCriticalSection(&cs);
// ...
}