FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TFTP vs. TFTPCLIENT
Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
TFTP vs. TFTPCLIENT
Posted: Tue Dec 01, 2009 04:12 PM

Does the TFTP object allow for the uploading and downloading of files, or can I only do that via the tFTPClient object? I tried oftp:ftpputfile(file_name) and oftp:ftpgetfile(file_name) with TFTP but it doesn't recognize these methods.

Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Re: TFTP vs. TFTPCLIENT
Posted: Tue Dec 01, 2009 07:16 PM

When trying to create an instance of tFtpClient, I get the following error message:

--------------------Configuration: ocw - Debug--------------------
Harbour 1.0.1dev Intl. (Rev. 9361)
Copyright (c) 1999-2008, http://www.harbour-project.org/
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
ftp.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN_TCTRLSOCKET' referenced from C:\FWH\LIB\FIVEH.LIB|TFtpCli
ocw.EXE - 1 error(s), 0 warning(s)

What am I missing? FYI, there is no such error message in the TFTP class, but I can't figure out how to send or receive a file with TFTP.

Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Re: TFTP vs. TFTPCLIENT
Posted: Wed Dec 02, 2009 06:27 PM

Bump....

I need some help resolving this problem. I'm fine with using the TFtpCli object, but I can't use the object due to the following error.

Error: Unresolved external '_HB_FUN_TCTRLSOCKET' referenced from C:\FWH\LIB\FIVEH.LIB|TFtpCli

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TFTP vs. TFTPCLIENT
Posted: Wed Dec 02, 2009 08:27 PM

TCTRLSOCKET

This is a class in the file TCTRLSOCK.PRG. It should already be in one of the FW libs. Perhaps your version of FW is older? Check for the file in FW\SOURCE\CLASSES. Mine is dated 10/12/2008.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Re: TFTP vs. TFTPCLIENT
Posted: Wed Dec 02, 2009 09:04 PM

I believe my version is from January of 09. FWH(9-01) is the name of the install file dated January 26th of this year.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TFTP vs. TFTPCLIENT
Posted: Wed Dec 02, 2009 10:08 PM

Then you should have the PRG. Perhaps it didn't get linked into the FW libs for some reason.

Try compiling and linking the PRG into your EXE.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Re: TFTP vs. TFTPCLIENT
Posted: Wed Dec 02, 2009 10:55 PM

Well James, at least it compiled with that class added to my executable. That's progress. Thank you very much. I'll see how it goes from here. :)

Posts: 55
Joined: Thu Feb 15, 2007 01:35 AM
Resolved......
Posted: Thu Dec 03, 2009 01:47 AM

My bad....

I kept trying to use the FtpGetFile/FtpSendFile functions as METHODS of the oFtp object. Once I finally realized I could call the functions directly rather than trying to call them as a methods of the object, it worked just fine with the oFtp class. Thanks again for your suggestions James. I appreciate the help. For anyone interested, here was the function that works:

FTPGetFile(oFtp:hFtp,fsource,fdest,0,0)

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: TFTP vs. TFTPCLIENT
Posted: Thu Dec 03, 2009 07:31 AM

Michael,

Please review these working examples:
FWH\samples\FtpDir.prg and FWH\samples\gallery\icopyfil\copyfil.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion