chsvlib
chsv helper source code

◆ ListApplyFuncToElements()

EXTERN_C bool Chusov::ListApplyFuncToElements ( HCHSVLIST  hList,
LPLISTELEMENTFUNCTION  lpfnForEach,
void *  lpArg 
)

Executes the specified callback function over each element of the list.

Parameters
hListis a handle to the list.
lpfnForEachis a pointer to the callback function to be called over each element of the list. See Chusov::LPLISTELEMENTFUNCTION for its description.
lpArgis a caller-defined argument passed to each call to lpfnForEach "as-is".
Returns
If the ListApplyFuncToElements() function itself succeeds it calls lpfnForEach for each element of the list despite of return values of the calls to the callback function. Although the total return value of the ListApplyFuncToElements() function would be a logical AND over return values of the calls. If the ListApplyFuncToElements() fails it returns false;
Remarks
Declared in chsvlist.h.
The list is not thread-safe.
The function itself throws nothing but passes exceptions originated in the callback up to the caller without internal processing.