Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6958375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:07:52+00:00 2026-05-27T15:07:52+00:00

Possible Duplicate: Enumerating threads in Windows I am trying to enumerate all threads belonging

  • 0

Possible Duplicate:
Enumerating threads in Windows

I am trying to enumerate all threads belonging to a Win32 Window process.

I know I can get the process ID like so:

PDWORD procId;
GetWindowThreadProcessId(hwnd, procId);

And I know that the whole thing can be done in C# like so:

// get process that owns the taskbar window
int procId;
GetWindowThreadProcessId(hwnd, out procId);

Process p = Process.GetProcessById(procId);
if (p != null)
{
    foreach (ProcessThread t in p.Threads)
    {
        ...
    }
}

But as far as I can tell the Process class is a .NET class (please correct me if I’m wrong), and I’m trying my hardest to avoid .NET dependency. (Read: Please don’t tell me to just use .NET.)

So the question is this: Is there a Win32 equivalent, given that I have correctly retrieved the PID?

(As a side note, I saw the Tool Help Library referenced in another question, but was not sure it was the best option. If it is, could you give a brief explanation/demonstration of how I would accomplish this or direct me to someone else’s?)

As always, thanks immensely for all the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:07:53+00:00Added an answer on May 27, 2026 at 3:07 pm

    See Thread Walking and Enumerating threads in Windows

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: PHP get all arguments as array? Within a javascript function arguments always
Possible Duplicate: Enumerating through an object's properties (string) in C# Can I use reflection
Possible Duplicate: C# driver development? I would like to know if I can do
Possible Duplicate: .NET - What’s the best way to implement a catch all exceptions
Possible Duplicate: How can I take screenshots with Perl? How can I take a
Possible Duplicate: Multiple forms on ASP.NET page i have a doubt. can we place
Possible Duplicate: How can I combine multiple rows into a comma-delimited list in Oracle?
Possible Duplicate: Why do I get a null pointer exception from TabWidget? I have
Possible Duplicate: How to store an IP in mySQL I want to get the
Possible Duplicate: How can I increment a date by one day in Java? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.