Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

ResourceUsage.cs 3.3 KiB

7 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* Copyright (C) 2008-2016 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov
  2. *
  3. * Permission is hereby granted, free of charge, to any person obtaining a copy
  4. * of this software and associated documentation files (the "Software"), to deal
  5. * in the Software without restriction, including without limitation the rights
  6. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. * copies of the Software, and to permit persons to whom the Software is
  8. * furnished to do so, subject to the following conditions:
  9. *
  10. * The above copyright notice and this permission notice shall be included in
  11. * all copies or substantial portions of the Software.
  12. *
  13. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. * THE SOFTWARE.
  20. */
  21. using System;
  22. namespace Alphaleonis.Win32.Network
  23. {
  24. internal static partial class NativeMethods
  25. {
  26. /// <summary>NETRESOURCE structure.
  27. /// <para>ResourceUsage: A set of bit flags describing how the resource can be used.</para>
  28. /// </summary>
  29. /// <remarks>Note that this member can be specified only if the <see cref="ResourceScope"/> member is equal to <see cref="ResourceScope.GlobalNet"/>.</remarks>
  30. [Flags]
  31. internal enum ResourceUsage
  32. {
  33. /// <summary>RESOURCEUSAGE_CONNECTABLE
  34. /// <para>The resource is a connectable resource.</para>
  35. /// <para>The name pointed to by the lpRemoteName member can be passed to the WNetAddConnection function to make a network connection.</para>
  36. /// </summary>
  37. Connectable = 1,
  38. /// <summary>RESOURCEUSAGE_CONTAINER
  39. /// <para>The resource is a container resource.</para>
  40. /// <para>The name pointed to by the lpRemoteName member can be passed to the WNetAddConnection function to make a network connection.</para>
  41. /// </summary>
  42. Container = 2,
  43. /// <summary>RESOURCEUSAGE_NOLOCALDEVICE
  44. /// <para>The resource is not a local device.</para>
  45. /// </summary>
  46. NoLocalDevice = 4,
  47. /// <summary>RESOURCEUSAGE_SIBLING
  48. /// <para>The resource is a sibling.</para>
  49. /// <para>This value is not used by Windows.</para>
  50. /// </summary>
  51. Sibling = 8,
  52. /// <summary>RESOURCEUSAGE_ATTACHED
  53. /// <para>The resource must be attached.</para>
  54. /// <para>This value specifies that a function to enumerate this resource should fail</para>
  55. /// <para>if the caller is not authenticated, even if the network permits enumeration without authentication.</para>
  56. /// </summary>
  57. Attached = 16,
  58. /// <summary>RESOURCEUSAGE_ALL
  59. /// <para>Setting this value is equivalent to setting: <see cref="ResourceUsage.Connectable"/>, <see cref="ResourceUsage.Container"/>, and <see cref="ResourceUsage.Attached"/>.</para>
  60. /// </summary>
  61. All = (Connectable | Container | Attached)
  62. }
  63. }
  64. }