System.MarshaledString

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

type MarshaledString = ^Char;

Properties

Type Visibility Source Unit Parent
pointer public System.pas System System

Description

Defines a null-terminated Unicode string.

MarshaledString defines a pointer to a memory location that contains WideChar values (including the #0 character).

MarshaledString is an alias for PChar.

Notes:

  • MarshaledString is inherently unsafe if used in combination with normal string values. MarshaledString variables are not reference-counted and are not copy-on-written. This may result in corruption of the string values or memory leaks.
  • In keeping with the notion of eliminating pointers and looking forward, the new Delphi Next-Generation Mobile Compiler requires a more explicit style of marshalling data to/from external APIs and libraries. For more information, see Migrating Delphi Code to Mobile from Desktop.


See Also