Up: GEOS SDK TechDocs | Up | Prev: InitFileReadStringBlock() ... | Next: InkDBGetDisplayInfo() ...

InitFileRevert()

Boolean	InitFileRevert(void);

This routine restores the GEOS.INI file from its saved backup version. It ensures that no other thread is operating on the file while it is being restored. This function returns an error flag: true represents an error in restoring the file; false indicates success.

Include: initfile.h

InitFileSave()

Boolean	InitFileSave(void);

This routine saves the GEOS.INI file synchronously by updating the backup file to be the current version. ( InitFileCommit() actually overwrites the GEOS.INI file itself.) It ensures that no other thread is operating on the file while it is being written out. This function returns an error flag: true represents an error in trying to save the file; false indicates success.

Include: initfile.h

InitFileWriteBoolean()

void	InitFileWriteBoolean(
        const char *		category,
        const char *		key,
        Boolean 		bool);

This integer writes a Boolean value into the specified category and key of the local GEOS.INI file. The Boolean will appear as "true" or "false" if the user looks at GEOS.INI with a text editor, but it will be an actual Boolean value to GEOS. Pass this routine the following:

category
A pointer to the null-terminated character string representing the INI category into which the data should be written.
key
A pointer to the null-terminated character string representing the INI key within category into which the data should be written.
bool
The Boolean value to be written.

Once written, the Boolean value can be read with InitFileReadBoolean() .

Include: initfile.h

InitFileWriteData()

void	InitFileWriteData(
        const char 		*category,
        const char 		*key,
        const void 		*buffer,
        word		bufSize);

This routine writes a given piece of data to the local GEOS.INI file. Pass it the following:

category
A pointer to the null-terminated character string representing the INI category into which the data should be written.
key
A pointer to the null-terminated character string representing the INI key within category into which the data should be written.
buffer
A pointer to a locked or fixed buffer containing the data to be written.
bufSize
The size of the buffer in bytes.

Once data has been written to the INI file, it can be read with InitFileReadDataBlock() or InitFileReadDataBuffer() .

Include: initfile.h

InitFileWriteInteger()

void	InitFileWriteInteger(
        const char 		*category,
        const char 		*key,
        word		value);

This routine writes an integer into the category and key specified for the local GEOS.INI file. Pass the following:

category
A pointer to the null-terminated character string representing the INI category into which the data should be written.
key
A pointer to the null-terminated character string representing the INI key within category into which the data should be written.
value
The integer to be written.

The integer, once written, can be read with InitFileReadInteger() .

Include: initfile.h

InitFileWriteString()

void	InitFileWriteString(
        const char *category,
        const char *key,
        const char *str);

This routine writes an entire string into the category and key specified for the local GEOS.INI file. Pass it the following:

category
A pointer to the null-terminated character string representing the INI category into which the data should be written.
key
A pointer to the null-terminated character string representing the INI key within category into which the data should be written.
str
A pointer to the null-terminated string to be written. If the string contains line feeds or carriage returns, it will automatically be parsed into string segments and be put within curly braces; if it contains curly braces, all closing braces will automatically have a backslash inserted before them.

To read a string written with this routine, use InitFileReadStringBlock() or InitFileReadStringBuffer() .

Include: initfile.h

InitFileWriteStringSection()

void	InitFileWriteStringSection(
        const char *category,
        const char *key,
        const char *string);

This routine appends a string section onto the blob specified by the category and key parameters. The string section will become part of the blob and will be its last section. The section may not contain any carriage returns or line feeds. Pass this routine the following:

category
A pointer to the null-terminated character string representing the INI category into which the data should be written.
key
A pointer to the null-terminated character string representing the INI key within category into which the data should be written.
string
A pointer to the string section to be written.

Once written, the segment may be read with InitFileReadStringSectionBlock() or InitFileReadStringSectionBuffer() .

Include: initfile.h


Up: GEOS SDK TechDocs | Up | Prev: InitFileReadStringBlock() ... | Next: InkDBGetDisplayInfo() ...