Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Download FTP
Message
From
09/07/2004 10:39:13
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
07/07/2004 13:36:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00921339
Message ID:
00922508
Views:
37
Hi Cetin

What is the value for GENERIC_WRITE?

>>And do something similar for uploading?
>>
>>>Mike take a look in answer Cetin gives to me after same question MESSAGE#888926.
>>>
>>>(I must RTFM how to send links)
>
>Yes :) This is 'PutLargeFile' click as is :
>
>local hFile, hIn, lcRead, Written
>With thisform
>	hFile = FtpOpenFile(.hConnection, ;
>		trim(.txtRemoteFile.Value), GENERIC_WRITE, ;
>		.optTransferMode.Value, 0)
>	If hFile = 0
>		.FTPResponse("FtpOpenFile error.")
>		Return
>	Endif
>	.ProgBar.Value = 0
>	hIn = fopen(.txtLocalFile.Value)
>	.ProgBar.Max = fseek(hIn,0,2)
>	=fseek(hIn,0,0)
>	.FTPResponse('Transferred '+trans(0)+' of '+trans(.ProgBar.Max)+' bytes.')
>	Do while !feof(hIn)
>		Written = 0
>		lcRead = fread(hIn,100)
>		If InternetWriteFile(hFile, lcRead, len(lcRead), @Written) = 0
>			.FTPResponse("InternetWriteFile error.")
>			Return
>		Endif
>		.ProgBar.Value = min(.ProgBar.Value+Written,.ProgBar.Max)
>		.FTPResponse('Transferred '+trans(.ProgBar.Value)+' of '+trans(.ProgBar.Max)+' bytes.' )
>	Enddo
>	=fclose(hIn)
>	InternetCloseHandle(hFile)
>Endwith
>
Codes I'm pasting are from a 'test' FTP form. I actually started to build it when I had trouble with timeouts, loginname, pwd with existing FTP utils left for upload\dnload during night (and OCX never worked for me). It could never finish from a UI point but ended my suffers with FTP. Might tidy it up and upload one day.
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform