update looputil

pull/1154/head
Luke Pulverenti 7 years ago
parent 1991da85af
commit d8ca80f847

@ -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<SID_AND_ATTRIBUTES> PI_NetworkIsolationGetAppContainerConfig()
@ -305,11 +290,5 @@ namespace MediaBrowser.ServerApplication.Native
}
return count;
}
public void FreeResources()
{
NetworkIsolationFreeAppContainers(_pACs);
}
}
}

Loading…
Cancel
Save