The issue is not whether the UDF or Function returns error info as much as being consistent. Those functions you reference do not return Data OR the result (status) codes, they ONLY return the result codes. It makes sense for them to return 0 for success and some status on failure.
Imagine the difficulty if ReadProfileString() returned an error code instead of the data it read! How could you tell, unless you ALWAYS checked the ERROR macro.
I was trying to point out that if a function is expected to return data.. maybe "Variable Data" describes it better, that No Data is a better indication of an error (and a reason to check the ERROR macro) than Error Data, which makes you figure out if what you got was Valid Data or Error Data.
a Rocket Scientist!