v2: Added 2 function to share common code for various PerfSet...Counter functions, extracted from the already existing PerfSetCounterRefValue Reimplemented new functions using these common functions
The address calculation was extracted, but the value write itself was kept in the function proper, as the values to write were of different types and size.
Do you think this is enough @julliard ? Or do you have some ideas to make the code better?