FltReleaseContext() for OldContext after FltSetStreamContext()

In the Comments section of the help for FltSetStreamContext I read:

“After calling FltSetStreamContext, the caller must call FltReleaseContext
to decrement the reference count on NewContext, even if the call to
FltSetStreamContext was unsuccessful. If the call was successful, the caller
must also call FltReleaseContext for OldContext if OldContext is not NULL
and does not point to NULL_CONTEXT.”

This omits that FltReleaseContext must be called for OldContext if the call
is unsuccesful with STATUS_FLT_CONTEXT_ALREADY_DEFINED return code and
OlContext is not NULL and does not point to NULL_CONTEXT. My question is,
must FltReleaseContext be called for OldContext when others error codes
apart from STATUS_FLT_CONTEXT_ALREADY_DEFINED are returned?

Thanks.

mK.


STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

Yes, FltReleaseContext must be called if an OldContext value is returned
for any reason. We guarantee that we always set OldContext to NULL (if
present) on error conditions where an OldContext is not returned.

Thank you for pointing this out bug in the documentation. We will fix
this.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Misha Karpin
Sent: Monday, May 03, 2004 8:43 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltReleaseContext() for OldContext after
FltSetStreamContext()

In the Comments section of the help for FltSetStreamContext I read:

“After calling FltSetStreamContext, the caller must call
FltReleaseContext
to decrement the reference count on NewContext, even if the call to
FltSetStreamContext was unsuccessful. If the call was successful, the
caller
must also call FltReleaseContext for OldContext if OldContext is not
NULL
and does not point to NULL_CONTEXT.”

This omits that FltReleaseContext must be called for OldContext if the
call
is unsuccesful with STATUS_FLT_CONTEXT_ALREADY_DEFINED return code and
OlContext is not NULL and does not point to NULL_CONTEXT. My question
is,
must FltReleaseContext be called for OldContext when others error codes
apart from STATUS_FLT_CONTEXT_ALREADY_DEFINED are returned?

Thanks.

mK.


STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com