2.8 Handling of String Parameters

If strings are retrieved from the dialog via the interface functions of Dialog Manager out of the application, DM will copy the corresponding string in a temporary buffer from which the application can take the relevant string. It is not allowed to write in this buffer, since the application does not know in which size the memory space has been allocated for the string. On the next call to Dialog Manager which is providing again a string as result, this temporary buffer is overwritten. This is not the case, however, if this function has been called by the option DMF_DontFreeLastStrings. Only by using this option the value of the string will not be overwritten. If this option is not set, then the string which has been received before cannot be accessed any more.

Example

DM_GetValue (Obj, AT_text, ...);

    =>     string is copied into temporary buffer

DM_GetValue (Obj1, AT_text, ...);

    =>    string is copied, old string is not valid

        any more!

 

DM_GetValue(Obj, AT_text, ...);

    =>     string is copied in temporary buffer

DM_GetValue(Obj1, AT_text, ...., DMF_DontFreeLastStrings);

    =>    text of object is copied and old string

         is still valid

DM_GetValueIndex(Obj2, AT_content, ...);

    =>     string is copied, both of the strings queried

         before are no longer valid.