Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSComm32.ocx
Message
De
01/02/2004 05:35:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00870153
Message ID:
00872752
Vues:
31
Hi Jerry,

>I tinkered with my original form enough to get it to send the file (byte by byte). However, there are still two problems: 1) The file is transferring VERY slowly. 2) Although the receiver computer's file matches the original, it does not open. Do I need to compile it somehow? Do I need to put in headers? I tested it with a small dbf, but the receiver pc gives me the message "Not a table" when I try to open it.

I can't comment on the speed without seeing your code. As far as the files matching, are you talking file size alone? Have you tried it both in binary and text modes? I recommend that you get Beyond Compare to check the file differences. Great tool. And double check all your type conversions.

>I may try to combine my code with Grier's, so I can get his added features. Should my OnComm code (with modifications to send/receive the whole file at once) go in his SendFile and ReceiveFile methods? If so, do I need a DODEFAULT()?

Nope. What he does, when you initiate the transfer, is to put the control in binary mode, suspends OnComm processing (polling mode), and sets a TransferMode flag which short circuits your OnComm code. When he finishes, he restores the prior state. Any code above and beyond the transfer process you may require will still reside in the approprate OnComm event method.

Keep in mind here that the receiving end really initiates the transfer. The sender must be started and "Waiting", then the receiver transfer started. This signals the sender to start the transfer. There is a 5-10 second window to get rolling before the sender times out, so the coordination of both ends is critical. XMODEM is about as simple as it gets, and it is up to you to do all the setup on both ends. If you find it is getting too costly timewise, you might look at a commercial alternative. I pointed this one out as it is cheap (free), works, and includes source code. You get what you pay for :-)

>I appreciate all of your help. If I can help you in any way in the future, don't hesitate to ask.
>
>Jerry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform