Vlad,
That's the max number of characters to copy. Since it's a string copy I do believe it'll stop at the first terminating null in the source string provided it occurs before the iMaxLength is reached.
>Probably it will work. But, as you say, it's ugly. Did you try lstrcpyn()? It has a 3rd param that is the number of chars to be copied.