Hi Bengt,
I've just taked a quick look to the source code.
7za.dll works via COM interfaces. It, however, doesn't use standard COM interfaces for creating objects. You can find a small example in the source code. A full example is 7-Zip itself, since 7-Zip works via this dll also.
The dll export a function called CreateObject() that instantiate the interfaces without the need to register them into the system. It's a curious technique I'm still not sure if a good or bad idea :-)
how hard or easy is it to write a wrapper that calls 7za.dll from XBASE ?
With ot4xb.dll and the xppcbk.exe callback compiler it's posible to create the interfaces that 7za need to work, you will need to create the proxi callbacks with xppcbk and store them into the corresponding interfaces with PokeDWord() from ot4xb.dll
The 7zip interfaces are not derived from IDispatch, so you will need to get the function pointers with PeekDWord()
It's posible to make the wrappers using only PRGs, but I think can be a bit complex and maybe will not run as fast as you expect, because some methods you will need to provide will be called so frecuently and Xbase++ will add some extra overhead with every call.
In my opinion will not be a good idea.
The other option is modify the C++ sources from the 7zip console dir and make a Xbase++ dll using the C Api. ot4xbcpp.lib provide a C++ class called TXbClass that allow you to create Xbase++ classes from C++
There are other applications that use 7za.dll such as WinRAR, PowerArchiver and others.
Using C++ smart pointers it's so easy to implement clients for 7za.dll
The other way is to call the command line version: 7za.exe.
Probably the fast and simple way, in the Phil's site you can found a tool to redirect stdout from a child process to a string so you can capture the 7zip.exe output and show it in your app
7z seems to offer things that xbZlib
is still missing, like encryptation. I don't know how good this idea is,
In clipper/fw days I was used DynaZip with good results, and quite simple to use. BTW the zip folders in Windows XP is performed by this engine.
www.innermedia.com
Regards,
Pablo Botella