Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding methods to a class object
Message
 
À
17/08/2007 14:33:06
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01248400
Message ID:
01248856
Vues:
30
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform