From: DS on
I am sure this has been covered before but I can't find any references to
it.

I need to suspend an active thread using SuspendThread and ResumeThread. My
problem is I need to use OpenThread to get the handle in order to pause it.
But when compiling my VC++ app cannot find it.

I get "error C2065: 'OpenThread' : undeclared identifier"

I have the latest W2K SDK installed and can see the definition in winbase.h,
but cannot understand why it doesn't want to compile. Am I missing aditional
libraries which I should include (apart from kernel32.lib)?

Any advice would be greatly appreciated.
DS


From: David Lowndes on
>My
>problem is I need to use OpenThread to get the handle in order to pause it.
>But when compiling my VC++ app cannot find it.
>
>I get "error C2065: 'OpenThread' : undeclared identifier"

Presumably you do #include <windows.h> in your source?

Have you perhaps got one of the lean/mean symbols (like
WIN32_LEAN_AND_MEAN) defined for your project? These bypass much of
the lesser used declarations in the SDK headers.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
From: DS on
Checked that... i don't have that directive set.

By the way, I am on XP. Would it make a difference if I try and compile on a
W2K platform?

"David Lowndes" <davidl(a)example.invalid> wrote in message
news:nju4k1h71bu14upcb3ihtrjdgce8q2dgeb(a)4ax.com...
> >My
> >problem is I need to use OpenThread to get the handle in order to pause
it.
> >But when compiling my VC++ app cannot find it.
> >
> >I get "error C2065: 'OpenThread' : undeclared identifier"
>
> Presumably you do #include <windows.h> in your source?
>
> Have you perhaps got one of the lean/mean symbols (like
> WIN32_LEAN_AND_MEAN) defined for your project? These bypass much of
> the lesser used declarations in the SDK headers.
>
> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq


From: Jeff F on

"DS" <ikoonman(a)hotmail.com> wrote in message
news:Ot85b0OyFHA.3892(a)TK2MSFTNGP12.phx.gbl...
> "David Lowndes" <davidl(a)example.invalid> wrote in message
> news:nju4k1h71bu14upcb3ihtrjdgce8q2dgeb(a)4ax.com...
>> >My
>> >problem is I need to use OpenThread to get the handle in order to pause
> it.
>> >But when compiling my VC++ app cannot find it.
>> >
>> >I get "error C2065: 'OpenThread' : undeclared identifier"
>>
>> Presumably you do #include <windows.h> in your source?
>>
>> Have you perhaps got one of the lean/mean symbols (like
>> WIN32_LEAN_AND_MEAN) defined for your project? These bypass much of
>> the lesser used declarations in the SDK headers.
>
> Checked that... i don't have that directive set.

Did you look in stdafx.h?

Jeff


From: David Lowndes on
>Checked that... i don't have that directive set.

Where have you checked? It could be in a source file, header file, in
your project preprocessor settings, or even in the CL environment
variable.

>By the way, I am on XP. Would it make a difference if I try and compile on a
>W2K platform?

No - at least it shouldn't!

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq