From d8ca80f84799c58754fa86e75b4058c6a0118705 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 12 May 2017 00:56:26 -0400 Subject: [PATCH] update looputil --- .../Native/LoopUtil.cs | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/MediaBrowser.ServerApplication/Native/LoopUtil.cs b/MediaBrowser.ServerApplication/Native/LoopUtil.cs index 9a96f5518e..7c74712312 100644 --- a/MediaBrowser.ServerApplication/Native/LoopUtil.cs +++ b/MediaBrowser.ServerApplication/Native/LoopUtil.cs @@ -57,10 +57,6 @@ namespace MediaBrowser.ServerApplication.Native } - // Call this API to free the memory returned by the Enumeration API - [DllImport("FirewallAPI.dll")] - internal static extern void NetworkIsolationFreeAppContainers(IntPtr pACs); - // Call this API to load the current list of LoopUtil-enabled AppContainers [DllImport("FirewallAPI.dll")] internal static extern uint NetworkIsolationGetAppContainerConfig(out uint pdwCntACs, out IntPtr appContainerSids); @@ -69,23 +65,13 @@ namespace MediaBrowser.ServerApplication.Native [DllImport("FirewallAPI.dll")] private static extern uint NetworkIsolationSetAppContainerConfig(uint pdwCntACs, SID_AND_ATTRIBUTES[] appContainerSids); - // Use this API to convert a string SID into an actual SID [DllImport("advapi32.dll", SetLastError = true)] internal static extern bool ConvertStringSidToSid(string strSid, out IntPtr pSid); - [DllImport("advapi32", /*CharSet = CharSet.Auto,*/ SetLastError = true)] - static extern bool ConvertSidToStringSid( - [MarshalAs(UnmanagedType.LPArray)] byte[] pSID, - out IntPtr ptrSid); - [DllImport("advapi32", /*CharSet = CharSet.Auto,*/ SetLastError = true)] static extern bool ConvertSidToStringSid(IntPtr pSid, out string strSid); - // Use this API to convert a string reference (e.g. "@{blah.pri?ms-resource://whatever}") into a plain string - [DllImport("shlwapi.dll", CharSet = CharSet.Unicode, ExactSpelling = true)] - internal static extern int SHLoadIndirectString(string pszSource, StringBuilder pszOutBuf); - // Call this API to enumerate all of the AppContainers on the system [DllImport("FirewallAPI.dll")] internal static extern uint NetworkIsolationEnumAppContainers(uint Flags, out uint pdwCntPublicACs, out IntPtr ppACs); @@ -196,7 +182,6 @@ namespace MediaBrowser.ServerApplication.Native { util.SaveLoopbackState(); } - util.SaveLoopbackState(); } private static List PI_NetworkIsolationGetAppContainerConfig() @@ -305,11 +290,5 @@ namespace MediaBrowser.ServerApplication.Native } return count; } - - public void FreeResources() - { - NetworkIsolationFreeAppContainers(_pACs); - } - } }