[delphizip] Re: Thread use

  • From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Tue, 12 Nov 2002 11:19:24 -0000

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: