Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help needed with LiteUnZip !

Help needed with LiteUnZip !

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasehelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fritzables
    wrote on last edited by
    #1

    Hi to all, I am using VC++ 2005 and trying to employ LiteUnzip a series of ZIPPED files but once I retrieve the file names within the ZIP I would like to decompress them using an alternate path, so I am trying to override ze.Name and give it a path which has been defined within a String. Take a look at the code below to get an idea where I'm coming from: private: void UnZIP(String^ file,String^ source, String^ target) { HUNZIP hz; ZIPENTRY ze; String^ inFile; String^ outFile; String^ fileName; DWORD numitems; inFile = source + file; pin_ptr INFILE = PtrToStringChars(inFile); UnzipOpenFile(&hz,INFILE,0); ze.Index = (DWORD)-1; UnzipGetItem(hz,&ze); numitems = ze.Index; for(ze.Index = 0;ze.Index < numitems + 1;ze.Index++) { UnzipGetItem(hz,&ze); // Convert to a System::String String^ systemstring = gcnew String(ze.Name); fileName = Path::GetFileName(systemstring); delete systemstring; outFile = target + "\\" + fileName; **ze.Name = outFile;** <---- Need to find a way to convert a String to an acceptable type. UnzipItemToFile(hz,ze.Name,&ze); } UnzipClose(hz); } Cheers Fritzables.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups