Quote:

READPROFILESTRING() does not set KiXtart @ERROR codes.




Yet

Just a bit of forward planning, but the UDF has the catch-all "If @ERROR Exit @ERROR Else Exit 2 EndIf" which caters for the current (no error) implementation.

I have a UDF posted somewhere which emulates ReadProfileString() and responds with error codes for missing sections, values and read errors. However it's really old and probably embarassingly badly coded so I didn't bother to try and dredge it up. This UDF is quick'n'dirty and will do the job just as well.