Prev: American E-commerce Increasingly Outside the Legal Positions
Next: How to get device key (hardware key) path in kernel mode ?
From: Asaf Shelly on 15 Aug 2010 01:04 Hi All, I know that it is possible to have an automatic synchronization that is based on File Object: http://msdn.microsoft.com/en-us/library/ff544763(VS.85).aspx Can't find anywhere that says how. TIA, Asaf
From: Pavel A. on 15 Aug 2010 21:36 "Asaf Shelly" <MSMediaForum(a)Shelly.co.il> wrote in message news:6D71B953-80CB-43AA-BA78-3955C288394C(a)microsoft.com... > Hi All, > > I know that it is possible to have an automatic synchronization that is > based on File Object: > http://msdn.microsoft.com/en-us/library/ff544763(VS.85).aspx > > Can't find anywhere that says how. > > TIA, > Asaf Automatic synchronization is not _based_ on file objects. Rather, callbacks of a file object, that belongs to certain device object, can be synchronized with other callbacks of that file object, and with other callbacks of that device object. This is implemented by taking a lock in the device object. Call WdfDeviceInitSetFileObjectConfig with WDF_OBJECT_ATTRIBUTES where you specify SynchronizationScope and ExecutionLevel as needed. -- pa
From: Abhishek Ram [MSFT] on 16 Aug 2010 23:06 As mentioned in Pavel's response, automatic synchronization is not based on FileObject. Rather, the callbacks listed in the table on that page are synchronized with respect to each other, either at the device-level or at the queue-level, depending on what you choose. "Asaf Shelly" <MSMediaForum(a)Shelly.co.il> wrote in message news:6D71B953-80CB-43AA-BA78-3955C288394C(a)microsoft.com... > Hi All, > > I know that it is possible to have an automatic synchronization that is > based on File Object: > http://msdn.microsoft.com/en-us/library/ff544763(VS.85).aspx > > Can't find anywhere that says how. > > TIA, > Asaf >
From: Asaf Shelly on 17 Aug 2010 18:43 Hi Pavel and Abhishek, Thanks for the answers. So basically if I need File-Object based synchronization then I should not use Queue based synchronization and instead do this manually, correct? Is there any lock object attached to the File Object? TIA, Asaf "Pavel A." wrote: > "Asaf Shelly" <MSMediaForum(a)Shelly.co.il> wrote in message > news:6D71B953-80CB-43AA-BA78-3955C288394C(a)microsoft.com... > > Hi All, > > > > I know that it is possible to have an automatic synchronization that is > > based on File Object: > > http://msdn.microsoft.com/en-us/library/ff544763(VS.85).aspx > > > > Can't find anywhere that says how. > > > > TIA, > > Asaf > > Automatic synchronization is not _based_ on file objects. > Rather, callbacks of a file object, that belongs to certain device object, > can be synchronized with other callbacks of that file object, and with > other callbacks of that device object. > This is implemented by taking a lock in the device object. > > Call WdfDeviceInitSetFileObjectConfig > with WDF_OBJECT_ATTRIBUTES where you specify SynchronizationScope > and ExecutionLevel as needed. > > -- pa > > > . >
From: Maxim S. Shatskih on 17 Aug 2010 19:03
> Is there any lock object attached to the File Object? Yes, there is, used to synchronize threads on non-overlapped FO and thus to protect ->CurrentByteOffset from races. -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com |