NativeLibrary.TryGetExport(IntPtr, String, IntPtr) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient l’adresse d’un symbole exporté et retourne une valeur qui indique si l’appel de méthode a réussi.
public:
static bool TryGetExport(IntPtr handle, System::String ^ name, [Runtime::InteropServices::Out] IntPtr % address);
public static bool TryGetExport(IntPtr handle, string name, out IntPtr address);
static member TryGetExport : nativeint * string * nativeint -> bool
Public Shared Function TryGetExport (handle As IntPtr, name As String, ByRef address As IntPtr) As Boolean
Paramètres
- handle
-
IntPtr
nativeint
Handle du système d’exploitation de la bibliothèque native.
- name
- String
Nom du symbole exporté.
- address
-
IntPtr
nativeint
Lorsque la méthode est retournée, contient l’adresse de symbole, le cas échéant.
Retours
true si l’adresse du symbole exporté a été trouvée avec succès ; sinon, false.
Exceptions
handle est Zero ou name est null.
Remarques
Il s’agit d’un wrapper simple autour des appels de système d’exploitation et n’effectue aucun mangling de nom.
L’appel de cette méthode avec un paramètre non valide handle autre que IntPtr.Zero non pris en charge et entraîne un comportement non défini.