error C3861: 'InitializeCriticalSectionAndSpinCount': identifier not found

H

Hooyoo

I have included windows.h, but it still says
'InitializeCriticalSectionAndSpinCount': identifier not found. Why?
any ideas?

Thanks.
 
J

Jochen Kalmbach [MVP]

Hi Hooyoo!
I have included windows.h, but it still says
'InitializeCriticalSectionAndSpinCount': identifier not found. Why?
any ideas?

From documentation:
<quote>
To compile an application that uses this function, define _WIN32_WINNT
as 0x0403 or later.
</quote>

Greetings
Jochen
 
D

David Lowndes

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
 
H

Hooyoo

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. ^_^
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top