Link to home
Start Free TrialLog in
Avatar of lwinkenb
lwinkenb

asked on

Access violation

I have a global CRITICAL_SECTION object, but when I try to use EnterCriticalSection() with it, I get an access violation.

CRITICAL_SECTION g_criticalSection;
...

//Then later on in a global function I have
EnterCriticalSection(&g_criticalSection);  // Access violation here
memset(g_szClipboard,0,sizeof(g_szClipboard));
LeaveCriticalSection(&g_criticalSection);

What could be the problem?
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lwinkenb
lwinkenb

ASKER

argh, I knew it was something simple.
Thanks jkr.
You're most welcome :o)