Does CCriticalSectio n work in VC++.NET.
I have code that uses CCriticalSectio n that worked in VC++
6.0 and when I try and run it in VC++.NET I run into an
exception error when I try and lock the critical section.
Just as a note I tried the CMutex sample program and it
works, but if I add in the following lines to that sample
program I get the same error I see in my application.
CCriticalSectio n criticalSection ;
CSingleLock singleLock(&cri ticalSection)
singleLock.Lock (1000); // This call generates the
exception - doesn't look like criticalSection is getting
created correctly
singleLock.Unlo ck();
I have code that uses CCriticalSectio n that worked in VC++
6.0 and when I try and run it in VC++.NET I run into an
exception error when I try and lock the critical section.
Just as a note I tried the CMutex sample program and it
works, but if I add in the following lines to that sample
program I get the same error I see in my application.
CCriticalSectio n criticalSection ;
CSingleLock singleLock(&cri ticalSection)
singleLock.Lock (1000); // This call generates the
exception - doesn't look like criticalSection is getting
created correctly
singleLock.Unlo ck();
Comment