/// <summary> /// Gets Share Result /// </summary> /// <param name="machineName">Machine</param> /// <param name="level">API level</param> /// <param name="buffer">Buffer</param> /// <param name="entriesRead">Entries total read</param> /// <param name="totalEntries">Entries total</param> /// <param name="resumeHandle">Handle</param> /// <returns>Error Code</returns> /// <remarks>http://msdn.microsoft.com/en-us/library/windows/desktop/bb525387(v=vs.85).aspx</remarks> public static int GetShareEnumResult(string machineName, AdminOrNormal level, out IntPtr buffer, out int entriesRead, out int totalEntries, ref int resumeHandle) { return(Win32SafeNativeMethods.NetShareEnum(machineName, (int)level, out buffer, -1, out entriesRead, out totalEntries, ref resumeHandle)); }
/// <summary> /// Gets Share Result /// </summary> /// <param name="machineName">Machine</param> /// <param name="level">API level</param> /// <param name="buffer">Buffer</param> /// <param name="entriesRead">Entries total read</param> /// <param name="totalEntries">Entries total</param> /// <param name="resumeHandle">Handle</param> /// <returns>Error Code</returns> /// <remarks>http://msdn.microsoft.com/en-us/library/windows/desktop/bb525387(v=vs.85).aspx</remarks> public static int GetShareEnumResult(string machineName, AdminOrNormal level, out IntPtr buffer, out int entriesRead, out int totalEntries, ref int resumeHandle) { return Win32SafeNativeMethods.NetShareEnum(machineName, (int)level, out buffer, -1, out entriesRead, out totalEntries, ref resumeHandle); }