Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding methods to a class object
Message
 
To
17/08/2007 14:33:06
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01248400
Message ID:
01248856
Views:
28
Jay,

>I'm not sure I understand much about the bytesTotal and tnByteCount. Is this something I'm calculating and then passing? When I use the OLE (MSWinSck.ocx) it doesn't care how much I send it.

No, is not something you need to calculate. When the event DataArrival is fired, it receives in the bytesTotal parameter how many bytes have just arrived, so you can dimension your strData variable to accomodate all of them. In your case, what would happen if you receive 257 characters? It might just discard the last one, or it might generate an error, I do not know. On the other hand, if you just receive 2 characters, you are going to end up with 254 extra trailing blanks that were never received.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform