SYSmessageString

Top  Previous  Next

Gets an announcement text from the announcement file.

Moskito orders more than two different files with announcements. The first, FEHLER.DAT, contains the announcements specific for country to the error messages generated by Moskito. The second, MELDUNG.DAT, contains texts, from Moskito and the user's functions should be spent. Such an announcement is identified about a value by the type MESSAGE. This is a floating decimal point value which is formed by a pointer on a text and the number of the announcement. The text specifies the module from which the announcement comes. The value of the pointer is stored as a ganzzahliger portion of the floating decimal point value. The postcomma portion arises from the mistake number. In addition this number is divided by 1000 and is added on the value of the pointer. Instead of encoding this of hand the macro MAKE_MSG_STRING or MAKE_MSG_STRING_NODEFAULT can be also used. From SYSmessageString and SYSerrorString, so also from MAKE_MSG_STRING returned text has been generated with Malloc and must be removed accordingly after the use again with Free. You take the construction of the announcement files please from the suitable chapter.

Parametre

msg (char *) [IN]

The sign chain which specifies the group of the announcements. This text can be freely chosen, however, should agree with the name of the function, so that no overlappings happen.

nummer (int) [IN]

Number of the announcement within the group. There is only in each case an announcement with every combination msg/number.

doDefault (int) [IN]

If this parametre TRUE contains, an announcement is also generated if no entry is for this announcement number in the file. If the parametre FALSE contains, in this case ZERO is delivered as a return value.

Result

(char *) [OUT]

Pointer on a text with the announcement from the file MELDUNG.DAT. The text has been generated with Malloc and must be decontaminated with Free again.

Declaration

#include "basic.h"

 

char *DLLENTRY SYSmessageString (

char *msg,

int nummer,

int doDefault

);

Other declarations

Both macros deliver the text of an announcement back.

#define MAKE_MSG_STRING (modul, nummer) \

SYSmessageString (((LONG) modul) +0.001*nummer, TRUE)

#define MAKE_MSG_STRING_NODEFAULT (modul, nummer) \

SYSmessageString (((LONG) modul) +0.001*nummer, FALSE)