GCHandleExtensions.GetAddressOfStringData メソッド

定義

重要

この API は CLS 準拠ではありません。

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>

パラメーター

handle
PinnedGCHandle<String>

ポインターを取得するハンドル。

返品

Char*

ピン留めされた Stringの 0 番目の文字のアドレス。ハンドルがオブジェクトを指していない場合は null

属性

例外

ハンドルが初期化されていないか、既に破棄されています。

適用対象