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

  • SEARCH
  • Home
  • 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 5972663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:41:23+00:00 2026-05-22T20:41:23+00:00

I want to add a method to my debugger which fills a THREADENTRY32 array

  • 0

I want to add a method to my debugger which fills a THREADENTRY32 array with all threads of the process being currently debugged. For that, I want to use the method “EnumerateThreads” which I pass a THREADENTRY32 pointer which the function should fill out.

However, I’m having trouble using a THREADENTRY32 pointer as a function parameter.

Everytime I declare a function like this in my header file I receive an C2061 error (“syntax error : identifier ‘THREADENTRY32′”):

void EnumerateThreads(THREADENTRY32 *threadArray);

The header file includes already which defines the THREADENTRY32 structure if I read that correctly.

Using a custom struct and passing it to the function works without any problems:

struct Test
{
int bla;
DWORD boo;
};
[…]
void EnumerateThreads(Test *test);

I’ve worked with int-/char-/float-/etc. arrays, but I don’t have any experience with struct arrays.
I just wondered why it does work with my own structs but not with the THREADENTRY32 one.

  • 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-22T20:41:24+00:00Added an answer on May 22, 2026 at 8:41 pm

    try using:

    void EnumerateThreads(struct THREADENTRY32 *threadArray);
    

    this will inline forward declare the struct, however, you need the full definition from Tlhelp32.h where ever you access the members of the struct or use the sizeof operator.

    alternatively you need to declare the struct (by including the Tlhelp32.h) in the same translation unit (but preceding) of the proto and its uses, or provide a forward declaration for the compiler to bind to via struct THREADENTRY32;

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

Sidebar

Related Questions

I want to add method that opens up the new view controller when this
I want to add some method in class that i define as a 'DataContract'
I want to add a method to the Array class in a rails app.
If I want to add an isEmpty method to all JavaScript arrays, I would
I want to add a custom model method to the admin filter, however it
Title says it mostly. I want to add a simple extension method to the
Expanding on recent_posts_on_self below, I want to add an all_recent_posts_on_self method but I'm not
Greetings, I have a method to capture packets. After capturing I want to add
I have a list of string values that I want add to a hashtable
I want to add methods (more specifically: method aliases) automatically to Python subclasses. If

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.