#include <nwconfig.h> #include <nwerrors.h> or #include <nwcalls.h>int N_API NWParseConfig (PCHAR configFile, PCHAR sectionName, UINT sectionInstance, UINT grammarTableSize, GrammarTableStruct N_FAR
grammarTable, SetTableStruct N_FAR
setTable);
The following constants are defined as follows:
MAX_PARAMETERS 8 MAX_SECTION_NAME_SIZE 32 MAX_VALUE_SIZE 80 MAX_SET_ELEMENTS 20
Placing any of the types of values and optional types, except T_OPTIONAL, in paramType
of TypeDefaultStruct will cause the function to try matching that value
after the keyword.
For example, in the NETWARE Requester section of NET.CFG, one keyword is PREFERRED SERVER which is of type T_STRING. The parser will look for this keyword and then interpret the
rest of the line as a string. If the type is T_OPTIONAL, you should place a default value in the defaultValue
member of TypeDefaultStruct to ensure a default
value will be returned in the case of a missing value.
If the type is one of T_SET##, setTable should contain valid information to assist the parser, otherwise it should be NULL. A set is a list of values the value may contain.
The types of values and default values of optional types follow:
T_OPTIONAL = 80h T_NUMBER = 01h T_INDEX = 02h T_STRING = 03h T_HEX_STRING = 04h T_HEX_NUMBER = 05h T_LONG_NUMBER = 06h T_LONG_HEX = 07h
T_SET_1 equ 10h T_SET_2 equ 11h T_SET_3 equ 12h T_SET_4 equ 13h T_SET_5 equ 14h T_SET_6 equ 15h T_SET_7 equ 16h T_SET_8 equ 17h T_SET_9 equ 18h T_SET_10 equ 19h T_SET_11 equ 1Ah T_SET_12 equ 1Bh T_SET_13 equ 1Ch T_SET_14 equ 1Dh T_SET_15 equ 1EH T_SET_16 equ 1Fh
Miscellaneous