Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 4989d99

Browse files
author
swaroop-sridhar
committed
Refactor DllImport load functions
This change refactors the code in DllImport in preparation for implementing the new NativeLibrary API here: https://github.com/dotnet/corefx/issues/32015 In particular, it introduces a change in the semantics of the internal LoadLibrary helper functions. When a native library is loaded, there are two categories of callers expecting different return values: * External callers likeAssemblyNative::InternalLoadUnmanagedDllFromPath() and the upcoming System.Runtime.Interop.Marshall.LoadLibrary() need the raw system handle * Internal callers like LoadLibraryModule() need the PAL registered handle This change modifies the internal LoadLibraryModule* methods to work in terms of native system handles, so that external callers can obrain them directly. Methods requiring PAL-handles can register them explicitly. There is no change in external signature of DllImport class, or the native Dll cache in AppDomain class.
1 parent 87dbecd commit 4989d99

File tree

3 files changed

+2191
-143
lines changed

3 files changed

+2191
-143
lines changed

0 commit comments

Comments
 (0)