Hi,
i read "Delete_File" Sample code by microsoft
And I have a some issue
what is mean in-flight change ?(I still do not understand )
microsoft/Windows-driver-samples
// Race detection logic. The NumOps field in the StreamContext
// counts the number of in-flight changes to delete disposition
// on the stream.
//
// If there's already some operations in flight, don't bother
// doing postop. Since there will be no postop, this value won't
// be decremented, staying forever 2 or more, which is one of
// the conditions for checking deletion at post-cleanup.
//
race = (InterlockedIncrement(&streamContext->NumOps) > 1);
if (!race) {
//
// This is the only operation in flight, so do a postop on
// it because the final outcome of the delete disposition
// state of the stream is deterministic.
//
*CompletionContext = (PVOID)streamContext;
return FLT_PREOP_SYNCHRONIZE;
i read "Delete_File" Sample code by microsoft
And I have a some issue
what is mean in-flight change ?(I still do not understand )
microsoft/Windows-driver-samples
// Race detection logic. The NumOps field in the StreamContext
// counts the number of in-flight changes to delete disposition
// on the stream.
//
// If there's already some operations in flight, don't bother
// doing postop. Since there will be no postop, this value won't
// be decremented, staying forever 2 or more, which is one of
// the conditions for checking deletion at post-cleanup.
//
race = (InterlockedIncrement(&streamContext->NumOps) > 1);
if (!race) {
//
// This is the only operation in flight, so do a postop on
// it because the final outcome of the delete disposition
// state of the stream is deterministic.
//
*CompletionContext = (PVOID)streamContext;
return FLT_PREOP_SYNCHRONIZE;