Why is there always a \r\n (newline) after strings that came from
FormatMessage?
I don't want it. :-P
Is there a way to avoid it?
Or if not, is there an API function that removes the newline?
Bye, Peter.
Because.
> I don't want it. :-P
> Is there a way to avoid it?
Yes, remove them.
> Or if not, is there an API function that removes the newline?
No, but just remove them.
Also be aware that FormatMessage doesn't automatically check for
Net and Ras modules. If you want those messages you'll have to
check the error-code against relevant ranges and dynamically
load those modules and use try-fail method.
On the other hand, if you do not have particular requirements but
just want hard and fast FormatMessage-functionality and you're
using Visual C++ then check out the built-in COM-support classes.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?