From 7b6bf545dad2f9db1ea9f9cb9fdcd4bac57a18a2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 5 Sep 2013 10:42:17 -0400 Subject: removed network option from directory picker due to unreliability --- MediaBrowser.Controller/IO/NativeMethods.cs | 118 ---------------------------- 1 file changed, 118 deletions(-) (limited to 'MediaBrowser.Controller/IO/NativeMethods.cs') diff --git a/MediaBrowser.Controller/IO/NativeMethods.cs b/MediaBrowser.Controller/IO/NativeMethods.cs index 5b9bf52a8..97c7dfe87 100644 --- a/MediaBrowser.Controller/IO/NativeMethods.cs +++ b/MediaBrowser.Controller/IO/NativeMethods.cs @@ -12,47 +12,6 @@ namespace MediaBrowser.Controller.IO [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), - SuppressUnmanagedCodeSecurityAttribute] - - 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), - SuppressUnmanagedCodeSecurityAttribute] - - public static extern int NetApiBufferFree( - IntPtr pBuf); - /// /// The MA x_ PATH /// @@ -71,83 +30,6 @@ namespace MediaBrowser.Controller.IO public const uint STGM_READ = 0; } - //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; - } - - /// - /// Class FindFirstFileExFlags - /// - public class FindFirstFileExFlags - { - /// - /// The NONE - /// - public const int NONE = 0; - - /// - /// Searches are case-sensitive.Searches are case-sensitive. - /// - public const int FIND_FIRST_EX_CASE_SENSITIVE = 1; - - /// - /// Uses a larger buffer for directory queries, which can increase performance of the find operation. - /// - public const int FIND_FIRST_EX_LARGE_FETCH = 2; - } - - /// - /// Enum FINDEX_INFO_LEVELS - /// - public enum FINDEX_INFO_LEVELS - { - /// - /// The FindFirstFileEx function retrieves a standard set of attribute information. The data is returned in a WIN32_FIND_DATA structure. - /// - FindExInfoStandard = 0, - - /// - /// The FindFirstFileEx function does not query the short file name, improving overall enumeration speed. The data is returned in a WIN32_FIND_DATA structure, and the cAlternateFileName member is always a NULL string. - /// - FindExInfoBasic = 1 - } - - /// - /// Enum FINDEX_SEARCH_OPS - /// - public enum FINDEX_SEARCH_OPS - { - /// - /// The search for a file that matches a specified file name. - /// The lpSearchFilter parameter of FindFirstFileEx must be NULL when this search operation is used. - /// - FindExSearchNameMatch = 0, - - /// - /// The find ex search limit to directories - /// - FindExSearchLimitToDirectories = 1, - - /// - /// This filtering type is not available. - /// - FindExSearchLimitToDevices = 2 - } - /// /// Struct FILETIME /// -- cgit v1.2.3