From 478be44dd6deff328cca51306585779bfba7c535 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 5 Oct 2013 13:13:32 -0400 Subject: create platform-specific network manager implementation --- .../NetworkManagement/NativeMethods.cs | 72 ---------------------- 1 file changed, 72 deletions(-) delete mode 100644 MediaBrowser.Common.Implementations/NetworkManagement/NativeMethods.cs (limited to 'MediaBrowser.Common.Implementations/NetworkManagement/NativeMethods.cs') diff --git a/MediaBrowser.Common.Implementations/NetworkManagement/NativeMethods.cs b/MediaBrowser.Common.Implementations/NetworkManagement/NativeMethods.cs deleted file mode 100644 index 7c8a09493..000000000 --- a/MediaBrowser.Common.Implementations/NetworkManagement/NativeMethods.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Security; - -namespace MediaBrowser.Common.Implementations.NetworkManagement -{ - /// - /// Class NativeMethods - /// - [SuppressUnmanagedCodeSecurity] - public static class NativeMethods - { - //declare the Netapi32 : NetServerEnum method import - /// - /// Nets the server enum. - /// - /// Name of the server. - /// The dw level. - /// The p buf. - /// The dw pref max len. - /// The dw entries read. - /// The dw total entries. - /// Type of the dw server. - /// The domain. - /// The dw resume handle. - /// System.Int32. - [DllImport("Netapi32", CharSet = CharSet.Auto, SetLastError = true), - SuppressUnmanagedCodeSecurity] - - public static extern int NetServerEnum( - string ServerName, // must be null - int dwLevel, - ref IntPtr pBuf, - int dwPrefMaxLen, - out int dwEntriesRead, - out int dwTotalEntries, - int dwServerType, - string domain, // null for login domain - out int dwResumeHandle - ); - - //declare the Netapi32 : NetApiBufferFree method import - /// - /// Nets the API buffer free. - /// - /// The p buf. - /// System.Int32. - [DllImport("Netapi32", SetLastError = true), - SuppressUnmanagedCodeSecurity] - - public static extern int NetApiBufferFree( - IntPtr pBuf); - } - - //create a _SERVER_INFO_100 STRUCTURE - /// - /// Struct _SERVER_INFO_100 - /// - [StructLayout(LayoutKind.Sequential)] - public struct _SERVER_INFO_100 - { - /// - /// The sv100_platform_id - /// - internal int sv100_platform_id; - /// - /// The sv100_name - /// - [MarshalAs(UnmanagedType.LPWStr)] - internal string sv100_name; - } -} -- cgit v1.2.3