DBreturnExpandedText

Top  Previous  Next

Contents of the text incl. attributes deliver.

To the trading of a text element his text contents are determined. The contents are copied, a change in the returned text string does not affect the contents of the data bank. Because the length of the text is not limited, becomes about the parametre len by the call from DBreturnTextString the maximum length of the text (including 0-Character as an end) hand over to the procedure. With return from the procedure the field contains either the real length of the text, if this is shorter than the maximum value or the maximum value if he is longer. In this case the returned text is shortened. It is initialized len with 0, it is written instead of this in len the length of the text and the text is not returned. If in this text element the Flag is put for attribute text, the expanded text, during is delivered by this procedure DBreturnTextString the not expanded text delivers. Because expanding the text needs Time, it is to be recommended to let calculate not first the place need and then to question on the contents with this need, but to undertake instead of this immediately an attempt with a probably sufficient field. If this is too small, then the call Can calculate of the need and call with enough memories occur. In attribute names which should be evaluated about DBreturnExpandedText no % may seem, because this sign is used as a mark.

Parametre

element (PELEMENT) [IN]

The trading of the text by which the text contents should be determined. Here even one may be handed over text-trades, all other does not like the system. An examination takes place if the Debugversion is used.

len (int *) [IN / OUT]

If by call here the value 0 stands, is put down only in len the real length of the string. A value incomparably 0 describes the maximum length of the text with the return. If the text is longer than this value, he is cut off. The length is meant in each case including the final 0-sign.

textString (char *) [IN / OUT]

This is a pointer on an area of at least len signs. In this area the text contents are copied and appearing attributes are expanded. If by call in len 0 stand, this pointer is not used, can own every value.

Result

(T_ERROR) [OUT]

If the procedure could be explained perfectly, it delivers ERROR_OK, but one of the error messages from error.h.

Declaration

#include "database.h"

 

T_ERROR DLLENTRY DBreturnExpandedText (

PTEXT_ELEMENT element,

int * len,

char * textString

);

Related procedures

DBreturnTextString