[delphizip] Windows 95 Compatibility (2 new fixes!)

  • From: Daniel Marschall <uni@xxxxxxxxxxxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Sun, 26 Sep 2010 21:02:02 +0200

Hello,
I was offline this night, but I have now correctly implemented and verified the 
Win95 compatibility of your DLL code. Even if Win95 does not support UTF8 
natively, it would be still great that V1.90 works with it. And in case, it is 
possible now, since I found nearly all incompatibilities. I am very happy about 
this.

Attached you'll find my final code as compatibility patch for
your DLL.
- Win95Compat.cpp
- Win95Compat.h

All patches to make DelphiZIP Win95 compatible
- (DLL) Needs to get compiled in CB4, CB6 or similar
- (DLL) There are 4 occourences of NextChar() which have to be changed to 
NextCharCompat().
- (DLL) There are 6 occourences of WC_NO_BEST_FIT_CHARS for the function 
WideCharToMultiByte(). Please replace the function with 
WideCharToMultiByteOptionalFlags(), so that WC_NO_BEST_FIT_CHARS gets dropped 
when executing under Win95.
- (DelphiZIP) 2 DrawTextW() fixes from my initial mail.
- (DLL) Currently unknown patch to the DLL to make ImageStream demo work

I have now compiled the DLL in Win95 under BCB4 and can run DelphiZIP in 
Windows 95, 2000 and XP without problems. Great :D

Now, the biggest part of DelphiZip is Win95 compatible. Zipping and unzipping, 
even with passwords works. I also tested ALL demos which were included.


Alas, 2 last things are still not compatible yet:

1. The SFX of DelphiZIP is not Win95 compatible. All labels are invisible and 
errormessages (without readable content) appearing.
2. The ImageStream demo does not work (This is the onliest demo which fails - 
only on Win95). I traced it until the DLL. So, the reason is inside the DLL. 
The line

SuccessCnt := _DLL_Exec(self, CmdRecP, fDLLOperKey);

in ExtExtract() of ZMDllOpr19.pas returns 0. This will be extremely hard to 
find the incompatibility inside the DLL since I do not have any exception or 
hint where the failure lies.


Well... about point (1): Alas, I cannot do that. I would die if I need to 
update a NoVCL code ;-) Also, the SFX itself is not so necessary, since people 
can write their own SFX, like I did.

About point (2): This point is important to me, since it is probably the last 
incompatibility which exists in the DLL. After that we can call DelphiZip 
"Win95 compatible" (except SFX). :-) I will look if I find out any information, 
but I fear that will be too complex for me since I have no clue where the DLL 
behaves different in W95 than on W2K. Maybe you have an idea what could go 
wrong with Stream processing at DLL. 

PS: I have not yet understood how your Verbose/Notify code in the DLL works. I 
had to debug via MessageBoxA()... Is there a possibility to "look inside" the 
DLL while Delphi is debugging? I really need more debugger information to find 
the third Win95 incompatibility bug.


Regards
Daniel Marschall


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream
-- File: Win95Compat.cpp


-- Binary/unsupported file stripped by Ecartis --
-- Type: application/octet-stream
-- File: Win95Compat.h


-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: