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.