AssemblyLoadContext.LoadUnmanagedDll(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Allows derived class to load an unmanaged library by name.
protected:
virtual IntPtr LoadUnmanagedDll(System::String ^ unmanagedDllName);
protected virtual IntPtr LoadUnmanagedDll (string unmanagedDllName);
abstract member LoadUnmanagedDll : string -> nativeint
override this.LoadUnmanagedDll : string -> nativeint
Protected Overridable Function LoadUnmanagedDll (unmanagedDllName As String) As IntPtr
Parameters
- unmanagedDllName
- String
Name of the unmanaged library. Typically this is the filename without its path or extensions.
Returns
nativeint
A handle to the loaded library, or Zero.
Remarks
The default implementation always returns IntPtr.Zero. When IntPtr.Zero is returned, the runtime loads the library with its default policy.
This virtual method can be overridden to customize the unmanaged library search algorithm. When overridden the name can be used to identify the library. The loaded library does not need to match the requested name, but can be transformed as needed. This could include adjusting the name for platform specific naming.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για