Hi John
Generally libraries do these sort of things.
They can provide a wrapper around various low-level functions to make the process higher level, more productive and more usable.
All API's do this sort of thing.
They also allow re-usable code without repeating it, reducing code size and increasing convenience.
A function or class can do this in one project, but a library can be re-used in all your projects.
The criteria will probably be, are you using the same code to do something in several places in your program?
If so abstract it into a function or class and then call that each time you do the task.
Do you foresee this same task arising in other programs?
If so put it into a library and then you save yourself cutting and pasting, not to mention re-reading the code to try and figure out what it does 2 yrs later, for life
regards