-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Threadpool API should use handles, not pointers to structs #1404
Comments
All of these have an "invalid handle value" of |
Does the below look right? PTP_* are then remapped to the equivalent TP_* with a pointer.
|
I wouldn't edit the name of these types. The (In other words, undo the |
Right, the docs only mention the |
Could you take a look at https://github.com/microsoft/win32metadata/tree/mikebattista/threadingptptypes? It looks to be consistent now with how PTP_POOL was implemented but given the odd definitions and changes to the [In][Out] attributes in the diff, it needs to be tested to make sure the dev experience is what you expect. |
Sorry, I'm not sure how to check this without a winmd. |
I sent you one offline. |
Types like
PTP_WORK
,PTP_TIMER
,PTP_WAIT
,PTP_IO
are all handle types (opaque pointers) and should be modeled as such. While there are some Threadpool types that are defined as structs, likeTP_CALLBACK_ENVIRON_V3
, most should be considered opaque handles.So for example,
TP_WORK
should not be defined at all. Instead, there should be aPTP_WORK
struct with theNativeTypeDef
attribute and theInvalidHandleValue
attribute.The text was updated successfully, but these errors were encountered: