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
Title:
Pointers in VFP?
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01158687
Message ID:
01158687
Views:
137
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?

Thanks so much for your help!

Rodd
Next
Reply
Map
View

Click here to load this message in the networking platform