Sign in Join
FPDoc Onlineexperiment

WideStrAlloc function

In unit sysutils

Allocate a null-terminated widestring on the heap.

Declaration

pascal
function WideStrAlloc(size: Cardinal): PWideChar

Description

WideStrAlloc reserves memory on the heap for a widestring with length Len, (terminating #0#0 included), and returns a pointer to it.

Additionally, WideStrAlloc allocates 4 extra bytes to store the size of the allocated memory.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.