-
Notifications
You must be signed in to change notification settings - Fork 528
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
Unclear timestamp type returned from AcceptSecurityContext #3413
Comments
The reference documentation describes
The
With that, you can safely
whereas
While the |
As for changing the signature of the Rust bindings to the API call to return a
I don't believe anything can be done to change the current situation. |
Thank you! The FILETIME as I see it in the std seems to refer to the windows epoch actually, it just translates on the external API of the type |
Would it be possible/advisable to make something like a LOCALFILETIME to make the struct properly marked as a FILETIME format? |
Each security package is able to return a |
Closing for now but feel free to keep the discussion going. If there's an API change to be made you'd need to pick up the conversation over at https://github.com/microsoft/win32metadata |
Summary
Hello!
AcceptSecurityContext returns an expiry time in i64 format and between the documentation and the actual implementation it's not clear how you would have to transmute or interpret that. I assume you just have to transmute it, but it should probably just return FILETIME directly.
On that front, I noticed that SystemTime from the Rust standard library (!) uses a FILETIME handle internally, so you could actually transmute to that directly from this library to return a safe SystemTime instance for Rust. That might be worth looking into directly with the std guys, as now these types from windows_sys and std are incompatible but implemented pretty much the same.
Using windows crate version 0.58
The text was updated successfully, but these errors were encountered: