I’d like to thank you for posting this method of reading a line!!! I was using SendMessageA reading into a string type and occasionally em_getline wouldn’t read a line (iretval would return 0) and the errors got worse over time (like hours) so I had to restart the application a couple of times a day. This error was very frustrating as it wasn’t consistent. I don’t know how the Unicode got converted as I didn’t do anything else to the string.
Using your SendMessage (W?) and reading into a byte array and converting the unicode seems to have fixed my reading problems. 🙂
The reading issue has been nagging at me for many months.
After the room text get to about 250k pal start cutting line from the top. Since your application is outside paltalk you may have the text cut between 2 different calls.
If the text cuts after you made the get number of lines call the line number is not valid anymore.
It depends on how busy is the room.