The following sample shows one way that you may be able to access to 
the WSFTPDLL.DLL routines in Visual FoxPro 3.0.  This sample is
provided by Kelvin Perez as an example only.  Kelvin has no association
with Ipswitch, Inc.

*----------------------------------------------------------------------------

local HostName, UserID, Password, txtResult, RFile, LFile, lpconnectinfo


declare integer WSFTP_Connect in d:\tmp\wsftpdll.dll       integer, string, ;
                                                           integer, string, ;
                                                           string
declare integer WSFTP_InitCINFO in d:\tmp\wsftpdll.dll     integer, integer, ;
                                                           integer, integer
declare integer WSFTP_CloseConnect in d:\tmp\wsftpdll.dll  integer, integer 
declare integer WSFTP_FreeCINFO in d:\tmp\wsftpdll.dll     integer
declare integer WSFTP_RecvFile in d:\tmp\wsftpdll.dll      integer, string, ;
                                                           string,  integer
declare integer WSFTP_SendFile in d:\tmp\wsftpdll.dll      integer, string,;
                                                           string,  integer

*You should change the next set of variables (5) with the proper information.

HostName="my_server"       
UserID="my_userid"
Password="my_password"
RFile="wsftpdll.txt"
LFile="wsftpdll.txt"

lpConnectInfo= WSFTP_InitCINFO(0,0,0,4)
txtResult = left(alltrim(str((WSFTP_Connect(lpConnectInfo,;
                                  hostname,21,userid,password) / 100))),1)

if not(isnull(txtResult))
  if (txtResult <> "2")
    wait window("WSFTP_Connect: error in "+alltrim(str(lpconnectinfo)) +;
                     "...")
  else
    txtResult = left(alltrim(str(WSFTP_SendFile(lpConnectInfo, lfile,; 
                            rfile,0))),1)
    if (txtResult <> "2") 
      wait window("WSFTP_SendFile (" + txtResult + "): error in ;     
                  lpConnectInfo ("+ alltrim(str(lpConnectInfo))+").")
    else 
      wait window ("WSFTP_Connect: Success")    
    endif    
    txtResult = alltrim(str(WSFTP_CloseConnect(lpConnectInfo,0)))
    wait window "WSFTP_CloseConnect ("+txtResult+"): closing connection..."
  endif   
  nResult = (WSFTP_FreeCINFO(lpConnectInfo))
  txtResult = alltrim(str(nResult))
  wait window "WSFTP_FreeCINFO ("+ txtResult+ ")..."
endif

*-----------------------------------------------------------------------------
Notes:
 1 - The ";" at the end of some statements is to let VFP know that this   
     instrucion continues in the next line.

 2 - I saved the results in text format so I could use it in the Wait Window
     msgs. There are several ways to do this.

 3 - The Wait Window instruction is just to show a text msg. inside a small
     window (without any buttons) and wait until the user presses any key or
     presses a mouse button. Is faster than using a msgBox with buttons and 
     all that stuff, when all I want is to trap the result.

Regards:
Kelvin C. Perez  Valentin
perezk@cvg.baxter.com

