SNAGetConfigValue

The SNALink calls the SNAGetConfigValue function to obtain the value of a specific configuration parameter.

USHORT SNAGetConfigValue(
UCHAR *entryName,
VOID *pBuffer,
ULONG bufferLen,
UCHAR parmType,
ULONG *pRetLength
);

Parameters

entryName
The name of the configuration parameter required.
pBuffer
A pointer to a buffer (if parameter is a string), or a pointer to a LONGINT (if parameter is an integer).
bufferLen
The length of the buffer. Only required if the parameter is TYPESTRING.
parmType
TYPESTRING if parameter is a string.

TYPELONG if parameter is an integer.

pRetLength
Number of bytes returned if parameter is TYPESTRING, or number of bytes available if the buffer was too short.

Return Values

NO_ERROR
OK
ERBADCFG
Error reading configuration file.
ERNOTFND
Entry not found in configuration record.
ERTOOLONG
Data available exceeded the size of the buffer.
ERBADTYPE
A bad type was specified for the parmType parameter.

Remarks

It is strongly recommended that the SNALink read all required configuration parameters at initialization time (when SNALinkInitialize is called by the Base).