Click to See Complete Forum and Search --> : Exception Handling


srakkireddy1
May 18th, 2009, 08:32 AM
Hi I am working on windows platform on networking using mutli threading

I have a problem with the locking Mechanism, I am getting a exception which i am not able to fix it

My exception as as follows:-

Unhandled exception at 0x7c918af2 in xxx.exe:0xc0000005: Access violation writing location 0x00000010

I have used the locking mechanism using

EnterCriticalSection(&Lock);
LeaveCriticalSection(&Lock);


where Lock is a variable local to the class

MrViggy
May 18th, 2009, 11:53 AM
You have a bad object (or pointer, or variable, etc) somewhere. Step through your code, examine all your objects.

Viggy

macabre13
May 19th, 2009, 02:55 AM
Maybe you forgot to initialize the CriticalSection ?