Volume Lock operation

Hi,
My application changes the contents of the FS writing
beneath it. I am following exact same sequence of
steps as done by the format command. My problem is
that I fail to acquire the lock in certain cases. I
getaccess denied error. I have made sure that no
process has open handles to the volume. I am passing
correct flags during createFile ( as recommended in
the MSDN). Here is the interesting things: I can do
all these steps successfully with simple volume but
any kinds of advanced volumes ( spanned/striped/mirror
volumes created using LDM/VXVM) always result into
failure.

Steps to do:

Open the volume
Lock the volume
// My operation goes here …
Dismount the volume
Unlock the volume
Close the volume handle

Any suggestions will be helpful.

thx


Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com