Allocates or reallocates a C style string.

WriteCString(nAddress, cValue)

Parameters

nAddress

Either 0 or a previously allocated pointer.
If 0 a new memory area large enough to contain the string in cValue + 1 for the nullterminator is allocated and the string is copied to it.
If nAddress is not 0 it's assumed to be a pointer to a memory area previously allocated by WriteCString or AllocMem.

cValue

The string to allocate.

Return Value

A pointer to the allocated C string.

Remarks

The pointer returned by this function has to be freed with FreeMem, otherwise you produce a memory leak.

See Also

Reference

ReadBytes
ReadChar
ReadCharArray
ReadCString
ReadDouble
ReadFloat
ReadInt
ReadInt64
ReadInt8
ReadLogical
ReadPChar
ReadPCString
ReadPDouble
ReadPFloat
ReadPInt
ReadPInt64
ReadPInt8
ReadPLogical
ReadPointer
ReadPPointer
ReadProcessMemoryEx
ReadPShort
ReadPUInt
ReadPUInt64
ReadPUInt8
ReadPUShort
ReadPWString
ReadShort
ReadUInt
ReadUInt64
ReadUInt8
ReadUShort
ReadWCharArray
ReadWString
WriteBytes
WriteChar
WriteCharArray
WriteDouble
WriteFloat
WriteGPCString
WriteInt
WriteInt64
WriteInt8
WriteLogical
WritePChar
WritePCString
WritePDouble
WritePFloat
WritePInt
WritePInt64
WritePInt8
WritePLogical
WritePointer
WritePPointer
WritePShort
WritePUInt
WritePUInt64
WritePUInt8
WritePUShort
WritePWChar
WritePWString
WriteShort
WriteUInt
WriteUInt64
WriteUInt8
WriteUShort
WriteWChar
WriteWCharArray
WriteWString

Used WinApi functions

HeapAlloc
HeapReAlloc
memcpy