Dmitry Timoshkov wrote:
"Nikolay Sivov" bunglehead@gmail.com wrote:
LoadStringA doesn't return necessary buffer length when called with (buflen = 0) but LoadStringW does. Since I need to return a necessary buffer length from both GetRoleText[A/W] I used LoadStringW in both cases, converting to multibyte in ansi call.
I don't see in your tests that GetRoleText is supposed to return the string length when it's called with buffer length set to 0.
GetRoleText supposed to return string length when buffer is NULL. Cause there's no way to get this length by LoadStringA *without* passing a not-NULL pointer to buffer (I don't now how long should it be) so I used LoadStringW for ansi call too.