Navigation:  Reference > Classes >

UnicodeDynStr()

Previous pageReturn to chapter overviewNext page

The UnicodeDynStr() is subclass of gwst() that have methods to store strings in unicode format and manipulate them as ANSI or UNICODE as required. This class is designed to be used inside a structure definition, but also can be used as stand alone.

 

Instance ACCESS/ASSIGN Methods:

::cStr

On ASSIGN convert the provided ANSI string and store it as UNICODE. If NIL is assigned release the internal memory for the string if was allocated with ::cStr or ::wStr methods.

On ACCESS return the string as ANSI.

 

::wStr

On ASSIGN store the provided string without conversion assumin the is UNICODE. If NIL is assigned release the internal memory for the string if was allocated with ::cStr or ::wStr methods.

On ACCESS return the string as in UNICODE format without transform it.

 

 

Structure Members:

::p

LPWSTR pointer to the string.

You can assign the pointer manually with this member, but having the following restrictions:
When ::cStr := NIL , pointer will be detached to the object, but not released.
If the string is not DOUBLE ZERO TERMINATED ::cStr and ::wStr will result into a internal exception.