Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting comments from DynaZIp ZipFile
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Getting comments from DynaZIp ZipFile
Divers
Thread ID:
00135865
Message ID:
00135865
Vues:
55
I have created a class to handle file Zipping and Unzipping with the DynaZip DLLs. All is working great except retrieving the comments from the zipfile. I am testing by creating a Zip file with comments. I set the ZIP_COMMENT to 1, and set the ZIP_THECOMMENT string to the actual comment string.

I then use the following code to read the comments via the Unzip function:
lnRegID = dunzstart()
if lnRegID = -1
   MessageBox("UnZip initialization failed.", 16, "ERROR!")
   return .f.
endif
lnRetVal = setunzvalue(lnRegID, UNZ_FUNCTION, GETCMTSIZE)
if lnRetVal <> -1
   lnRetVal = setunzstring(lnRegID, UNZ_ZIPFILE, lcZipFile)
endif
lcComment = ""
if lnRetVal <> -1
   lnRetVal = setunzvalue(lnRegID, UNZ_FUNCTION, GETCMTSIZE)
   if lnRetVal <> -1
      lnRetVal = getunzvalue(lnRegID, UNZ_RETCOUNT)
                 && supposed to return length of comments?
      if lnRetVal <> -1
         lnLength = lnRetVal + 1
         lcComment = space(lnLength)
         lnRetVal = setunzvalue(lnRegID, UNZ_FUNCTION, GETCMT)
         if lnRetVal <> -1
            lnRetVal = getunzstring(lnRegID, UNZ_RETSTRING, @lcComment, lnLength)
         endif
      endif
   endif
endif
lnRetVal = dunzend(lnRegID)
RETURN lcComment
Every line of code does execute, just nothing gets returned for the comments. Anyone else had success with this?

TIA!
Mark McCasland
Midlothian, TX USA
Répondre
Fil
Voir

Click here to load this message in the networking platform