diff --git a/PInvoke/FirewallApi/IcfTypes.vb b/PInvoke/FirewallApi/IcfTypes.vb index 2b5020b8..323b937d 100644 --- a/PInvoke/FirewallApi/IcfTypes.vb +++ b/PInvoke/FirewallApi/IcfTypes.vb @@ -1,6 +1,4 @@ -Imports System - -Partial Public Module FirewallApi +Partial Public Module FirewallApi ''' The NET_FW_ACTION enumerated type specifies the action for a rule or default setting. @@ -199,7 +197,7 @@ Partial Public Module FirewallApi ''' The NET_FW_PROFILE_TYPE2 enumerated type specifies the type of profile. - + Public Enum NET_FW_PROFILE_TYPE2 ''' diff --git a/PInvoke/FirewallApi/NetFW.Funcs.vb b/PInvoke/FirewallApi/NetFW.Funcs.vb index 7c707ea0..b9fd55b2 100644 --- a/PInvoke/FirewallApi/NetFW.Funcs.vb +++ b/PInvoke/FirewallApi/NetFW.Funcs.vb @@ -1,6 +1,4 @@ -Imports System -Imports System.Collections -Imports System.Runtime.InteropServices +Imports System.Runtime.InteropServices Imports System.Runtime.InteropServices.CustomMarshalers Partial Public Module FirewallApi @@ -10,27 +8,27 @@ Partial Public Module FirewallApi ''' ''' The PAC_CHANGES_CALLBACK_FN function is used to add custom behavior to the app container change notification process. ''' - ''' TOptional context pointer. + ''' Optional context pointer. ''' ''' Call NetworkIsolationRegisterForAppContainerChanges to register this callback function. - Public Delegate Sub PAC_CHANGES_CALLBACK_FN(<[In], Out, [Optional]> ByVal context As IntPtr, <[In]> ByRef pChange As INET_FIREWALL_AC_CHANGE) + Public Delegate Sub PAC_CHANGES_CALLBACK_FN(<[In], Out, [Optional]> ByVal context As System.IntPtr, <[In]> ByRef pChange As INET_FIREWALL_AC_CHANGE) ''' Callback used by . - ''' TOptional context pointer. + ''' Optional context pointer. ''' The WSZ enterprise identifier. ''' The dw error. - Public Delegate Sub PNETISO_EDP_ID_CALLBACK_FN(<[In], Out, [Optional]> ByVal context As IntPtr, <[In], [Optional], MarshalAs(UnmanagedType.LPWStr)> ByVal wszEnterpriseId As String, ByVal dwErr As Win32Error) + Public Delegate Sub PNETISO_EDP_ID_CALLBACK_FN(<[In], Out, [Optional]> ByVal context As System.IntPtr, <[In], [Optional], MarshalAs(UnmanagedType.LPWStr)> ByVal wszEnterpriseId As String, ByVal dwErr As Win32Error) ''' ''' The INET_FIREWALL_AC_CREATION_TYPE enumeration specifies the type of app container creation events for which notifications ''' will be delivered. ''' - + Public Enum INET_FIREWALL_AC_CREATION_TYPE ''' This value is reserved for system use. @@ -73,7 +71,7 @@ Partial Public Module FirewallApi ''' By default, binaries are not returned. NETISO_FLAG_FORCE_COMPUTE_BINARIES must be set in order for these to be returned. ''' - + Public Enum NETISO_FLAG ''' @@ -142,7 +140,7 @@ Partial Public Module FirewallApi ''' If no app containers are installed on the system, ERROR_SUCCESS will still be returned (and ppPublicAppCs will be empty). - Public Function NetworkIsolationEnumAppContainers(ByVal Flags As NETISO_FLAG, ByRef pdwNumPublicAppCs As UInteger, ByRef ppPublicAppCs As IntPtr) As Win32Error + Public Function NetworkIsolationEnumAppContainers(ByVal Flags As NETISO_FLAG, ByRef pdwNumPublicAppCs As UInteger, ByRef ppPublicAppCs As System.IntPtr) As Win32Error End Function ''' The NetworkIsolationEnumerateAppContainerRules function enumerates all of the rules related to app containers. @@ -156,7 +154,7 @@ Partial Public Module FirewallApi ''' - Public Function NetworkIsolationEnumerateAppContainerRules( ByRef newEnum As IEnumerable) As HRESULT + Public Function NetworkIsolationEnumerateAppContainerRules( ByRef newEnum As System.Collections.IEnumerable) As HRESULT End Function ''' @@ -209,7 +207,7 @@ Partial Public Module FirewallApi Public Function NetworkIsolationGetEnterpriseIdAsync( ByVal wszServerName As String, ByVal dwFlags As NETISO_GEID, - <[In], [Optional]> ByVal context As IntPtr, ByVal callback As PNETISO_EDP_ID_CALLBACK_FN, ByRef hOperation As HANDLE) As Win32Error + <[In], [Optional]> ByVal context As System.IntPtr, ByVal callback As PNETISO_EDP_ID_CALLBACK_FN, ByRef hOperation As HANDLE) As Win32Error End Function ''' @@ -245,7 +243,7 @@ Partial Public Module FirewallApi ''' - Public Function NetworkIsolationSetAppContainerConfig(ByVal dwNumPublicAppCs As UInteger, <[In]> ByVal appContainerSids As IntPtr) As Win32Error + Public Function NetworkIsolationSetAppContainerConfig(ByVal dwNumPublicAppCs As UInteger, <[In]> ByVal appContainerSids As System.IntPtr) As Win32Error End Function ''' @@ -315,7 +313,7 @@ Partial Public Module FirewallApi Public count As UInteger ''' Paths to the applications running in the app container. - Public binaries As IntPtr + Public binaries As System.IntPtr End Structure diff --git a/PInvoke/FirewallApi/Vanara.PInvoke.FirewallApi.vbproj b/PInvoke/FirewallApi/Vanara.PInvoke.FirewallApi.vbproj index fadcda6d..d68d9cc4 100644 --- a/PInvoke/FirewallApi/Vanara.PInvoke.FirewallApi.vbproj +++ b/PInvoke/FirewallApi/Vanara.PInvoke.FirewallApi.vbproj @@ -4,6 +4,7 @@ FirewallApi.dll + net45;net48;net6.0-windows;net7.0-windows;netstandard2.0;netcoreapp3.1 PInvoke API (methods, structures and constants) imported from FirewallApi.dll for Windows Firewall with Advanced Security. Vanara.PInvoke.FirewallApi $(AssemblyName)