Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Address of Function/ Event Handler
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Address of Function/ Event Handler
Divers
Thread ID:
00503534
Message ID:
00503534
Vues:
48
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform