[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Mayayana

9/26/2010 4:46:00 AM

I've just finished with a full wrapper for cabinet.dll.

http://www.jsware.net/jsware/test/VB...

The first code had FDI functions. (extraction) This
one now also has FCI. (Creating CABs) It wraps
the CDECL calls from cabinet.dll using Paul Caton's
class. Any reports from testing would be appreciated.
I'm running on XP SP3. I have no reason to expect
any problems on any Windows version post-95 (or
maybe post-3.1), but I am curious about an oddity:

There's a structure for creating CABs called CCAB.
Microsoft's docs do not agree with FCI.H on what's
in that structure. In my tests, FCI.H is right and
Microsoft is wrong. Using the MS structure results
in an error because one of the structure members
is missing. I'm assuming the MS docs are wrong, but
I suppose it's possible that MS has broken compatibility
with Vista.


55 Answers

(nobody)

9/26/2010 11:57:00 AM

0

"Mayayana" <mayayana@invalid.nospam> wrote in message
news:i7mj2v$nvp$1@news.eternal-september.org...
> I've just finished with a full wrapper for cabinet.dll.

I tested it on Windows 2000 Server(No SP), and on XP+SP2(With DEP enabled in
both BIOS and software), and it works correctly. I didn't have to add the
EXE to DEP exception list. I tested all buttons. The CAB file I used was
Msvbvm60.cab from SP5.

However, in both Vista(No SP) and Windows 2008 Server(SP1), the software
gets the number of files correctly and without problems, but after
extracting all files, it crashes. I haven't tested creating CAB files in
these OS'es.

I suppose you could download Virtual PC 2007 and Windows 2008 Server trial
version and test it. You need to have more than 512 MB of RAM, and at least
6 GB free disk space to try it. I might install VC6 on it and try to find
the reason for the crash, but I may not have the time.



(nobody)

9/26/2010 12:41:00 PM

0

"Mayayana" <mayayana@invalid.nospam> wrote in message
news:i7mj2v$nvp$1@news.eternal-september.org...
> but I am curious about an oddity:
>
> There's a structure for creating CABs called CCAB.
> Microsoft's docs do not agree with FCI.H on what's
> in that structure. In my tests, FCI.H is right and
> Microsoft is wrong. Using the MS structure results
> in an error because one of the structure members
> is missing. I'm assuming the MS docs are wrong, but
> I suppose it's possible that MS has broken compatibility
> with Vista.

I commented out that member(fFailOnIncompressible), and ran the EXE on
XP+SP2, it extracted the files correctly(did binary compare), but creating
CAB file failed with error 91: Object variable or With block variable not
set. So I tried to run it from the IDE, and when I click "Create CAB", the
IDE crashes.

I tried the same EXE(with the extra member commented out), and it gets the
CAB files count correctly, but it crashes when I click "Extract all CAB
files".

cabinet.dll File version:

2000 Server(No SP): 5.0.2147.1
XP+SP2: 5.1.2600.2180
Vista(No SP): 6.0.6000.16386
2008 Server: 6.0.6001.18000


Mayayana

9/26/2010 1:05:00 PM

0

Thanks. That's a nicely detailed analysis.

>
However, in both Vista(No SP) and Windows 2008 Server(SP1), the software
gets the number of files correctly and without problems, but after
extracting all files, it crashes. I haven't tested creating CAB files in
these OS'es.
>

I'll have to find a way to test that. Leo said
it worked fine for him on Win7, but that's the
only other feedback so far. I thought the
extraction was all set. There is one issue:
If the handle hFDI is set to 0 after FDIDestroy
it will crash -- only in the IDE. It seems that cabinet.dll
doesn't let go of it right off. But the current code
is only cleaning up at program close.

| I commented out that member(fFailOnIncompressible), and ran the EXE on
| XP+SP2, it extracted the files correctly(did binary compare), but creating
| CAB file failed with error 91: Object variable or With block variable not
| set. So I tried to run it from the IDE, and when I click "Create CAB", the
| IDE crashes.
|

That makes sense. The extraction has no connection
with the CCAB structure.

| I tried the same EXE(with the extra member commented out), and it gets the
| CAB files count correctly, but it crashes when I click "Extract all CAB
| files".
|

That's also on XP? Commenting out the extra member
has no connection with the extraction/cab file count.
It would have to be something else causing that. The
crash (or operation failure) would only come from writing
to the CCAB szCab or szCabPath members.




(nobody)

9/26/2010 1:13:00 PM

0

"Mayayana" <mayayana@invalid.nospam> wrote in message
news:i7ngb7$kvr$1@news.eternal-september.org...
> | I tried the same EXE(with the extra member commented out), and it gets
> the
> | CAB files count correctly, but it crashes when I click "Extract all CAB
> | files".
> |
>
> That's also on XP? Commenting out the extra member
> has no connection with the extraction/cab file count.
> It would have to be something else causing that. The
> crash (or operation failure) would only come from writing
> to the CCAB szCab or szCabPath members.

Sorry, that was on Vista.


Mayayana

9/26/2010 2:14:00 PM

0

| > | I tried the same EXE(with the extra member commented out), and it gets
| > the
| > | CAB files count correctly, but it crashes when I click "Extract all
CAB
| > | files".
| > |
| >
| > That's also on XP? Commenting out the extra member
| > has no connection with the extraction/cab file count.
| > It would have to be something else causing that. The
| > crash (or operation failure) would only come from writing
| > to the CCAB szCab or szCabPath members.
|
| Sorry, that was on Vista.
|

This is confusing. For me everything is fine on XP
as long as I comment out the exta member. I was
just able to test it on Win7 and all the extraction-
related functions were fine. But creation crashes. I
tried commenting out the extra member and it still
crashes. In the former case it creates a CAB file,
but it's empty. In the latter case there's no CAB
at all.


Mayayana

9/26/2010 4:11:00 PM

0

Testing on 7:

Creating a CAB crashes in FCIFlushCabinet.
It crashes after having done a number of file
operations and then opening the new CAB file
for writing. The opening succeeds, returning
a file handle, but the whole thing crashes at
that point. I can't see a reason why.

I found a report of something similar here:

http://social.msdn.microsoft.com/forums/en-US/windowsgeneraldevelopmentissues/thread/1665c708-3d87-4dfc-8733-e3...

But it's .Net and the posters seem to be chasing
ghosts with their ideas of what the problem is.
But one description seems to perfectly match
what I describe above.

I'm just using a simple path of c:\test1\test1.cab.
The code correctly creates that file, even. It just
fails to write the compressed data to it. Strange.
And it works fine on XP.


Norm

9/26/2010 4:19:00 PM

0

Mayayana explained on 9/26/2010 :
> Testing on 7:
>
> Creating a CAB crashes in FCIFlushCabinet.
> It crashes after having done a number of file
> operations and then opening the new CAB file
> for writing. The opening succeeds, returning
> a file handle, but the whole thing crashes at
> that point. I can't see a reason why.
>
> I found a report of something similar here:
>
> http://social.msdn.microsoft.com/forums/en-US/windowsgeneraldevelopmentissues/thread/1665c708-3d87-4dfc-8733-e3...
>
> But it's .Net and the posters seem to be chasing
> ghosts with their ideas of what the problem is.
> But one description seems to perfectly match
> what I describe above.
>
> I'm just using a simple path of c:\test1\test1.cab.
> The code correctly creates that file, even. It just
> fails to write the compressed data to it. Strange.
> And it works fine on XP.

Mayayana,

I probably should not comment, since I really don't know enough about
what you are doing, even to test the program. The only thing that
jumped out at me was your test path. That path may not work with Vista
and Win7 as they usually restrict writing to the root path.

Norm


(nobody)

9/26/2010 5:03:00 PM

0

"Norm" <NormF4@Spoof.com> wrote in message
news:i7nrpb$cb9$1@news.eternal-september.org...
> I probably should not comment, since I really don't know enough about what
> you are doing, even to test the program. The only thing that jumped out at
> me was your test path. That path may not work with Vista and Win7 as they
> usually restrict writing to the root path.

I just tried it on Vista with "Run as Administrator" and it crashes when
extracting all files.


Mayayana

9/26/2010 5:11:00 PM

0

| I just tried it on Vista with "Run as Administrator" and it crashes when
| extracting all files.
|

I'm not seeing any crashes with extraction.
So far it's just a problem with creation. And
I'm able to write the file. It just doesn't get
finished.


Tom Shelton

9/26/2010 5:26:00 PM

0

It happens that Mayayana formulated :
> Testing on 7:
>
> Creating a CAB crashes in FCIFlushCabinet.
> It crashes after having done a number of file
> operations and then opening the new CAB file
> for writing. The opening succeeds, returning
> a file handle, but the whole thing crashes at
> that point. I can't see a reason why.
>
> I found a report of something similar here:
>
> http://social.msdn.microsoft.com/forums/en-US/windowsgeneraldevelopmentissues/thread/1665c708-3d87-4dfc-8733-e3...
>
> But it's .Net and the posters seem to be chasing
> ghosts with their ideas of what the problem is.
> But one description seems to perfectly match
> what I describe above.
>
> I'm just using a simple path of c:\test1\test1.cab.
> The code correctly creates that file, even. It just
> fails to write the compressed data to it. Strange.
> And it works fine on XP.

Are you running this on 32-bit or 64-bit version of 7?

--
Tom Shelton