In order to translate windows vista thread pool API to use in my delphi application. I need to know the definition of _TP_POOL
. I looked into winnt.h
and found the following typedef
declaration:
typedef struct _TP_POOL TP_POOL, *PTP_POOL;
I can't find the _TP_POOL
on my local header files. Which is the location of it?
The PTP_POOL
is an opaque pointer. You never get to know, or indeed need to know, what that pointer refers to. The thread pool API serves up PTP_POOL
values when you call CreateThreadpool
. And you then pass those opaque pointer values back to the other thread pool API functions that you call. The thread pool API implementation knows what the pointer refers to, but you simply do not need to.
In Delphi I would declare it like this:
type
PTP_POOL = type Pointer;
I'm declaring this as a distinct type so that the compiler will ensure that you don't assign pointers to other types to variables of type PTP_POOL
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With