|
Hello from France,
I was testing SAWZIP DLL and everything wotk fine until I try to open a zip file with this line :
ZIP.OPEN "\\SERVER\TEST\TEST.ZIP"
If I open local files there is no problem.
The path is correct and the file exist and not corupted.
The VB error message is strange because it tells me : "Operation succeeded"
Dont't know what to do.
Can someone help me ?
Thank You
|
|
|
|
|
I'm running w2k, vc++ 6, I have the Microsoft SDK stuff installed.
Firstly there are errors with unclear definitions of the ATL:: symbol in the routines (four of them in various files), which all contain code like the following:
static const IID* arr[] =
{
&IID_IFile,
};
/* commented out, ATL:: below is giving unclear
resolution errors
for (int i=0; i
|
|
|
|
|
Hey.
I'm trying to use SAWZipLib from c#.
I have added the component, and the usage
of the archive looks like fine for me.
I can create new archive, and add the files,
but, at the end of the process, the archive
contains files, with 0 size, and my memory usage
seems to be incorrect. (growed by 200Mbytes).
Maybe a bug of some forgotten fileclose?
How should I correct this problem?
|
|
|
|
|
ok. I have refreshed my version of SAWZip.
Now have an other problem.
If I try to change the name of the files, after compression,(for relative path)
only the first file is correct.
(with full path goes everything all-right)
Maybe the size of the filename string must be the same?
|
|
|
|
|
aha.
The filename must be the same size.
But how can I add the correct filenames with
properties, when '\0' defines the end of the string?
|
|
|
|
|
I've just posted a bug fix of SAWZip on my website. Now you can't change the name of the file anymore when it is added to the archive. Changing the name corrupted the zip file.
In the next major release 3.0 it will be possible to add files with their relative path. Only... I don't know when I can start developing it because I'm to busy with other projects and I have to develop it in my spare time. And because I don't earn money with SAWZip, the other projects have a higher priority.
|
|
|
|
|
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
{
if (::ATL::InlineIsEqualGUID(*arr[i],riid))
return S_OK;
}
Best regards...
|
|
|
|
|
Version (2.6) is released! On my new website : http://users.skynet.be/saw you can download a setup program which installs and registers the activex SAWZip automatically.
The following is changed:
Local date/time bug solved.
An extracted file gets the correct date.
AddDir method added. (add directories and subdirectories)
Check whether the file to compress is not the zip-file itself (in AddDir and AddFileByName).
Setup program for installing.
|
|
|
|
|
Dear Franky Braem,
I am using SawZip.dll and I want add whole directory and subdirectory into a zip file but version 2.0 is not supported. I visit your website but I don't see any where to download version 2.6. Could you send it to me by email or give me a directly link to get it.My email is nttrungyb@gmail.com. Thanks a lot.
|
|
|
|
|
Add a whole directory to zipfile -- much like what you can do with winzip.
Maybe I missed something, but I cannot do this with AddFileByName.
Here's my working directory structure
c:\Files\
a.gif
b.gif
Sub_dir
c.gif
d.gif
If I use
AddFileByName(A2BSTR("c:\\Files\\*"), 9, TRUE, TRUE);
only a.gif and b.gif is added to the zip file.
BTW, there's no path info attached to a.gif, b.gif.
Any help will be appreciated.
(PS, I always encounter runtime errors if I use smarter pointer with the import directive, anyone also get that error?)
---------------------------------------------
#import "SAWZip.tlb" no_namespace named_guid
main() {
USES_CONVERSION;
CoInitialize(NULL);
IClassFactory *pCF;
HRESULT hr;
hr = CoGetClassObject(__uuidof(Archive), CLSCTX_ALL, NULL, IID_IClassFactory, (void **)&pCF);
IArchive *archive;
hr = pCF->CreateInstance(NULL, __uuidof(IArchive), (void **)&archive);
archive->Create(A2BSTR("C:\\test.zip"));
IFiles *files = archive->Files;
files->AddFileByName(A2BSTR("c:\\Files\\*"), 9, TRUE, TRUE);
archive->Close();
archive->Release();
pCF->Release();
CoUninitialize();
}
|
|
|
|
|
OK. After studying the source, I have concluded that indeed this is not supported. However, I have found a easy way to add the whole directory by using another module provided by CP
IFiles *files = archive->Files;
CFileInfoArray cfia;
cfia.AddDir(workdir.c_str(), "*.*", TRUE,
CFileInfoArray::AP_SORTBYNAME | CFileInfoArray::AP_SORTASCENDING, FALSE);
for (int i=0; i< cfia.GetSize(); i++) {
files->AddFileByName(A2BSTR((LPCTSTR)(cfia[i].GetFilePath())), 9, VARIANT_TRUE, VARIANT_TRUE);
}
BTW, I'm not sure if the author aware that "relative path" info is more likely to be what the user wanted instead of the "full path" info.
Will this be included in the next release??
Anyway, nice work !!!
|
|
|
|
|
ufff. this relative-path problem makes me crying.
|
|
|
|
|
The new version (2.6) which you can download from my website contains a new method to add directories and subdirectories. Relative paths are still not possible while adding the files, but you can rename the files after they are added. Relative paths is a functionality for release 3.0.
|
|
|
|
|
Hey!
Thanx a lot!
I choosed the renameing way soon.
It's cool! I like your Zipping!
|
|
|
|
|
I like the SawZip dll, it does a damn good job, but I MAY have found a bug. Adding files to an existing zip doesn't overwrite files with the same name IF fullpaths is true, but it works Ok if paths aren't stored. Is this correct ?
Regards, Nick
|
|
|
|
|
It's possible todo a Self-extracing file (exe) instead on zip file ?
|
|
|
|
|
Hi all,
I am using sawzip.dll in our project,its really a great job,but IFile.Extract() gives abnormal program termination win windows 2000.
is the latest version 2.4 compatible with windows 2000 and windows NT.
Do we need to have necessarily have atl.dll now for windows 95.
regards
Randheer
|
|
|
|
|
When trying this:
//JScript On:
var objzip = new ActiveXObject("SawZip.Archive");
objzip.Open("d:\\temp\\test.zip");
var objFiles = objzip.Files;
var lCount = objFiles.Count;
var i = 1;
for (i = 0; i < lCount; i++)
{
var objFile = objFiles.Item(i);
var objfilename = objFile.Extract("d:\\Buffer\\");
}
objzip.Close();
//JScript Off:
An exception occurs with the builded sources provided in this arcticle. (Win 2000, VC6.0 SP5)
I think API-Function CreateFile(...) don't like to have a complete path, when creating files.
So my modification in STDMETHODIMP CFile::Extract(BSTR aPath, BSTR *pFileName):
target += fname; ----> target = fname;
And it works on my Workstation
|
|
|
|
|
I supose the error isn't in path but some zip archives have the FILE_FLAG_POSIX_SEMANTICS inside, when I compiled the VB sample, I've got an exception in Extract and following the error I've found the extraction path at 'c:\Temp' and the directory is named 'c:\temp' the upper case on 'T' and the FILE_FLAG_POSIX_SEMANTICS make the exception.
To resolve this, in File.cpp at CFile::Read I've added the following line and it works fine:
memcpy(&m_offset,buffer + 42, 4);
//new line comes here
m_externalAttr&=~FILE_FLAG_POSIX_SEMANTICS;
//end
if (memcmp(m_signature, m_gszSignature, 4) != 0)
Salutacions,
Hzi
|
|
|
|
|
I found a small oversight bug (but isn't it the small ones that cause us to go crazy??) which prevented me from being able to perform RemoveDirectory().
In File.cpp there is a FindFirstFile() call. The call returns a handle which needs to be closed or a handle to the directory gets left open. My solution is as follows:
// Code written by Frederic St-Laurent
// Get the file attributes
m_internalAttr = GetFileAttributes( fullFileName.c_str() );
// Get the file last write time
WIN32_FIND_DATA FindData;
HANDLE hFind = FindFirstFile( fullFileName.c_str(), &FindData );
FileTimeToDosDateTime(&FindData.ftLastWriteTime, &m_modDate, &m_modTime);
FindClose(hFind); //~~ Free handle opened by FindFirstFile -- Paul Wolfensberger
...
...
...
Paul
|
|
|
|
|
hi,
I just used the component in VB and it worked , but when i'am trying to use the same in VC++ it is
giving me an error when i try to invoke the Open method.The error i get is -:
First-chance exception in mfc1.exe: 0xC0000005: Access Violation.
Any idea....?
|
|
|
|
|
I use regsvr32.exe to register the SAWzip.dll (Windows NT / Version 1.6.01)
regsvr32 SAWzip.dll => Error 0x80040154
The zlib.dll and SAWzip.dll are installed
The error occurs only under Windows NT !
(Windows 98 is ok !)
What should i do ? .....
|
|
|
|
|
I've tried to register SAWZip(version 2.0) on my PC at work (Windows NT) and had no problems. Are you sure that zlib.dll is in a directory that regsrv32 can find? Another problem can be that you don't have or have an invalid version of ATL.DLL .
|
|
|
|
|
I have checked the SAWzip.dll with depend.exe - the zlib.ddl has been found also in \\winnt\system32
The ata.dll was not on the computer - After install this library - the same eror occurs !
(Its installed vom from a windows 98 computer in the folder \\winnt\system32 ??? )
(On my windows 98 PC the depend.exe founds an error with the msvcp60.dll - after install this library sawzip runs there !)
|
|
|
|
|
Hi,
I have the same error while trying to register SAWZIP (error 80040145)
This is happening on Win98, after a clean install (nothing on it but only video driver)
I copied also ATL.DLL and MSVCL60.DLL, adn the same error.
If I install VS6, the control can be registered.
I'll deeply appreciate any quick help. I'm in the position of deploying an application who use it, and I just discovered this problem (usually it worked on several computers, but on one it fail to register, and this made me to make this clean install test).
If you can give me a quick sollutiuon on e-mail, I'll deeply appreciate this.
Regards,
Bogdan
|
|
|
|