-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Use GeneratedDllImport in System.Diagnostics.FileVersionInfo and System.Runtime.InteropServices.RuntimeInformation #52739
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ internal static partial class Interop | |
internal static partial class Kernel32 | ||
{ | ||
[DllImport(Libraries.Kernel32)] | ||
internal static extern void GetSystemInfo(out SYSTEM_INFO lpSystemInfo); | ||
internal static unsafe extern void GetSystemInfo(SYSTEM_INFO* lpSystemInfo); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is unsafe change necessary? (it is still using the old DllImport) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The parameter was switched to be a pointer - There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes but since title is "Use GeneratedDllImport..". this change and changes due to this change looked unrelated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The general goal of |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is
CharSet = CharSet.Ansi
needed here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had the p/invoke source generators avoid making any assumptions about
CharSet
if it isn't set, so it requires explicitly specifying eitherCharSet
orMarshalAs
when marshallingstring
/char
.