Hello,
I am writing a virtual device driver for mounting virtual volumes from files.
I started from the ramDisk example, but since then most of the code has changed (reads and writes are done with a worker thread and I can mount multiple volumes)
I still use the symbolic link trick so that windows will mount a file system and show the user a mount point (a drive letter)
I do intend to implement all of MountDev’s IOCTLs (and then there won’t be a need for the symbolic link) but for now it’s not a priority.
I have 100% functionality under XP, everything except for defrag etc as I’m not registered with mount dev, and this OK.
However under 7 I get the most peculiar bug, I can mount and format,copy files into/from my volume BUT I can’t rename or delete!
This is even weirder as I can say create a file with 1 meg of data and then open it and set its size to 0 kb, I simply can’t delete/rename it.
Has anyone seen windows behave in such an odd way?
(P.S. I am aware of the wonders of OSR’s Virtual Storport Miniport, but for reasons I can’t get into it was decided to go the path of the WDF driver)
Thanks in advance.
You need to provide more information.
How do you implement your driver? Where do you register it?
Igor Sharovar
Hi,
sorry for the delay…
the driver is a based on ramdisk (initially) but was changed so that:
- it’s not PnP, similar to the nopnp ddk example
- the way to create a device is no longer through the registry but through requests from user mode (ioctls) that create new instances.
- reads and writes are handled using a queue and a worker thread.
- after the instance is alive I create a symlink from it to \dosdevices\x:
when attempting to rename anything in 7 i get
“you need permission to perform this action You require permission for Administrator to make changes to this file”
Thanks
hope that helps
You likely need to change permissions to access to yours files. Click the right button of mouse on your file, choose Property/Security and modify permission in a group which you want to change.
Igor Sharovar
Hi, thanks for responding.
I’d try that, but this also happens on FAT formatted volumes that don’t have these kinds of security concerns.
Also on NTFS drives permissions look OK.
hjgi
> when attempting to rename anything in 7 i get
“you need permission to perform this action You require permission for Administrator to make changes to this file”
What about an ACL on your device object?
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
I tried:
SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RW_RES_R ,
SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RWX_RES_RWX ,
SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_A
none helped, or even seemed to make any difference.
You don’t specify the factors involved in the decision, but maybe in hindsight a miniport was the better choice. You don’t need to implement any version sensitive, undocumented, or non-obvious code in a miniport for it to work right. There are no IOCTLs at all. The ramdisk sample is unfortunate since its existence causes people to select it and have a sub optimal solution. Just about anytime you need to create a storage device, a miniport is going to be the best, highest quality approach.
I do agree with, but in this was decided outside of my scope. So for now I have to try and make this work as best as possible.
So does anyone have any idea what I could be missing here?
Hi,
Well for posterity’s sake I?ll give the solution.
It seems that SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RWX_RES_RWX is not enough,
After giving it:
“D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;WD)(A;;GA;;;RC)”
Everything works as expected…
Thanks anyway