[delphizip] Re: Thread use

  • From: "Cristian Alvarez Planas" <cristian@xxxxxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Tue, 12 Nov 2002 14:19:04 +0100

Hi

No, I can't.
My program is a copy program, where you can define groups of files to copy
from one source to another (zipping them) at a determined time and
frequency, is like an automatic backup program.
It uses threads because the user can define the time to start each copy, so
collisions are possible.

I have no C compiler, I can't compile the DLL source code, and If I could I
have no idea about how to do it.

Thanks
 Cristian

----- Original Message -----
From: "Eric Engler" <englere@xxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Tuesday, November 12, 2002 1:54 PM
Subject: [delphizip] Re: Thread use


>
> 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: