-
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
Replace LARGE_INTEGER
and ULARGE_INTEGER
with Int64
and UInt64
respectively
#1485
Comments
Do they have the same alignment requirements as the native types? |
Yep! |
Both C# and Rust already map this to native compiler types. It would just be nice not to have to do this all over the place. |
ZwWriteFile defines special semantics for LARGE_INTEGER where HighPart is -1 and LowPart is either FILE_USE_FILE_POINTER_POSITION or FILE_WRITE_TO_END_OF_FILE. With Win32 WriteFile though, I suppose an application would store those values to the Offset and OffsetHigh members of OVERLAPPED, so it would not become more difficult if LARGE_INTEGER were replaced with Int64. |
Ok, FILETIME is the 64-bit struct that has a 32-bit alignment requirement. |
Couldn't this change have an affect on certain ABIs? For example the ABI change that occurs on COM calls when the return type is a native type vs a struct? Maybe there's no examples of this though? |
I don't believe so. Keep in mind that they are unions, not structs. And no, I'm not aware any such cases. |
Didn't you say yourself here that you change the ABI depending on if you're looking at a native typedef?
Are you saying unions are treated like primitive types when determing ABI rather than treated as structs would be? |
I just mean that since these are unions, they have a different layout and alignment to structs. Feel free to take it for a spin to see how MSVC behaves. That's ultimately the litmus test for the calling convention issue. |
These structs exist only to support very old compilers that don't natively support 64-bit integers.
The text was updated successfully, but these errors were encountered: