Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pointers in VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01158687
Message ID:
01158852
Views:
35
Hello Sergey,

Thanks for your input. I downloaded the two flls and will give them a shot. Looking through them, it appears that they both support the callback functions which solves question number 1. However, I don't see anything in them that would address my second question regarding the translation of a pointer. Am I overlooking something or do you have any ideas on how I might handle that part of the equation?

Thanks so much for all your help (both in this thread and many others that I've posted.)


>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform