Apertura di una sessione al motore di filtro

Un driver di callout deve aprire una sessione al motore di filtro per eseguire attività di gestione, ad esempio l'aggiunta di filtri al motore di filtro. Un driver di callout apre una sessione al motore di filtro chiamando la funzione FwpmEngineOpen0 . Ad esempio:

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
    );

Dopo che un driver di callout ha aperto correttamente una sessione al motore di filtro, può usare l'handle restituito per chiamare le altre funzioni di gestione della piattaforma di filtro di Windows.