Connecting Tech Pros Worldwide Help | Site Map

error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found

Hooyoo
Guest
 
Posts: n/a
#1: Aug 6 '07
I have included windows.h, but it still says
'InitializeCriticalSectionAndSpinCount': identifier not found. Why?
any ideas?

Thanks.

David Lowndes
Guest
 
Posts: n/a
#2: Aug 6 '07

re: error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found


>I have included windows.h, but it still says
Quote:
>'InitializeCriticalSectionAndSpinCount': identifier not found. Why?
>any ideas?
If you've got stdafx.h, try removing the following line if you have
it.

#define WIN32_LEAN_AND_MEAN

Also note that MSDN says:

"To compile an application that uses this function, define
_WIN32_WINNT as 0x0403 or later"

Dave
Hooyoo
Guest
 
Posts: n/a
#3: Aug 7 '07

re: error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found


On Aug 6, 3:23 pm, David Lowndes <Dav...@example.invalidwrote:
Quote:
Quote:
I have included windows.h, but it still says
'InitializeCriticalSectionAndSpinCount': identifier not found. Why?
any ideas?
>
If you've got stdafx.h, try removing the following line if you have
it.
>
#define WIN32_LEAN_AND_MEAN
>
Also note that MSDN says:
>
"To compile an application that uses this function, define
_WIN32_WINNT as 0x0403 or later"
>
Dave
Yes, thank you very much. It works now. ^_^

Closed Thread