From: siddu on 4 Jun 2010 07:46 Hi all, I opened the usermode file in my driver using zwcreatefile with FILE_SHARE_READ and FILE_SHARE_Write access . i mount my file as a virtual volume. Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the fly ). and i also want to set FILE_SHARE_WRITE when ever i want. I need api or file system IOCTL or any other possible way to do it. thanks.
From: Scott Noone on 7 Jun 2010 11:48 > Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the > fly ). > and i also want to set FILE_SHARE_WRITE when ever i want. > > I need api or file system IOCTL or any other possible way to do it. Strange...You need to write a file system filter driver and manage the sharing on the file yourself. There's no way to force the FS to do what you're asking for here. If you tell us what you're trying to accomplish there might be an easier solution for you. -scott -- Scott Noone Consulting Associate OSR Open Systems Resources, Inc. http://www.osronline.com "siddu" <siddu.khed(a)gmail.com> wrote in message news:556A026E-3C50-47CD-BB62-8D4E74F3D137(a)microsoft.com... > Hi all, > > > I opened the usermode file in my driver using zwcreatefile with > FILE_SHARE_READ > and FILE_SHARE_Write access . i mount my file as a virtual volume. > Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the > fly ). > and i also want to set FILE_SHARE_WRITE when ever i want. > > I need api or file system IOCTL or any other possible way to do it. > > thanks. > > > > > > >
From: siddu on 10 Jun 2010 05:08 thanks scott for reply, i have taken sample of filedisk-17 from http://www.acc.umu.se/~bosse/ using this driver i created a file and mounted as disk or volume (eg h: as drive letter) . Now i have written seperate application which sends the IOCTL to the driver in which the driver should set this H: drive in read share mode only, so that it should disable file copying to that drive. thanks a lot. when i reset it user can write to the drive. "Scott Noone" wrote: > > Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the > > fly ). > > and i also want to set FILE_SHARE_WRITE when ever i want. > > > > I need api or file system IOCTL or any other possible way to do it. > > Strange...You need to write a file system filter driver and manage the > sharing on the file yourself. There's no way to force the FS to do what > you're asking for here. > > If you tell us what you're trying to accomplish there might be an easier > solution for you. > > -scott > > -- > Scott Noone > Consulting Associate > OSR Open Systems Resources, Inc. > http://www.osronline.com > > > > > "siddu" <siddu.khed(a)gmail.com> wrote in message > news:556A026E-3C50-47CD-BB62-8D4E74F3D137(a)microsoft.com... > > Hi all, > > > > > > I opened the usermode file in my driver using zwcreatefile with > > FILE_SHARE_READ > > and FILE_SHARE_Write access . i mount my file as a virtual volume. > > Now i want to remove FILE_SHARE_WRITE ShareAccess at run time ( on the > > fly ). > > and i also want to set FILE_SHARE_WRITE when ever i want. > > > > I need api or file system IOCTL or any other possible way to do it. > > > > thanks. > > > > > > > > > > > > > >
|
Pages: 1 Prev: inftest.exe generates 3 errors for winusb.sys Next: DTM Need help deciding which tests to run. |