Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FtpGetFileSize
Message
De
30/11/2000 12:26:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00447436
Message ID:
00447466
Vues:
11
>Anybody knows how to call this api function?
>
>I do:
>
>nFileSize=FtpGetFileSize(OpenFileHandle,0)
>
>But returns always -1

DWORD FtpGetFileSize(
IN HINTERNET hFile,
OUT LPDWORD lpdwFileSizeHigh
);

DECLARE INTEGER FtpGetFileSize IN WININET INTEGER hINTERNET, INTEGER @ lpdwHigh

You need an existing hINTERNET instance from FtpOpenFile(), and have to pass a VFP numeric by reference as the second parameter as in:

nFileSizeHigh = 0
nFileSizeLow = FtpGetFile(hINTERNET,@nFileSizeHigh)
nFileSize = IIF(nFileSizeHigh < 0, 2^32 + nFileSizeHigh,nFileSizeHigh)*2^32 +;
IIF(nFileSizeLow < 0, 2^32 + nFileSizeLow,nFileSizeLow)

It requires IE5 or better.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform