GCHandleExtensions.GetAddressOfStringData Méthode

Définition

Important

Cette API n’est pas conforme CLS.

Récupère l’adresse des données de chaîne dans handle.

public:
[System::Runtime::CompilerServices::Extension]
 static char* GetAddressOfStringData(System::Runtime::InteropServices::PinnedGCHandle<System::String ^> handle);
[System.CLSCompliant(false)]
public static char* GetAddressOfStringData(this System.Runtime.InteropServices.PinnedGCHandle<string> handle);
[<System.CLSCompliant(false)>]
static member GetAddressOfStringData : System.Runtime.InteropServices.PinnedGCHandle<string> -> nativeptr<char>

Paramètres

handle
PinnedGCHandle<String>

Handle à partir duquel récupérer le pointeur.

Retours

Char*

Adresse du 0ème caractère de l’épinglé Stringou null si le handle ne pointe vers aucun objet.

Attributs

Exceptions

Le handle n’est pas initialisé ou est déjà supprimé.

S’applique à