internal static extern Win32Error FwpmEngineOpen0(
     [Optional] string serverName,
     RpcAuthenticationType authnService,
     SEC_WINNT_AUTH_IDENTITY authIdentity,
     FWPM_SESSION0 session,
     out SafeFwpmEngineHandle engineHandle
     );
Пример #2
0
        internal FWPM_SESSION0 ToStruct(DisposableList list)
        {
            FWPM_SESSION0 session = new FWPM_SESSION0();

            session.displayData.name        = Name;
            session.displayData.description = Description;
            session.flags = Flags;
            session.txnWaitTimeoutInMSec = TxnWaitTimeoutInMSec;
            return(session);
        }
Пример #3
0
 internal FirewallSession(FWPM_SESSION0 session)
 {
     SessionKey           = session.sessionKey;
     Name                 = string.IsNullOrEmpty(session.displayData.name) ? SessionKey.ToString() : session.displayData.name;
     Description          = session.displayData.description ?? string.Empty;
     Flags                = session.flags;
     TxnWaitTimeoutInMSec = session.txnWaitTimeoutInMSec;
     ProcessId            = session.processId;
     Sid        = Sid.Parse(session.sid, false).GetResultOrDefault();
     UserName   = session.username ?? string.Empty;
     KernelMode = session.kernelMode;
 }