// THIS FILE IS PART OF Vanara PROJECT
// THE Vanara PROJECT IS AN OPENSOURCE LIBRARY LICENSED UNDER THE MIT License.
// COPYRIGHT (C) dahall. ALL RIGHTS RESERVED.
// GITHUB: https://github.com/dahall/Vanara
using System;
namespace Vanara.PInvoke
{
/// Flags that determine the minimum supported client(s) for a P/Invoke function.
[Flags]
public enum PInvokeClient
{
/// No minimum (default).
None = 0,
/// Windows 2000
Windows2000 = 0x1,
/// Windows XP
WindowsXP = 0x3,
/// Windows XP SP2
WindowsXP_SP2 = 0x7,
/// Windows Vista
WindowsVista = 0xF,
/// Windows Vista SP2
WindowsVista_SP2 = 0x1F,
/// Windows 7
Windows7 = 0x3F,
/// Windows 8
Windows8 = 0x7F,
/// Windows 8.1
Windows81 = 0xFF,
/// Windows 10
Windows10 = 0x1FF,
/// Windows 11
Windows11 = 0x2FF
}
/// Captures information about P/Invoke calls.
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Event |
AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method |
AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple = true, Inherited = false)]
public class PInvokeDataAttribute : Attribute
{
/// Initializes a new instance of the class.
/// The header.
public PInvokeDataAttribute(string header) => Header = header;
/// Gets or sets the DLL in which this element is defined.
/// The DLL file name without the path (e.g. "advapi32.dll").
public string Dll { get; set; }
/// Gets or sets the header in which this element is defined.
/// The header file name without the path (e.g. "winuser.h").
public string Header { get; set; }
/// Gets or sets the minimum supported client.
/// The minimum supported client.
public PInvokeClient MinClient { get; set; }
/// Gets or sets the MSDN short identifier.
/// The MSDN short identifier. This is a unique 8-character alphanumeric string used for Microsoft documentation.
public string MSDNShortId { get; set; }
}
}