From: Asaf Shelly on
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
"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
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
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
> 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