/
GeneratedDllImportData.cs
43 lines (40 loc) · 1.24 KB
/
GeneratedDllImportData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.Interop
{
/// <summary>
/// Flags used to indicate members on GeneratedDllImport attribute.
/// </summary>
[Flags]
public enum DllImportMember
{
None = 0,
CharSet = 1 << 0,
EntryPoint = 1 << 1,
ExactSpelling = 1 << 2,
SetLastError = 1 << 3,
All = ~None
}
/// <summary>
/// GeneratedDllImportAttribute data
/// </summary>
/// <remarks>
/// The names of these members map directly to those on the
/// DllImportAttribute and should not be changed.
/// </remarks>
public sealed record GeneratedDllImportData(string ModuleName)
{
/// <summary>
/// Value set by the user on the original declaration.
/// </summary>
public DllImportMember IsUserDefined { get; init; }
public CharSet CharSet { get; init; }
public string? EntryPoint { get; init; }
public bool ExactSpelling { get; init; }
public bool SetLastError { get; init; }
}
}