Assume in post-create I attach a stream context (SC1) to a file (F) and take out an extra reference on SC1 for my code for later processing and let the create complete. Now assume all system references to F are released (i.e. all handles are closed and no more file objects exist). Then F is opened again. In my post-create I create SC2 and call FltSetStreamContext() with the FLT_SET_CONTEXT_KEEP_IF_EXISTS flag. Will I receive a STATUS_FLT_CONTEXT_ALREADY_DEFINED (and SC1 as ‘OldContext’) at this point or is it possible that the system will accept SC2, return STATUS_SUCCESS and return NULL in ‘OldContext’? I think I observed the latter. Just wanted to make sure my code isn’t flawed and this is indeed expected/possible.
Thanks,
Michael