|
-
December 7th, 2001, 08:31 AM
#1
how to get the filesize of a file, which lies on a ftp server?
hi,
does anyone know, how to get filesize of a file lieing on a ftp-server?
thanx in advance
dEUs
greets
dEUs
-
December 7th, 2001, 08:55 AM
#2
Re: how to get the filesize of a file, which lies on a ftp server?
read MSDN Library for FtpGetFileSize Function
let me know if this help
-
December 7th, 2001, 09:02 AM
#3
Re: how to get the filesize of a file, which lies on a ftp server?
nope id didnt help... my MSDN dont knows that funktion...
but someone else helped me: CFtpFindFile::FindFile()
greets
dEUs
-
December 7th, 2001, 09:05 AM
#4
Re: how to get the filesize of a file, which lies on a ftp server?
FtpGetFileSize Function
--------------------------------------------------------------------------------
Retrieves the file size of the requested FTP resource.
Syntax
DWORD FtpGetFileSize(
HINTERNET hFile,
LPDWORD lpdwFileSizeHigh
);
Parameters
hFile
[in] HINTERNET handle returned from a call to FtpOpenFile.
lpdwFileSizeHigh
[out] Pointer to the high-order unsigned long integer of the file size of the requested FTP resource.
Return Value
Returns the low-order unsigned long integer of the file size of the requested FTP resource.
Function Information
Stock Implementation wininet.dll
Custom Implementation No
Header Wininet.h
Import library Wininet.lib
Minimum availability Internet Explorer 5
Minimum operating systems Windows NT 4.0, Windows 95
-
December 7th, 2001, 09:19 AM
#5
Re: how to get the filesize of a file, which lies on a ftp server?
hi,
im downloading the file via CFtpConnection::GetFile(), thats why this function isnt working...
the other thing i postet little time ago does not work...
anyone else?
greets
dEUs
-
December 7th, 2001, 09:33 AM
#6
Re: how to get the filesize of a file, which lies on a ftp server?
CFtpFileFind::FindFile
virtual BOOL FindFile( LPCTSTR pstrName = NULL, DWORD dwFlags = INTERNET_FLAG_RELOAD );
Return Value
Nonzero if successful; otherwise 0. To get extended error information, call the Win32 functionGetLastError.
Parameters
pstrName
A pointer to a string containing the name of the file to find. If NULL, the call will perform a wildcard search (*).
dwFlags
The flags describing how to handle this session. These flags can be combined with the bitwise OR operator (|) and are as follows:
INTERNET_FLAG_RELOAD Get the data from the wire even if it is locally cached. This is the default flag.
INTERNET_FLAG_DONT_CACHE Do not cache the data, either locally or in any gateways.
INTERNET_FLAG_RAW_DATA Override the default to return the raw data (WIN32_FIND_DATA structures for FTP).
INTERNET_FLAG_SECURE Secures transactions on the wire with Secure Sockets Layer or PCT. This flag is applicable to HTTP requests only.
INTERNET_FLAG_EXISTING_CONNECT If possible, reuse the existing connections to the server for new FindFile requests instead of creating a new session for each request.
Remarks
Call this member function to find an FTP file.
After calling FindFile to retrieve the first FTP file, you can call FindNextFile to retrieve subsequent FTP files.
Example
See the example in the CFtpFileFind class overview.
CFtpFileFind Overview | Class Members | Hierarchy Chart
See Also CFtpFileFind::FindNextFile, CFileFind
-
December 7th, 2001, 10:02 AM
#7
Re: how to get the filesize of a file, which lies on a ftp server?
tank u, but i have a msdn on my on
ok now the code works, i forgot to call FindNextFile once befor calling GetLength()
greets
dEUs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|