QB64.org Forum
Active Forums => Programs => Topic started by: NOVARSEG on November 19, 2020, 08:24:08 pm
-
.whoops i was going to move my post and did not see you had already replied
-
@NOVARSEG , is this a reply to my library? If so, you are allowed to ask it there. Or, for a quicker response, you can join the Discord server and ask any question about it and I will be able to see your questions sooner.
However, once again, I'm not so sure what it is you are asking. I'll take a stab at it, though. That function call is sending a 1024 byte (1 kilobyte) buffer read from the file to the FTP server.
I'll break the function down for you:
a: a is the return value of the boolean TRUE or FALSE from InternetWriteFile (the function which sends the buffer to the server).
hTransfer: hTransfer is the LONG handle to the session for writing to the file opened by FTPOpenFile
buffer: buffer is the 1024 (1 kilobyte) buffer read from the file
dwWrite: However many bytes are written to the server are then returned in that variable. You can use that to make sure that data is actually written.
I have no clue if I answered your question. If you need more help, reply at the FTP thread (or join the Discord) so when other people have questions then they can see what I answer as well. I'm going to paste the link to this thread in my FTP library thread so it can be found. Let's continue the discussion there.
https://www.qb64.org/forum/index.php?topic=3263.0 (https://www.qb64.org/forum/index.php?topic=3263.0)
-
Ok thanks
you say
****
That function call is sending a 1024 byte (1 kilobyte) buffer read from the file to the FTP server.
****
Ok I'm not familiar with that type of file transfer. I thought the 1024 buffer size was referring to a memory space on your computer.
OK sorry figured it out . there was 4 parameters i thought there was 3
from here
http://speed.eik.bme.hu/help/html/Web_Programming_Unleashed/ch17.htm#WinInetFTPFunctions
****
BOOL InternetReadFile(
IN HINTERNET hFile,
IN LPVOID lpBuffer,
IN DWORD dwNumberOfBytesToRead,
OUT LPDWORD lpNumberOfBytesRead
);
The parameters for this function are as follows: :
hFile is a valid handle returned from a previous call to InternetOpenUrl(), FtpOpenFile(), GopherOpenFile(), or HttpOpenRequest().
lpBuffer is the address of a buffer that receives the data read from the file.
dwNumberOfBytesToRead is the number of bytes to read from the file.
lpNumberOfBytesRead is the address of a variable that receives the actual number of bytes read. If dwNumberOfBytesToRead is larger than the actual number of bytes in the file, use this parameter to determine the actual number of bytes read from file.
****
-
@NOVARSEG
Continue anything further here
|
|
V
https://www.qb64.org/forum/index.php?topic=3263.0 (https://www.qb64.org/forum/index.php?topic=3263.0)
-
k