NativeLibrary.TryLoad Methode

Definition

Überlädt

Name Beschreibung
TryLoad(String, IntPtr)

Stellt eine einfache API zum Laden einer systemeigenen Bibliothek bereit und gibt einen Wert zurück, der angibt, ob der Vorgang erfolgreich war.

TryLoad(String, Assembly, Nullable<DllImportSearchPath>, IntPtr)

Stellt eine allgemeine API bereit, die eine systemeigene Bibliothek lädt und einen Wert zurückgibt, der angibt, ob der Vorgang erfolgreich war.

TryLoad(String, IntPtr)

Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs

Stellt eine einfache API zum Laden einer systemeigenen Bibliothek bereit und gibt einen Wert zurück, der angibt, ob der Vorgang erfolgreich war.

public:
 static bool TryLoad(System::String ^ libraryPath, [Runtime::InteropServices::Out] IntPtr % handle);
public static bool TryLoad(string libraryPath, out IntPtr handle);
static member TryLoad : string * nativeint -> bool
Public Shared Function TryLoad (libraryPath As String, ByRef handle As IntPtr) As Boolean

Parameter

libraryPath
String

Der Name der systemeigenen Bibliothek, die geladen werden soll.

handle
IntPtr

nativeint

Wenn die Methode zurückgegeben wird, übernimmt das Betriebssystemhandle der geladenen systemeigenen Bibliothek.

Gibt zurück

truewenn die systemeigene Bibliothek erfolgreich geladen wurde; andernfalls . false

Ausnahmen

libraryPath ist null.

Gilt für:

TryLoad(String, Assembly, Nullable<DllImportSearchPath>, IntPtr)

Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs
Quelle:
NativeLibrary.cs

Stellt eine allgemeine API bereit, die eine systemeigene Bibliothek lädt und einen Wert zurückgibt, der angibt, ob der Vorgang erfolgreich war.

public:
 static bool TryLoad(System::String ^ libraryName, System::Reflection::Assembly ^ assembly, Nullable<System::Runtime::InteropServices::DllImportSearchPath> searchPath, [Runtime::InteropServices::Out] IntPtr % handle);
public static bool TryLoad(string libraryName, System.Reflection.Assembly assembly, System.Runtime.InteropServices.DllImportSearchPath? searchPath, out IntPtr handle);
static member TryLoad : string * System.Reflection.Assembly * Nullable<System.Runtime.InteropServices.DllImportSearchPath> * nativeint -> bool
Public Shared Function TryLoad (libraryName As String, assembly As Assembly, searchPath As Nullable(Of DllImportSearchPath), ByRef handle As IntPtr) As Boolean

Parameter

libraryName
String

Der Name der systemeigenen Bibliothek, die geladen werden soll.

assembly
Assembly

Die Assembly, die die systemeigene Bibliothek lädt.

searchPath
Nullable<DllImportSearchPath>

Der Suchpfad.

handle
IntPtr

nativeint

Wenn die Methode zurückgegeben wird, übernimmt das Betriebssystemhandle der geladenen systemeigenen Bibliothek.

Gibt zurück

truewenn die systemeigene Bibliothek erfolgreich geladen wurde; andernfalls . false

Ausnahmen

libraryName oder assembly ist null.

assembly ist kein RuntimeAssembly.

Gilt für: