Up: GEOS SDK TechDocs | Up | Prev: InitFileEnumStringSection() ... | Next: InitFileRevert() ...

InitFileReadStringBlock()

Boolean	InitFileReadStringBlock(
        const char *		category,
        const char *		key,
        MemHandle *		block,
        InitFileReadFlags		flags,
        word *		dataSize);

This routine reads a string entry in the GEOS.INI file, allocates a new block on the global heap, and copies the read string into the new block. It returns the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteString() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
block
A pointer to a memory block handle variable. Upon return, this variable will contain the handle of the newly allocated block; the block will contain the string read from the file. It is your responsibility to free this block when you're done with it.
flags
A record of InitFileReadFlags indicating the method of character conversion upon reading (upcase all, downcase all, do not change).
dataSize
A pointer to a word which, upon return, will contain the size of the string (in bytes) actually read from the file.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Include: initfile.h

InitFileReadStringBuffer()

Boolean	InitFileReadStringBuffer(
        const char *		category,
        const char *		key,
        char *		buffer,
        InitFileReadFlags		flags,
        word *		dataSize);

This routine reads a string entry in the GEOS.INI file, copying it into a passed, locked buffer. It returns the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteString() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
buffer
A pointer to a buffer into which the returned string will be written. This buffer must be in locked or fixed memory. If you don't know the approximate size of the data, you may want to use the (slightly less efficient) InitFileReadStringBlock() .
flags
A record of InitFileReadFlags indicating the size of the passed buffer as well as the method of character conversion upon reading (upcase all, downcase all, do not change).
dataSize
A pointer to a word which, upon return, will contain the size of the string (in bytes) actually read from the file.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Include: initfile.h

InitFileReadStringSectionBlock()

Boolean	InitFileReadStringSectionBlock(
        const char *		category,
        const char *		key,
        word		section,
        MemHandle *		block,
        InitFileReadFlags		flags,
        word *		dataSize);

This routine reads a string section from the specified entry in the GEOS.INI file, allocates a new block on the global heap, and copies the read string section into the new block. It returns the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteString() or InitFileWriteStringSection() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
section
The zero-based number of the string section to retrieved.
block
A pointer to a memory block handle. Upon return, this pointer will point to the handle of the newly allocated block; the block will contain the string section read from the file.
flags
A record of InitFileReadFlags indicating the method of character conversion upon reading (upcase all, downcase all, do not change).
dataSize
A pointer to a word which, upon return, will contain the size of the string section (in bytes) actually read from the file.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Include: initfile.h

InitFileReadStringSectionBuffer()

Boolean	InitFileReadStringSectionBuffer(
        const char *		category,
        const char *		key,
        word		section,
        char *		buffer,
        InitFileReadFlags		flags,
        word *		dataSize);

This routine reads a string section from the specified entry in the GEOS.INI file, copying it into a passed, locked buffer. It returns the indicated section in the first instance of the category/key combination it encounters, searching the local INI file first. Thus, local settings will always override system or network settings.

This routine is used for reading data written with InitFileWriteStringSection() . Pass it the following parameters:

category
A pointer to the null-terminated string representing the category in which the entry resides. This string ignores white space and is case-insensitive.
key
A pointer to the null-terminated string representing the key to be retrieved.
section
The zero-based number of the string section to be retrieved.
buffer
A pointer to a buffer into which the returned string section will be written. This buffer must be in locked or fixed memory. If you don't know the approximate size of the string section, you may want to use the (slightly less efficient) InitFileReadStringSectionBlock() .
flags
A record of InitFileReadFlags indicating the size of the passed buffer as well as the method of character conversion upon reading (upcase all, downcase all, do not change).
dataSize
A pointer to a word which, upon return, will contain the size of the string section (in bytes) actually read from the file.

The function's return value will be true if an error occurs or if the entry could not be found; it will be false otherwise.

Include: initfile.h


Up: GEOS SDK TechDocs | Up | Prev: InitFileEnumStringSection() ... | Next: InitFileRevert() ...