Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File Transfer with Commtools
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
File Transfer with Commtools
Divers
Thread ID:
01144630
Message ID:
01144630
Vues:
57
Hi there,

I am trying to write a little where where I want to use the Commtools-ActiveX-Version. It seems to work very fine but when it comes to transferring files via x- or z-modem-protocol I am encountering problems.
When using z-modem the carrier gets lost the moment I start the transfer. When I try to close the port, the app hangs.
When using x-modem the transfer works but when finished the carrier gets lost too and when trying to close the port, the app hangs too.
Has anybody encountered the same and some advice. A code snippet of what I am doing is following

Thanks

Thomas

***** Code snippet
* Putting the file Queue
cFile = "D:\foxprogs\biblos32\send\itest.dat"
IF thisform.ot.queuefile(cFile) <> 1
   * Error
   MESSAGEBOX("Fehler beim Stellen in die Queue!")
   return
Endif

* Datei senden
thisform.ot.writedata("xmodem s softtest /test" + CHR(13))
IF thisform.ot.peekdata("eingeben",nWait, @nD) <> 1
   * Error
   MESSAGEBOX("Fehler bei Warten auf Xmodem-Eingabe")
   thisform.ot.close(.F.)
   RETURN
ELSE
   thisform.ot.flushdata(1,0)   
ENDIF
thisform.ot.writedata("." + CHR(13))
IF thisform.ot.peekdata("starten",nWait, @nD) <> 1
   * Error
   MESSAGEBOX("Fehler bei Warten auf Xmodem-Eingabe")
   thisform.ot.close(.F.)
   RETURN
ELSE
   thisform.ot.flushdata(1,0)   
ENDIF
*thisform.ot.transferabortkey = 27   && ESC
nRet = thisform.ot.sendfile(MC_XMODEM,0)
* Carrier has been lost here 
IF nRet == 1
   * Transfer finished
   MESSAGEBOX("Erfolgreich übertragen")
   lGOOd = .T.
ELSE
   * Transfer failed
   MESSAGEBOX("Senden hat nicht funktioniert!")
   lGood = .F.
Endif   
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform