-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Move Native Library APIs to NativeLibrary class #21821
Conversation
/// <exception cref="System.ArgumentNullException">If libraryPath is null</exception> | ||
/// <exception cref="System.DllNotFoundException ">If the library can't be found.</exception> | ||
/// <exception cref="System.BadImageFormatException">If the library is not valid.</exception> | ||
public static IntPtr LoadLibrary(string libraryPath) |
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.
Is Library
still needed in the method names now that the Library
is in the type name? "Library" in the
method names looks superfluous:
var handle = NativeLibrary.LoadLibrary("foo")
var p = NativeLibrary.GetLibraryExport(handle, "m");
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.
Thanks; The Library is dropped in the new version of the API. I'll fix this.
src/vm/nativelibrarynative.cpp
Outdated
// | ||
|
||
// | ||
// FCall's for the PInvoke classlibs |
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.
Nit: This comment looks useless.
src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.cs
Outdated
Show resolved
Hide resolved
Thanks for the feedback @AaronRobinsonMSFT and @jkotas |
@dotnet-bot test CentOS7.1 x64 Debug Innerloop Build |
Move APIs that manipulate native libraries from System.Runtime.InteropServices.Marshal class to the new System.Runtime.InteropServices.NativeLibrary class. In API review: #32015, The LoadLibrary APIs were originally Approved to live in System.Runtime.InteropServices.Marshal class. However, recently the decision was changed such that the APIs are in a new NativeLibrary class.
b20b30e
to
f1933b7
Compare
@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please |
Move APIs that manipulate native libraries from System.Runtime.InteropServices.Marshal class to the new System.Runtime.InteropServices.NativeLibrary class. In API review: #32015, The LoadLibrary APIs were originally Approved to live in System.Runtime.InteropServices.Marshal class. However, recently the decision was changed such that the APIs are in a new NativeLibrary class.
Expose the System.Runtime.Interop.NativeLibrary APIs implemented in CoreCLR. API review: #32015 CoreCLR Change: dotnet/coreclr#21821
Expose the System.Runtime.Interop.NativeLibrary APIs implemented in CoreCLR. API review: #32015 CoreCLR Change: dotnet/coreclr#21821 Tests for the API are here: https://github.com/dotnet/coreclr/blob/master/tests/src/Interop/NativeLibrary/NativeLibraryTests.cs
Expose the System.Runtime.Interop.NativeLibrary APIs implemented in CoreCLR. API review: #32015 CoreCLR Change: dotnet/coreclr#21821 Tests for the API are here: https://github.com/dotnet/coreclr/blob/master/tests/src/Interop/NativeLibrary/NativeLibraryTests.cs
Move APIs that manipulate native libraries from System.Runtime.InteropServices.Marshal class to the new System.Runtime.InteropServices.NativeLibrary class. In API review: dotnet/coreclr#32015, The LoadLibrary APIs were originally Approved to live in System.Runtime.InteropServices.Marshal class. However, recently the decision was changed such that the APIs are in a new NativeLibrary class. Commit migrated from dotnet/coreclr@110835b
Expose the System.Runtime.Interop.NativeLibrary APIs implemented in CoreCLR. API review: dotnet/corefx#32015 CoreCLR Change: dotnet/coreclr#21821 Tests for the API are here: https://github.com/dotnet/coreclr/blob/master/tests/src/Interop/NativeLibrary/NativeLibraryTests.cs Commit migrated from dotnet/corefx@5241ad4
Move APIs that manipulate native libraries from
System.Runtime.InteropServices.Marshal class to the new
System.Runtime.InteropServices.NativeLibrary class.
In API review: #32015,
The LoadLibrary APIs were originally Approved to live in
System.Runtime.InteropServices.Marshal class.
However, recently the decision was changed such that the APIs are
in a new NativeLibrary class.