GCHandleExtensions.GetAddressOfStringData Método

Definição

Importante

Esta API não está em conformidade com CLS.

Recupera o endereço dos dados da cadeia de caracteres em 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>

Parâmetros

handle
PinnedGCHandle<String>

O identificador do qual recuperar o ponteiro.

Retornos

Char*

O endereço do 0º caractere do fixado Stringou null se o identificador não apontar para nenhum objeto.

Atributos

Exceções

O identificador não foi inicializado ou já está descartado.

Aplica-se a