If you use it this way, there is no difference. The main advantage of this class is that you use it as follows:
static CCriticalSection cs; { CSingleLock lock(cs, true);
At the end of the region, the critical section will be unlocked, even if an exception was thrown or an early return was used. This technology is known as RAII (Initialization of Resources) and is widely known.
The MFC sync classes are not so well designed. I would recommend using boost.thread or those that will be available in the new C ++ standard if you can use it.
ymett source share