2.19.6. parameter

[<<<] [>>>]

@c Fill parameters into format string

This function takes a format string and a string array and copies the format string replacing $0, $1 ... $n values with the appropriate string values given in the array pointed by ParameterArray.

RETURN VALUE:

The function returns zero if no error occures and returns an error code in case some of the memory buffer does not have enough space or invalid parameter is referenced.

PARAMETERS: pszFormat IN The format string containing the $i placeholders.

--

cbFormat IN The number of characters in the format string

--

ParameterArray IN string array so that ParameterArray[i] is to be inserted in place of the $i placeholders

--

pcbParameterArray IN array of unsigned long values. pcbParameterArray[i] gives the length of the i-th string parameter.

--

pszBuffer OUT buffer to put the result

--

cArraySize IN Number of parameters given in the ParameterArray

--

pcbBufferSize IN/OUT Available bytes in buffer pointed by pszBuffer. Upon return it contains the number of characters that were placed in the buffer.

--

NOTE:

If the function returns non-zero (error code) none of the output variables can be reliably used.

int match_parameter(char *pszFormat,
                    unsigned long cbFormat,
                    char **ParameterArray,
                    unsigned long *pcbParameterArray,
                    char *pszBuffer,
                    int cArraySize,
                    unsigned long *pcbBufferSize
  ){

[<<<] [>>>]