[delphizip] Re: Updated DLL Source

  • From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Fri, 29 Mar 2002 20:58:03 +1100

I think I found your problem (would not run compiled CBuilder)
in unzip (have not checked zip but probably similar)
 DllMain
    you failed to initialise the dll!
I made it
BOOL WINAPI DllEntryPoint( HINSTANCE hinstDll,
      DWORD fdwRreason,
      LPVOID plvReserved){
        switch ( fdwRreason ) {
                case DLL_PROCESS_ATTACH:        // Allocate a index.
                        if ( (TgbIndex = TlsAlloc()) == 0xFFFFFFFF ) return
0;
                        break;

                case DLL_PROCESS_DETACH:
                        ReleaseGlobalPointer( );      // Make sure, only for
the main thread.
                        if ( TgbIndex ) {
                                TlsFree( TgbIndex );            // Release
the index.
                                TgbIndex = 0;
                        }
        }
  return true;
}
and it works (but I now must go back and restore all my changes trying to
find the problem)
- Russell Peters

----- Original Message -----
From: "Eric Engler" <englere@xxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Friday, March 29, 2002 10:52 AM
Subject: [delphizip] Updated DLL Source


> I have spent several days this week trying to finish
> the VC++ port of the DLLs.
>
> I have fixed the compile errors, but there's still some
> VC++ setting that is apparently not right. Both DLLs
> hang as soon as they're called.
>
> I've posted this code (which includes all related project
> files) in the hope that someone can help me determine what
> isn't right. It's on my web site in file betadllsrc.zip.
>
> This will not be easy - I've compared all the settings to
> the last version I had for VC++ (Delphi Zip 1.40 used VC++
> DLLs) but I can't find the cause of the problem.
>
> This code does not have the new match code posted here
> recently. I was going to get the DLLs working before
> changing the code any more.
>
> Eric
>
>


Other related posts: