DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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/



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links