Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pointers in VFP?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01158687
Message ID:
01158703
Vues:
29
This message has been marked as a message which has helped to the initial question of the thread.
Hi Rodd,

VFP doesn't support callback functions out of the box. There're a couple of FLLs you can try
- vfp.fll - Callback for vfp File #20453
- VFP2C32 File #28338

>We just started using bszip.dll, a win32 dll, that allows us to zip and unzip files. However, we've run into a couple snags.
>
>1) In order to display a progress bar during compressing/extracting, we are required to pass a pointer to our application's function that the dll will periodically call. The function is responsible for checking the current progress and displaying/updating the bar. The documentation for the extract function looks like this:
>
>declare function zExtractAll Lib "bszip.dll" (ByVal ExtractDirectory as string, ByVal Password as string,_
>ByVal OverwriteExisting as byte, ByVal SkipOlder as byte, ByVal UseFolders as byte,_
>ByVal TestOnly as byte, ByVal RTInfoFunc as long) as long
>
>*** VFP declaration
>DECLARE INTEGER zExtractAll IN bszip STRING extractdir, STRING pswd,;
> INTEGER OverwriteExisting, INTEGER SkipOlder, INTEGER UseFolders,;
> INTEGER TestOnly, LONG RTInfoFunc
>
>
>
>2) In order to get the file name of each of the files included in a zipped file, we are required to call a function: zGetFileName(nIndex). This function returns a pointer to a string somewhere in memory that contains the file's name. The documentation says that the function "MUST be wrapped with StringFromPointer to obtain the VB string." I'm assuming that VB has a means of returning the contents of a memory buffer based on a pointer. Does VFP have anything like this? Is there any way to accomplish this in VFP?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform