-
Notifications
You must be signed in to change notification settings - Fork 286
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
Merge | NativeMethods/SafeNativeMethods #2997
Conversation
src/Microsoft.Data.SqlClient/src/Interop/Windows/Kernel32/Kernel32Safe.netfx.cs
Show resolved
Hide resolved
[ResourceExposure(ResourceScope.None)] | ||
static internal extern IntPtr GetProcAddress(IntPtr HModule, [MarshalAs(UnmanagedType.LPStr), In] string funcName/*lpcstr*/); | ||
|
||
internal static extern IntPtr GetProcAddress(IntPtr HModule, [MarshalAs(UnmanagedType.LPStr), In] string funcName); |
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.
This is a nice change! Should we consider updating the remaining functions to align with this convention in future PRs?
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.
Ohhhhhh... yeah. I've got most of those staged up, not sure if it's ready yet.
Little concerned about why the Windows Enclave 'functional' tests are hung up.. any idea what's going on? Edit: They seem to have passed now. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2997 +/- ##
==========================================
+ Coverage 72.45% 72.47% +0.01%
==========================================
Files 288 288
Lines 59498 59493 -5
==========================================
+ Hits 43111 43115 +4
+ Misses 16387 16378 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description: This is the last major change for the Interop namespace. There was a handful of interop calls tucked away in the native safe and unsafe classes as well as a super secret one in the SNI wrapper class. For this PR they were moved into the Interop namespace in the classes that correspond to the DLLs they were referencing.
One semi-important note: Everything in SafeNativeMethods was moved into a Kernel32Safe class - this was because the "Safe" methods were given an attribute that indicates that the security checks when calling across the managed/unmanaged boundary should not be performed. Rather than potentially change perf, I've elected to leave it as-is but call out when the calls are "safe".
Testing: For the most part, this PR just moves stuff around without changing functionality. It should be good if the tests pass.