[VB .NET] Read Line from Paltalk 10

You can talk about VB programming here

Re: [VB .NET] Read Line from Paltalk 10

Postby Chike » Tue Aug 16, 2011 4:13 pm


Auto" keyword is set to let the target platform determines the suitable character width (ANSI or Unicode).

So it depends on the project settings, and probably is SendMessageW for your project.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Re: [VB .NET] Read Line from Paltalk 10

Postby usenet7 » Sun Sep 11, 2011 12:46 am

iRetval = SendMessage(hwnd, EM_GETLINE, iLine, baText)
Shouldn't you check the value of IRetval to make sure it isn't zero?
usenet7
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Mon Jan 04, 2010 11:53 pm

Re: [VB .NET] Read Line from Paltalk 10

Postby Chike » Sun Sep 11, 2011 11:39 am

If it's zero it will result in empty string.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Re: [VB .NET] Read Line from Paltalk 10

Postby usenet7 » Sun Sep 11, 2011 2:11 pm

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.
usenet7
imFiles Newbie
imFiles Newbie
 
Posts: 7
Joined: Mon Jan 04, 2010 11:53 pm

Re: [VB .NET] Read Line from Paltalk 10

Postby Chike » Sun Sep 11, 2011 8:44 pm

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.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Previous

Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

cron