Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing array to zip32.dll
Message
De
24/11/1999 17:24:20
 
 
À
24/11/1999 15:59:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00295280
Message ID:
00295358
Vues:
20
>I try to use zip32.dll to create zip file.
>There is a working VB 5 program which uses this dll
>( http://www.modemss.brisnet.org.au/~mlevoi/infozip.zip )
>I need to convert it into VFP.
>Why the following program crashes? how to make it work.
>
>*Private Declare Function ZpArchive Lib "zip32.dll" _
>*(ByVal argc As Long, ByVal funame As String, ByRef argv As ZIPnames) As Long ' Real zipping action
>*' argc As Long 'number of files
>*' filename As String 'Name of the Zip file
>*' fileArray As ZIPnames 'The array of filenames
>
>declare long ZpArchive in zip32.dll ;
>long argc, string funame , string @ Zipnames
>
>* ' MYZCL.argc = 2
>* ' MYZCL.filename = "c:\wiz\new.zip"
>* ' MYZCL.fileArray = MYNAMES
>
>dime t[1]
>t[1]='c:\autoexec.bat'
>? ZpArchive( 2, 'test.zip', t ) && causes gpf

Simple answer - you can't pass a VFP array through the API interface. And you aren't bringing anything back across the interface since all your values are passed by value. The GPF is likely caused by a memory exception because the API call didn't understand where it could and could not write, and stomped VFP to death.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform