Allocates or reallocates memory for a C style unicode string and writes a pointer to this string at the specified address.

WritePWString(nAddress, cValue [, nCodePage])

Parameters

nAddress

The indirect memory address to which the data should be written.

nCodePage (optional)

default = the codepage set with VFP2CSys(4, nCodePage) which defaults to CP_ACP

The codepage to use in performing the ansi to unicode conversion.
This parameter can be set to the value of any code page that is installed or available in the operating system.

Return Value

A pointer to the allocated C unicode string or 0 if a NULL was written.

Remarks

The pointer returned by this function has to be freed with FreePMem, 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
WriteCString
WriteDouble
WriteFloat
WriteGPCString
WriteInt
WriteInt64
WriteInt8
WriteLogical
WritePChar
WritePCString
WritePDouble
WritePFloat
WritePInt
WritePInt64
WritePInt8
WritePLogical
WritePointer
WritePPointer
WritePShort
WritePUInt
WritePUInt64
WritePUInt8
WritePUShort
WritePWChar
WriteShort
WriteUInt
WriteUInt64
WriteUInt8
WriteUShort
WriteWChar
WriteWCharArray
WriteWString

Used WinApi functions

MultiByteToWideChar