Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Address of Function/ Event Handler
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Address of Function/ Event Handler
Miscellaneous
Thread ID:
00503534
Message ID:
00503534
Views:
45
I'm using Catalysts FTP DLL to upload/download files. They have a function to register an event, so the PutFile/GetFile functions will fire the specified function. This is useful for progressbar so one can see the progress of the upload/download.

They gave me an example in VB and I was wondering if it is possible in VFP6 (Haven't looked at VFP7, but an answer here would be great too).

In VB they assign a Subroutine:
Public Sub EventHandler(ByVal hClient As Long, ByVal nEvent As Long, ByVal nError As Long, ByVal dwParam As Long)
Which will handle the progress information of the upload/download.

Then they have following after a successful connection to the FTP server and before starting upload/downloads:
If FtpRegisterEvent(g_hClient, FTP_EVENT_PROGRESS, AddressOf EventHandler, 1234) = -1 Then
*!* etc..
Is it possible in VFP to indicate an address pointer like that? Or would the best solution be to create an ActiveX wrapper in VB for VFP, so working events can be fired?

And ideas and help is appreciated.

TIA,
- Erik Niese-Petersen

Crazy Dane in USA.
Next
Reply
Map
View

Click here to load this message in the networking platform