Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista file management

Vista - directory locking

Reply
 
Old 07-17-2007   #1 (permalink)
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?


My System SpecsSystem Spec
Old 07-17-2007   #2 (permalink)
Nathan Mates


 
 

Re: directory locking

In article <effPnlCyHHA.536@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
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Setting up a directory and moving a file into that directory from Vista General
Setting up a directory and moving a file into that directory from Vista General
how do I keep powershells current directory and dotnets current directory in sync PowerShell
Temp Directory acts like media directory Vista General
Locking Up Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46