System.SysUtils.TMarshaller.AllocStringAsAnsi

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function AllocStringAsAnsi(const Str: string): TPtrWrapper; overload;
function AllocStringAsAnsi(const Str: string; CodePage: Word): TPtrWrapper; overload;

C++

System::TPtrWrapper __fastcall AllocStringAsAnsi(const System::UnicodeString Str)/* overload */;
System::TPtrWrapper __fastcall AllocStringAsAnsi(const System::UnicodeString Str, System::Word CodePage)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils TMarshaller

説明

文字列をバッファにコピーします。

AllocStringAsAnsi メソッドは、オーバーロードされています。

  • 第1オーバーロード関数は、Str のコピーを格納したバッファを参照する、ラップ ポインタを返しますが、この Str は、デフォルトのマルチバイト エンコーディングでエンコードされ、null で終了します。 バッファは、Flush が呼び出されるか、レコードがスコープの外に出ると、解放されます。
  • 第2オーバーロード関数は、Str のコピーを格納したバッファを参照する、ラップ ポインタを返しますが、この Str は、CodePage で指定されたマルチバイト エンコーディングでエンコードされ、null で終了します。 バッファは、Flush が呼び出されるか、レコードがスコープの外に出ると、解放されます。

関連項目