[delphizip] Re: Thread use

  • From: "Eric Engler" <englere@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Tue, 12 Nov 2002 07:54:14 -0500

You can compile the DLLs for use with multithreading. But we couldn't find
anyone who needed to use the DLLs in more than one thread at a time, so we
didn't make the main distribution this way.

Can you modify your program so the DLLs are only used in one thread?

Eric

----- Original Message -----
From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Tuesday, November 12, 2002 6:19 AM
Subject: [delphizip] Re: Thread use


>
> Christian,
>
> Since the ZipMaster DLLs are not thread-safe, you must use critical
> sections. This is irritating but not very tricky.
>
> See the API functions EnterCriticalSection and LeaveCriticalSection.
>
> Basically, all EnterCriticalSection does is lock out all other threads (in
> the process) until LeaveCriticalSection is called. Multitasking of other
> processes (e.g. Explorer, etc.) will be unaffected.
>
> Hope this helps,
>
> -- James Turner
> www.skaro.net
>
>
> ----- Original Message -----
> From: "Cristian Alvarez Planas" <cristian@xxxxxxxxxxxxxx>
> To: <delphizip@xxxxxxxxxxxxx>
> Sent: Tuesday, November 12, 2002 9:15 AM
> Subject: [delphizip] Thread use
>
>
> > Hi
> >
> > I saw some threads about multi-threading problems, but don't understand
> what I have to do to use DelphiZip in a multi-threading application.
> > My application is made in Delphi, and it can run an undetermined number
of
> threads that uses each one a different DelphiZip component. I get random
Zip
> errors due to DLL call collisions. How can I solve that?.
> >
> > Thanks
> >
> > Cristian Alvarez
> >
> >
>
>
>


Other related posts: