SetupGetMultiSzField  8E_UKL 

[New - Windows NT]

The SetupGetMultiSzField function retrieves multiple strings stored in a line of an INF file, from the specified field to the end of the line.

BOOL SetupGetMultiSzField(

    PINFCONTEXT Context,

// context of a line in an INF file

    DWORD FieldIndex,

// index of the starting field

    PTSTR ReturnBuffer,

// optional, receives the fields

    DWORD ReturnBufferSize,

// size of the supplied buffer

    LPDWORD RequiredSize

// optional, buffer size needed

   );

 

 

Parameters

Context

Pointer to the context for a line in an INF file.

FieldIndex

The 1-based index of the starting field within the specified line from which the strings should be retrieved. The string list is built from each field starting at this point to the end of the line. A FieldIndex of 0 is not valid with this function.

ReturnBuffer

This optional parameter points to a caller-supplied character buffer that receives the strings. Each string is null-terminated, with an extra null at the end of the string list.

ReturnBufferSize

Specifies the size of the buffer pointed to by ReturnBuffer.

RequiredSize

This optional parameter points to a caller-supplied variable that receives the size required for the buffer pointed to by ReturnBuffer. If the size needed is larger than the value specified by ReturnBufferSize, the function fails and a call to GetLastError11C2VS7 returns ERROR_INSUFFICIENT_BUFFER.

 

Return Values

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To get extended error information, call GetLastError11C2VS7.

Remarks

For the Unicode version of this function, the buffer sizes ReturnBufferSize and RequiredSize are specified in number of characters. This number includes the null terminator. For the ANSI version of this function, the sizes are specified in number of bytes.

If this function is called with a ReturnBuffer of NULL and a ReturnBufferSize of zero, the function puts the buffer size needed to hold the specified data into the variable pointed to by RequiredSize. If the function succeeds in this, the return value is TRUE. Otherwise, the return value is FALSE and extended error information can be obtained by calling GetLastError11C2VS7.

Thus, you can call the function once to get the required buffer size, allocate the necessary memory, and then call the function a second time to retrieve the data. Using this technique, you can avoid errors due to an insufficient buffer size.

See Also

SetupGetBinaryField, SetupGetIntField, SetupGetStringField