處理流程刪除圖說文字
當圖說文字所處理的資料流程停止時,如果圖說文字驅動程式先前與資料流程相關聯,篩選引擎會呼叫圖說文字的 flowDeleteFn 圖說文字函式。 圖說文字的 flowDeleteFn 圖說文字函式會執行與資料流程相關聯的圖說文字驅動程式在資料流程停止之前的任何必要清除。
例如:
// Context structure to be associated with data flows
typedef struct FLOW_CONTEXT_ {
...
} FLOW_CONTEXT, *PFLOW_CONTEXT;
#define FLOW_CONTEXT_POOL_TAG 'fcpt'
// flowDeleteFn callout function
VOID NTAPI
FlowDeleteFn(
IN UINT16 layerId,
IN UINT32 calloutId,
IN UINT64 flowContext
)
{
PFLOW_CONTEXT context;
// Get the flow context structure
context = (PFLOW_CONTEXT)flowContext;
// Cleanup the flow context structure
...
// Free the memory for the flow context structure
ExFreePoolWithTag(
context,
FLOW_CONTEXT_POOL_TAG
);
}
篩選引擎會自動移除資料流程停止時,與資料流程相關聯的圖說文字內容。 因此,不需要從其flowDeleteFn圖說文字函式呼叫FwpsFlowRemoveCoNtext0函式,即可從資料流程中移除內容。