On Mon Mar 31 18:41:41 2025 +0000, Alexandre Julliard wrote:
This could use some kind of helper function.
Hi @julliard The checks are different for the various functions, so the actually shared parts are the for loop to extract the index and actually set the value. Maybe the
` for (i = 0; i < template->counterset.NumCounters; ++i) if (template->counter[i].CounterId == counterid) break; `
loop could be replaced with a get_performance_counter_index function and the line to set the value with a set_perfromance_counter_value function. Or did you mean to have a global helper called by any of these functions? Maybe passing an enum as arguments to select from what function that was called, to properly address the different checks?