Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FtpGetFileSize
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00447436
Message ID:
00447466
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform