HOW TO Get threadHandle from threadId


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: HOW TO Get threadHandle from threadId

  1. #1
    Manab Guest

    HOW TO Get threadHandle from threadId


    I can enumerate all threads running and get threadId and other info. BUT NOT
    the threadHandle hThread. ONE NEEDS THE threadHandle hThread to manipulate
    it including TerminateThread. I need for Windows 98

  2. #2
    Mattias Sjögren Guest

    Re: HOW TO Get threadHandle from threadId

    >I can enumerate all threads running and get threadId and other info. BUT NOT
    >the threadHandle hThread. ONE NEEDS THE threadHandle hThread to manipulate
    >it including TerminateThread. I need for Windows 98


    You'd have to use the OpenThread function te get a handle to the
    thread, then CloseHandle to close it. However, OpenThread only works
    on Windows Me and later.


    Mattias

    ===
    Mattias Sjögren (VB MVP)
    mattias @ mvps.org
    http://www.msjogren.net/dotnet/

  3. #3
    manab Guest

    Re: HOW TO Get threadHandle from threadId


    Mattias Sjögren <mattias.dont.want.spam@mvps.org> wrote:
    >>I can enumerate all threads running and get threadId and other info. BUT

    NOT
    >>the threadHandle hThread. ONE NEEDS THE threadHandle hThread to manipulate
    >>it including TerminateThread. I need for Windows 98

    >
    >You'd have to use the OpenThread function te get a handle to the
    >thread, then CloseHandle to close it. However, OpenThread only works
    >on Windows Me and later.
    >
    >
    >Mattias
    >
    >===
    >Mattias Sjögren (VB MVP)



    Thanks Mr Sjogren,

    Yes I had earlier looked for OpenThread (akin to OpenProcess) in kernel32.dll
    for Windows 98se but no luck. I searched in vain in APIGuides for any other
    alternative. I am still hoping there may be some other way to get the precious
    hThread handle

    Manab
    >mattias @ mvps.org
    >http://www.msjogren.net/dotnet/



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center