DBreturnInfoSettings

Top  Previous  Next

Author: Horst Wessel

Date: 2/11/95

Source code: attribut.c

Changes: 2.11.95 parametre Step built-in.

 

Contents of an attribute

To a trading for an attribute the available information is determined. This are, e.g., the name of the attribute and the contents of this attribute. These are written in about the user at possession put structure settings. Because the name, as well as the contents of an attribute of variable length are, these fields about pointer are realised. For the user arise, on this occasion, two possibilities to reach to the necessary storage space. If in the structure settings the pointers with ZERO are initialized, DBreturnInfoSettings procures the storage space in the necessary size independently. The user has to go the storage space then about Free Free again remove. Which procedure is demanded under Free, depends on the company system. The user can provide the storage space also himself and here also static variables or stack areas are possible. Then DBreturnInfoSettings uses this storage space and cuts off values which do not fit in the available place.

Parametre

info (PINFO_ELEMENT) [IN]

This is the trading of an attribute. The contents and the name should be determined by this.

settings (INFO_SETTINGS *) [IN / OUT]

The user makes available a structure of the type INFO_SETTINGS in which this procedure writes the data of the attribute. The storage space can be static or dynamic and is administered by the user. The pointers and length data must be initialized. maxAttribLen and maxAttribNameLen are filled with the real length of the attribute name and the attribute value. If attribName or attrib ZERO are, memory is requested by the procedure. Then she also fills the length data maxAttribLen and maxAttribNameLen. If a pointer is not a ZERO, he must point at an area which shows at least the length maxAttribNameLen, or maxAttribLen. Then the memory is used and only maxAttribLen, or maxAttribNameLen with the really copied values headlined.

grade (int) [IN]

aloofly, must be 1.

If further information is introduced, these become grades distinguished.

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 DBreturnInfoSettings (

PINFO_ELEMENT info,

INFO_SETTINGS * settings,

int grades

);