Calling FwpsFlowRemoveContext0 from DeleteFn RRS feed

  • Question

  • Hi,


    I call FwpsFlowRemoveContext0 in my flow established DeleteFn. This returns STATUS_SUCCESS on Vista platforms without service pack 1 installed. I get STATUS_UNSUCCESSFUL when service pack 1 is installed. I thought calling FwpsFlowRemoveContext0 from my DeleteFn was necessary to undo what occurs when I call FwpsFlowAssociateContext0.


    I have 3 uestions:


    1. What changed in sp1?

    2. I'm guessing that I only need to call FwpsFlowRemoveContext0 when I decide I'm no longer interested in tracking a particular flow; i.e before the flow is actually terminated and my DeleteFn routine is called. Is this true?

    3. Do I need to handle these situations differently with and without the service pack?




    Wednesday, July 16, 2008 8:52 PM


  • You do not need to call FwpsFlowRemoveContext0 if deleteFlow is already being invoked -- simply free your private context associated with the flow are return.


    1. In Vista RTM FwpsFlowRemoveContext0 wasn't referencing the flow properly so context-removal can be racing with connection tear-down, resulting in bugchecks in some cases. In SP1 that's fixed -- since we no longer allow the flow-being-deleted be referenced, the function will return STATUS_UNSUCCESSFUL when invoked from within flowDelete.


    2. Correct.


    3. No. You can have the same logic for RTM and SP1/WS08 in this case.




    Thursday, July 17, 2008 4:20 AM