Jump to content

UnAcing a file through DllCall?


VicTT
 Share

Recommended Posts

For those interested, the full UnACE package is available from WinACE here.

From the docs, it looks like a bunch of work. Can you not use the command line version instead? It would probably require 1-2 lines of code v's 50-100 to create all the DLL calls.

I guess a dumb question, but do have to use ACE? I use the command line version of 7-Zip, which is free. I use WinRAR all the time, but use 7Zip from AutoIt for compatibility.

Edited by Stumpii

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Well I love ACE for the compression ratio..beats everything else I've seen..well..except UHARC on Media files..:whistle:..Anyway..could anyone give me a hand on the DllCall(s)?I'm going to try by myself anyway :dance:..Thanks for the full package..If I succeed, I'm going to post the program, and in the meantime, keep you posted on my progress..if for some reason, anyone here that is interested in helping is using yahoo messenger, give me a PM and we can talk :dance:

Quote

Together we might liveDivided we must fall

 

Link to comment
Share on other sites

Hmm..apparently the .dll (according to the almighty hex viewer) exports only a few functions..The core is a single dll call to extract, the rest is just fluffy error-checking..Stay tuned for the next episode "WTF?"

Main function that assigns all the values after DllInit..

/*-----------------CallAceExtract----------------------------------------*/

INT  CallAceExtract(LPSTR ArchiveName, LPSTR DestinationDir, BOOL DoExcludePath)
{
tACEExtractStruc
          Extract;

  memset(&Extract, 0, sizeof(Extract));       // set all fields to zero

  Extract.Files.SourceDir     = "";          // archive main directory is
                                                 // base dir for FileList
  Extract.Files.FileList       = FileList;     // set FileList
  Extract.Files.ExcludeList = "";            // no files to exclude
  Extract.Files.FullMatch     = 0;            // also extract files
                                                 // partially matching

  Extract.DestinationDir       = DestinationDir; // directory to extract to
  Extract.ExcludePath         = DoExcludePath;  // extract files with path?
  Extract.DecryptPassword     = "";          // no encrypted file expected

  return ACEExtractProc(ArchiveName, &Extract);
}

Dammit..why do ALL of these examples have to be made by the producers themselves?Can't I see some nice code?

Edited by VicTT
Quote

Together we might liveDivided we must fall

 

Link to comment
Share on other sites

//-----------------------------------------------------------------------
      // ACEExtract() parameter structure.
      //-----------------------------------------------------------------------

        typedef struct sACEExtractStruc
        {
          tACEFilesStruc                // specifies files to extract;
                  Files;                // see tACEFilesStruc structure
          LPSTR   DestinationDir;      // directory to extract files to
          BOOL  ExcludePath;          // extract files without path
          LPSTR   DecryptPassword;    // password for decryption (if files
                                        // are encrypted);
                                        // zero-terminated string,
                                        // case-sensitive (maxlen=56)
          CHAR  Reserved[64];        // has to be filled with zeroes
        } tACEExtractStruc,
         *pACEExtractStruc;


      //-----------------------------------------------------------------------
      // ACEExtract() function declaration.
      //-----------------------------------------------------------------------

        INT __stdcall ACEExtract(LPSTR ArchiveName,
                                 pACEExtractStruc Extract);

This defines the structure that is used in the piece of code above..

Source:Unacefnc.h

Quote

Together we might liveDivided we must fall

 

Link to comment
Share on other sites

Well I love ACE for the compression ratio..beats everything else I've seen..well..except UHARC on Media files..:whistle:..Anyway..could anyone give me a hand on the DllCall(s)?I'm going to try by myself anyway :dance:..Thanks for the full package..If I succeed, I'm going to post the program, and in the meantime, keep you posted on my progress..if for some reason, anyone here that is interested in helping is using yahoo messenger, give me a PM and we can talk :dance:

<{POST_SNAPBACK}>

Sorry, I can't help with the DLL calls. Over my head...

9 out of 10 files I tested with 7-Zip compresses better by a large margin. I checked this out after reading your post because I used to use Winace a lot before 7-Zip. 7-Zip is open source too which puts it ahead by an additional margin in my book. See also the table on 7-Zip's homepage for compression ratio comparison.

http://www.7-zip.org/

Edited by anystupidassname

This signature is computer generated, nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#nothing can go wron#.......

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...