共用方式為


開啟篩選引擎的會話

回呼驅動程式必須開啟篩選引擎的會話,以執行管理任務,例如將篩選新增至篩選引擎。 呼叫驅動程式會透過呼叫 FwpmEngineOpen0 函式來開啟篩選引擎的會話。 例如:

HANDLE engineHandle;
NTSTATUS status;

// Open a session to the filter engine
status =
 FwpmEngineOpen0(
    NULL,              // The filter engine on the local system
    RPC_C_AUTHN_WINNT, // Use the Windows authentication service
    NULL,              // Use the calling thread's credentials
    NULL,              // There are no session-specific parameters
    &engineHandle      // Pointer to a variable to receive the handle
    );

在圖說驅動程式成功開啟篩選引擎的會話之後,它可以使用傳回的句柄來呼叫其他 Windows 篩選平臺管理功能。