GCHandleExtensions.GetAddressOfStringData 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.
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
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é.