"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.
P.S. Is there any documented RT_STRING max length? If it's I could use a local buffer of this length for GetRoleTextA
I'm not aware of such a documentation. The only way to prove/find something is write a test case.