CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    15

    Thread ID of another thread?

    I need to get the Thread ID of another thread of the same application. The situation is like this, IEXPLORE.EXE loads my DLL (a thread) and it also has some other threads . I (my DLL) want to get the Thread ID of one of those threads (lets say an applet). Can I?

    Thanx in advance,

    Mahesh

  2. #2
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537
    two ways, the first I have never tried since I live in the lower part of the gutter...

    Use the tool help functions...more specific look in MSDN for this:

    Traversing the Thread List


    query the process handle and enumerate the threads.. go to ZwQuerySystemInformation(...) google it, you'll find code, it helps to have the DDK installed for the defines, the more difficult route but provides you with more information.

  3. #3
    Join Date
    Jan 2003
    Posts
    15

    Thanx

    Thanx.

    I too try the second one. And the first one is similar to something that how the ProcessViewer does for getting the threadID s of all the processes...

    Let me try the second one first.

    Thanx once again.
    Mahesh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured