OpenThread is not working in win2k

Hi,

OpenThread is not working in WIN2K .
MSDN lists the function . But when used, linking is not through.
MSDN lists the function is defined in kernek32.lib and declared in
winbase.h. I didn’t find in neither of the two.

My basic problem is getting the Thread-Handle given the Thread-Id. Is
there any other method of getting the Thread-Handle given the Thread ID.

-Murali


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

MSDN Documentation :

There is no way to get the thread handle from the thread ID. While there is
an OpenProcess() API that takes a PID and returns the handle to the process,
there is no corresponding OpenThread() that takes a thread ID and returns a
thread handle.

Possible ways to get Handle :

MSDN Documentation :
If you will need a thread handle, then you need to request it from the
thread creator or the thread itself. Both the creator or the thread will
have a handle to the thread and can give it to you using DuplicateHandle().
This requirement allows both applications to coordinate their actions.

Hope this will help u.

Regards,
Satish K.S

----- Original Message -----
From: “Murali S”
To: “File Systems Developers”
Sent: Friday, May 25, 2001 10:04 AM
Subject: [ntfsd] OpenThread is not working in win2k

Hi,

OpenThread is not working in WIN2K .
MSDN lists the function . But when used, linking is not through.
MSDN lists the function is defined in kernek32.lib and declared in
winbase.h. I didn’t find in neither of the two.

My basic problem is getting the Thread-Handle given the Thread-Id. Is
there any other method of getting the Thread-Handle given the Thread ID.

-Murali


You are currently subscribed to ntfsd as: xxxxx@aalayance.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hello,

OpenThread call is added in Windows 2000 and works
perfectly fine.

The problem Murali is facing is due to older versions
of header files and libraries. Probably, he is using
header files from Visual Studio/VC++.

Murali, you should install latest platform SDK for
Windows 2000 and specify include paths and library
paths (of platform SDK) on the top of list of
include/lib directories (using
Tools/Options/Directories option in VC IDE).

Note: OpenThread is available only on Windows 2000.
For Windows NT 4.0, you can use native API
NtOpenThread to acheive the same.

Hope this helps.

-Prasad

— Satish wrote:
> MSDN Documentation :
>
> There is no way to get the thread handle from the
> thread ID. While there is
> an OpenProcess() API that takes a PID and returns
> the handle to the process,
> there is no corresponding OpenThread() that takes a
> thread ID and returns a
> thread handle.
>
> Possible ways to get Handle :
>
> MSDN Documentation :
> If you will need a thread handle, then you need to
> request it from the
> thread creator or the thread itself. Both the
> creator or the thread will
> have a handle to the thread and can give it to you
> using DuplicateHandle().
> This requirement allows both applications to
> coordinate their actions.
>
>
> Hope this will help u.
>
> Regards,
> Satish K.S
>
> ----- Original Message -----
> From: “Murali S”
> To: “File Systems Developers”
> Sent: Friday, May 25, 2001 10:04 AM
> Subject: [ntfsd] OpenThread is not working in win2k
>
>
> Hi,
>
> OpenThread is not working in WIN2K .
> MSDN lists the function . But when used, linking is
> not through.
> MSDN lists the function is defined in kernek32.lib
> and declared in
> winbase.h. I didn’t find in neither of the two.
>
> My basic problem is getting the Thread-Handle given
> the Thread-Id. Is
> there any other method of getting the Thread-Handle
> given the Thread ID.
>
> -Murali
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@aalayance.com
> To unsubscribe send a blank email to
> leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com