directory locking

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lloyd Dupont

    directory locking

    In our app we have a resource manager which used a temporariy directory in
    the temp folder to store data while the application is runnning.

    To preserve the integrity of our data we need to prevent the deletion of
    this folder while the application is running.

    How could I lock the directory?

    I'm thinking of win32 call like LockFile/LockFileEx, but I'm not sure what
    argument pass to these methods.

    Any tips?

  • Nathan Mates

    #2
    Re: directory locking

    In article <effPnlCyHHA.53 6@TK2MSFTNGP06. phx.gbl>,
    Lloyd Dupont <net.galador@ld wrote:
    >In our app we have a resource manager which used a temporariy
    >directory in the temp folder to store data while the application is
    >runnning.
    >To preserve the integrity of our data we need to prevent the
    >deletion of this folder while the application is running.
    Keep the file(s) in this directory open. Windows won't allow them
    to be deleted when they're open.

    Nathan Mates
    --
    <*Nathan Mates - personal webpage http://www.visi.com/~nathan/
    # Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
    # NOT speaking for Pandemic Studios. "Care not what the neighbors
    # think. What are the facts, and to how many decimal places?" -R.A. Heinlein

    Comment

    Working...