You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevents having to cast to *const/mut isize and makes it consistent with the functions.
say: https://docs.microsoft.com/en-us/windows/win32/api/authz/nf-authz-authzinitializecontextfromsid
If i am not mistaken it will always give you a AUTHZ_CLIENT_CONTEXT_HANDLE at the out parameter phAuthzClientContext.
And if so it doesn't make much sense for it to be a neutral isize, actually find it weird it's that and not c_void though.
Looking at the metadata it looks like it's seens as a *AUTHZ_CLIENT_CONTEXT_HANDLE.
Drawbacks
If it's not actually not always a &mut/cont AUTHZ_CLIENT_CONTEXT_HANDLE and some other data can be written in the/some functions then the typing will break that.
Rationale and alternatives
The current design makes you able to pass any isize (in a nutshell any HANDLE.0) which makes it "confusing" for no reason.
If it's just a single type, then it's better to just utilize that to make rust do it's thing without extra steps.
Motivation
Prevents having to cast to
*const/mut isize
and makes it consistent with the functions.say: https://docs.microsoft.com/en-us/windows/win32/api/authz/nf-authz-authzinitializecontextfromsid
If i am not mistaken it will always give you a
AUTHZ_CLIENT_CONTEXT_HANDLE
at the out parameterphAuthzClientContext
.And if so it doesn't make much sense for it to be a neutral
isize
, actually find it weird it's that and notc_void
though.Looking at the metadata it looks like it's seens as a
*AUTHZ_CLIENT_CONTEXT_HANDLE
.Drawbacks
If it's not actually not always a
&mut/cont AUTHZ_CLIENT_CONTEXT_HANDLE
and some other data can be written in the/some functions then the typing will break that.Rationale and alternatives
The current design makes you able to pass any
isize
(in a nutshell anyHANDLE.0
) which makes it "confusing" for no reason.If it's just a single type, then it's better to just utilize that to make rust do it's thing without extra steps.
Additional context
Current art is kinda like this:
The text was updated successfully, but these errors were encountered: