|Subject:||lstrcpyn documentation problem : string too long but call still succeedes?|
|Posted by:||R.Wieser (addre…@not.available)|
|Date:||Fri, 27 Nov 2020|
I need to copy an ANSI string from a source into a buffer with a fixed
length. That looks like a job for "lstrcpynA". Easy-Peasy, right ?
There is only a tiny issue with it : For some reason its able to accept a
string that is too long to place in the target buffer, *but still succeed*.
The problem (to me) is that the MSDN docucumentation to the call  do not
even /hint/ at how I'm supposed to detect such a succeeded-but-failed
Does anyone know whay the succeeded-but-failed result look like ?
I've seen the page state that I should not use that function, but instead
something like StringCchCopy. The problem with that is that they "forgot"
to mention which DLL its part of ... if its actually a DLL function to begin