Scrape constants from headers and merge results with enum json file scraped from docs

This commit is contained in:
Steve Otteson 2021-03-09 12:48:15 -08:00
Родитель d32d7f4413
Коммит 0ea8861f41
43 изменённых файлов: 45878 добавлений и 21262 удалений

Просмотреть файл

@ -203,3 +203,4 @@ Windows.Win32.AllJoyn,alljoyn_sessionlistener,AllJoynHandle
Windows.Win32.AllJoyn,alljoyn_sessionopts,AllJoynHandle
Windows.Win32.AllJoyn,alljoyn_sessionportlistener,AllJoynHandle
Windows.Win32.SystemServices,HPCON,IntPtr,ClosePseudoConsole
Windows.Win32.Controls,HTREEITEM,IntPtr

Просмотреть файл

@ -0,0 +1,21 @@
using System;
using System.Runtime.InteropServices;
using Windows.Win32.Interop;
namespace Windows.Win32.Controls
{
public static unsafe partial class Apis
{
[NativeTypeName("HTREEITEM")]
public const int TVI_ROOT = -0x10000;
[NativeTypeName("HTREEITEM")]
public const int TVI_FIRST = -0x0FFFF;
[NativeTypeName("HTREEITEM")]
public const int TVI_LAST = -0x0FFFE;
[NativeTypeName("HTREEITEM")]
public const int TVI_SORT = -0x0FFFD;
}
}

Просмотреть файл

@ -7,38 +7,6 @@ namespace Windows.Win32.Direct3D11
{
public static unsafe partial class Apis
{
public const uint D3D11_SDK_VERSION = 7;
public const int D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION = 2048;
public const int D3D_FL9_3_REQ_TEXTURE1D_U_DIMENSION = 4096;
public const int D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION = 2048;
public const int D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION = 4096;
public const int D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION = 512;
public const int D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION = 4096;
public const int D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 256;
public const int D3D_FL9_1_DEFAULT_MAX_ANISOTROPY = 2;
public const int D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT = 65535;
public const int D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT = 1048575;
public const int D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT = 1;
public const int D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT = 4;
public const int D3D_FL9_1_MAX_TEXTURE_REPEAT = 128;
public const int D3D_FL9_2_MAX_TEXTURE_REPEAT = 2048;
public const int D3D_FL9_3_MAX_TEXTURE_REPEAT = 8192;
public static readonly Guid WKPDID_D3DDebugObjectName = new Guid(0x429B8C22, 0x9188, 0x4B0C, 0x87, 0x42, 0xAC, 0xB0, 0xBF, 0x85, 0xC2, 0x00);
public static readonly Guid WKPDID_D3DDebugObjectNameW = new Guid(0x4CCA5FD8, 0x921F, 0x42C8, 0x85, 0x66, 0x70, 0xCA, 0xF2, 0xA9, 0xB7, 0x41);
@ -50,13 +18,5 @@ namespace Windows.Win32.Direct3D11
public static readonly Guid D3D_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE = new Guid(0x4C0F29E3, 0x3F5F, 0x4D35, 0x84, 0xC9, 0xBC, 0x09, 0x83, 0xB6, 0x2C, 0x28);
public static readonly Guid IID_ID3DBlob = new Guid(0x8BA5FB08, 0x5195, 0x40E2, 0xAC, 0x58, 0x0D, 0x98, 0x9C, 0x3A, 0x01, 0x02);
public const int D3D_COMPONENT_MASK_X = 1;
public const int D3D_COMPONENT_MASK_Y = 2;
public const int D3D_COMPONENT_MASK_Z = 4;
public const int D3D_COMPONENT_MASK_W = 8;
}
}

Просмотреть файл

@ -11,941 +11,8 @@ namespace Windows.Win32.Direct3D12
{
public static unsafe partial class Apis
{
public const uint D3D12_16BIT_INDEX_STRIP_CUT_VALUE = 0xFFFF;
public const uint D3D12_32BIT_INDEX_STRIP_CUT_VALUE = 0xFFFFFFFF;
public const uint D3D12_8BIT_INDEX_STRIP_CUT_VALUE = 0xFF;
public const uint D3D12_APPEND_ALIGNED_ELEMENT = 0xFFFFFFFF;
public const uint D3D12_ARRAY_AXIS_ADDRESS_RANGE_BIT_COUNT = 9;
public const uint D3D12_CLIP_OR_CULL_DISTANCE_COUNT = 8;
public const uint D3D12_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT = 2;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT = 14;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENTS = 4;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT = 15;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT = 16;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_COUNT = 15;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
public const uint D3D12_COMMONSHADER_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
public const uint D3D12_COMMONSHADER_FLOWCONTROL_NESTING_LIMIT = 64;
public const uint D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COMPONENTS = 4;
public const uint D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_COUNT = 1;
public const uint D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READS_PER_INST = 1;
public const uint D3D12_COMMONSHADER_IMMEDIATE_CONSTANT_BUFFER_REGISTER_READ_PORTS = 1;
public const uint D3D12_COMMONSHADER_IMMEDIATE_VALUE_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COMPONENTS = 1;
public const uint D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_COUNT = 128;
public const uint D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READS_PER_INST = 1;
public const uint D3D12_COMMONSHADER_INPUT_RESOURCE_REGISTER_READ_PORTS = 1;
public const uint D3D12_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT = 128;
public const uint D3D12_COMMONSHADER_SAMPLER_REGISTER_COMPONENTS = 1;
public const uint D3D12_COMMONSHADER_SAMPLER_REGISTER_COUNT = 16;
public const uint D3D12_COMMONSHADER_SAMPLER_REGISTER_READS_PER_INST = 1;
public const uint D3D12_COMMONSHADER_SAMPLER_REGISTER_READ_PORTS = 1;
public const uint D3D12_COMMONSHADER_SAMPLER_SLOT_COUNT = 16;
public const uint D3D12_COMMONSHADER_SUBROUTINE_NESTING_LIMIT = 32;
public const uint D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENTS = 4;
public const uint D3D12_COMMONSHADER_TEMP_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_COMMONSHADER_TEMP_REGISTER_COUNT = 4096;
public const uint D3D12_COMMONSHADER_TEMP_REGISTER_READS_PER_INST = 3;
public const uint D3D12_COMMONSHADER_TEMP_REGISTER_READ_PORTS = 3;
public const uint D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MAX = 10;
public const int D3D12_COMMONSHADER_TEXCOORD_RANGE_REDUCTION_MIN = -10;
public const int D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_NEGATIVE = -8;
public const uint D3D12_COMMONSHADER_TEXEL_OFFSET_MAX_POSITIVE = 7;
public const uint D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT = 256;
public const uint D3D12_CS_4_X_BUCKET00_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 256;
public const uint D3D12_CS_4_X_BUCKET00_MAX_NUM_THREADS_PER_GROUP = 64;
public const uint D3D12_CS_4_X_BUCKET01_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 240;
public const uint D3D12_CS_4_X_BUCKET01_MAX_NUM_THREADS_PER_GROUP = 68;
public const uint D3D12_CS_4_X_BUCKET02_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 224;
public const uint D3D12_CS_4_X_BUCKET02_MAX_NUM_THREADS_PER_GROUP = 72;
public const uint D3D12_CS_4_X_BUCKET03_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 208;
public const uint D3D12_CS_4_X_BUCKET03_MAX_NUM_THREADS_PER_GROUP = 76;
public const uint D3D12_CS_4_X_BUCKET04_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 192;
public const uint D3D12_CS_4_X_BUCKET04_MAX_NUM_THREADS_PER_GROUP = 84;
public const uint D3D12_CS_4_X_BUCKET05_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 176;
public const uint D3D12_CS_4_X_BUCKET05_MAX_NUM_THREADS_PER_GROUP = 92;
public const uint D3D12_CS_4_X_BUCKET06_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 160;
public const uint D3D12_CS_4_X_BUCKET06_MAX_NUM_THREADS_PER_GROUP = 100;
public const uint D3D12_CS_4_X_BUCKET07_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 144;
public const uint D3D12_CS_4_X_BUCKET07_MAX_NUM_THREADS_PER_GROUP = 112;
public const uint D3D12_CS_4_X_BUCKET08_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 128;
public const uint D3D12_CS_4_X_BUCKET08_MAX_NUM_THREADS_PER_GROUP = 128;
public const uint D3D12_CS_4_X_BUCKET09_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 112;
public const uint D3D12_CS_4_X_BUCKET09_MAX_NUM_THREADS_PER_GROUP = 144;
public const uint D3D12_CS_4_X_BUCKET10_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 96;
public const uint D3D12_CS_4_X_BUCKET10_MAX_NUM_THREADS_PER_GROUP = 168;
public const uint D3D12_CS_4_X_BUCKET11_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 80;
public const uint D3D12_CS_4_X_BUCKET11_MAX_NUM_THREADS_PER_GROUP = 204;
public const uint D3D12_CS_4_X_BUCKET12_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 64;
public const uint D3D12_CS_4_X_BUCKET12_MAX_NUM_THREADS_PER_GROUP = 256;
public const uint D3D12_CS_4_X_BUCKET13_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 48;
public const uint D3D12_CS_4_X_BUCKET13_MAX_NUM_THREADS_PER_GROUP = 340;
public const uint D3D12_CS_4_X_BUCKET14_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 32;
public const uint D3D12_CS_4_X_BUCKET14_MAX_NUM_THREADS_PER_GROUP = 512;
public const uint D3D12_CS_4_X_BUCKET15_MAX_BYTES_TGSM_WRITABLE_PER_THREAD = 16;
public const uint D3D12_CS_4_X_BUCKET15_MAX_NUM_THREADS_PER_GROUP = 768;
public const uint D3D12_CS_4_X_DISPATCH_MAX_THREAD_GROUPS_IN_Z_DIMENSION = 1;
public const uint D3D12_CS_4_X_RAW_UAV_BYTE_ALIGNMENT = 256;
public const uint D3D12_CS_4_X_THREAD_GROUP_MAX_THREADS_PER_GROUP = 768;
public const uint D3D12_CS_4_X_THREAD_GROUP_MAX_X = 768;
public const uint D3D12_CS_4_X_THREAD_GROUP_MAX_Y = 768;
public const uint D3D12_CS_4_X_UAV_REGISTER_COUNT = 1;
public const uint D3D12_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION = 65535;
public const uint D3D12_CS_TGSM_REGISTER_COUNT = 8192;
public const uint D3D12_CS_TGSM_REGISTER_READS_PER_INST = 1;
public const uint D3D12_CS_TGSM_RESOURCE_REGISTER_COMPONENTS = 1;
public const uint D3D12_CS_TGSM_RESOURCE_REGISTER_READ_PORTS = 1;
public const uint D3D12_CS_THREADGROUPID_REGISTER_COMPONENTS = 3;
public const uint D3D12_CS_THREADGROUPID_REGISTER_COUNT = 1;
public const uint D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COMPONENTS = 1;
public const uint D3D12_CS_THREADIDINGROUPFLATTENED_REGISTER_COUNT = 1;
public const uint D3D12_CS_THREADIDINGROUP_REGISTER_COMPONENTS = 3;
public const uint D3D12_CS_THREADIDINGROUP_REGISTER_COUNT = 1;
public const uint D3D12_CS_THREADID_REGISTER_COMPONENTS = 3;
public const uint D3D12_CS_THREADID_REGISTER_COUNT = 1;
public const uint D3D12_CS_THREAD_GROUP_MAX_THREADS_PER_GROUP = 1024;
public const uint D3D12_CS_THREAD_GROUP_MAX_X = 1024;
public const uint D3D12_CS_THREAD_GROUP_MAX_Y = 1024;
public const uint D3D12_CS_THREAD_GROUP_MAX_Z = 64;
public const uint D3D12_CS_THREAD_GROUP_MIN_X = 1;
public const uint D3D12_CS_THREAD_GROUP_MIN_Y = 1;
public const uint D3D12_CS_THREAD_GROUP_MIN_Z = 1;
public const uint D3D12_CS_THREAD_LOCAL_TEMP_REGISTER_POOL = 16384;
public const float D3D12_DEFAULT_BLEND_FACTOR_ALPHA = 1.0f;
public const float D3D12_DEFAULT_BLEND_FACTOR_BLUE = 1.0f;
public const float D3D12_DEFAULT_BLEND_FACTOR_GREEN = 1.0f;
public const float D3D12_DEFAULT_BLEND_FACTOR_RED = 1.0f;
public const float D3D12_DEFAULT_BORDER_COLOR_COMPONENT = 0.0f;
public const int D3D12_DEFAULT_DEPTH_BIAS = 0;
public const float D3D12_DEFAULT_DEPTH_BIAS_CLAMP = 0.0f;
public const uint D3D12_DEFAULT_MAX_ANISOTROPY = 16;
public const float D3D12_DEFAULT_MIP_LOD_BIAS = 0.0f;
public const uint D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 4194304;
public const uint D3D12_DEFAULT_RENDER_TARGET_ARRAY_INDEX = 0;
public const uint D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT = 65536;
public const uint D3D12_DEFAULT_SAMPLE_MASK = 0xFFFFFFFF;
public const uint D3D12_DEFAULT_SCISSOR_ENDX = 0;
public const uint D3D12_DEFAULT_SCISSOR_ENDY = 0;
public const uint D3D12_DEFAULT_SCISSOR_STARTX = 0;
public const uint D3D12_DEFAULT_SCISSOR_STARTY = 0;
public const float D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS = 0.0f;
public const uint D3D12_DEFAULT_STENCIL_READ_MASK = 0xFF;
public const uint D3D12_DEFAULT_STENCIL_REFERENCE = 0;
public const uint D3D12_DEFAULT_STENCIL_WRITE_MASK = 0xFF;
public const uint D3D12_DEFAULT_VIEWPORT_AND_SCISSORRECT_INDEX = 0;
public const uint D3D12_DEFAULT_VIEWPORT_HEIGHT = 0;
public const float D3D12_DEFAULT_VIEWPORT_MAX_DEPTH = 0.0f;
public const float D3D12_DEFAULT_VIEWPORT_MIN_DEPTH = 0.0f;
public const uint D3D12_DEFAULT_VIEWPORT_TOPLEFTX = 0;
public const uint D3D12_DEFAULT_VIEWPORT_TOPLEFTY = 0;
public const uint D3D12_DEFAULT_VIEWPORT_WIDTH = 0;
public const uint D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND = 0xFFFFFFFF;
public const uint D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_END = 0xFFFFFFF7;
public const uint D3D12_DRIVER_RESERVED_REGISTER_SPACE_VALUES_START = 0xFFFFFFF0;
public const uint D3D12_DS_INPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
public const uint D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENTS = 4;
public const uint D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_DS_INPUT_CONTROL_POINT_REGISTER_COUNT = 32;
public const uint D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_DS_INPUT_CONTROL_POINT_REGISTER_READ_PORTS = 1;
public const uint D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENTS = 3;
public const uint D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_COUNT = 1;
public const uint D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_DS_INPUT_DOMAIN_POINT_REGISTER_READ_PORTS = 1;
public const uint D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
public const uint D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
public const uint D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_DS_INPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
public const uint D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1;
public const uint D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1;
public const uint D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2;
public const uint D3D12_DS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1;
public const uint D3D12_DS_OUTPUT_REGISTER_COMPONENTS = 4;
public const uint D3D12_DS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_DS_OUTPUT_REGISTER_COUNT = 32;
public const float D3D12_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6f;
public const float D3D12_FLOAT32_MAX = 3.402823466e+38f;
public const float D3D12_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6f;
public const float D3D12_FLOAT_TO_SRGB_EXPONENT_DENOMINATOR = 2.4f;
public const float D3D12_FLOAT_TO_SRGB_EXPONENT_NUMERATOR = 1.0f;
public const float D3D12_FLOAT_TO_SRGB_OFFSET = 0.055f;
public const float D3D12_FLOAT_TO_SRGB_SCALE_1 = 12.92f;
public const float D3D12_FLOAT_TO_SRGB_SCALE_2 = 1.055f;
public const float D3D12_FLOAT_TO_SRGB_THRESHOLD = 0.0031308f;
public const float D3D12_FTOI_INSTRUCTION_MAX_INPUT = 2147483647.999f;
public const float D3D12_FTOI_INSTRUCTION_MIN_INPUT = -2147483648.999f;
public const float D3D12_FTOU_INSTRUCTION_MAX_INPUT = 4294967295.999f;
public const float D3D12_FTOU_INSTRUCTION_MIN_INPUT = 0.0f;
public const uint D3D12_GS_INPUT_INSTANCE_ID_READS_PER_INST = 2;
public const uint D3D12_GS_INPUT_INSTANCE_ID_READ_PORTS = 1;
public const uint D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENTS = 1;
public const uint D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_GS_INPUT_INSTANCE_ID_REGISTER_COUNT = 1;
public const uint D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENTS = 1;
public const uint D3D12_GS_INPUT_PRIM_CONST_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_GS_INPUT_PRIM_CONST_REGISTER_COUNT = 1;
public const uint D3D12_GS_INPUT_PRIM_CONST_REGISTER_READS_PER_INST = 2;
public const uint D3D12_GS_INPUT_PRIM_CONST_REGISTER_READ_PORTS = 1;
public const uint D3D12_GS_INPUT_REGISTER_COMPONENTS = 4;
public const uint D3D12_GS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_GS_INPUT_REGISTER_COUNT = 32;
public const uint D3D12_GS_INPUT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_GS_INPUT_REGISTER_READ_PORTS = 1;
public const uint D3D12_GS_INPUT_REGISTER_VERTICES = 32;
public const uint D3D12_GS_MAX_INSTANCE_COUNT = 32;
public const uint D3D12_GS_MAX_OUTPUT_VERTEX_COUNT_ACROSS_INSTANCES = 1024;
public const uint D3D12_GS_OUTPUT_ELEMENTS = 32;
public const uint D3D12_GS_OUTPUT_REGISTER_COMPONENTS = 4;
public const uint D3D12_GS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_GS_OUTPUT_REGISTER_COUNT = 32;
public const uint D3D12_HS_CONTROL_POINT_PHASE_INPUT_REGISTER_COUNT = 32;
public const uint D3D12_HS_CONTROL_POINT_PHASE_OUTPUT_REGISTER_COUNT = 32;
public const uint D3D12_HS_CONTROL_POINT_REGISTER_COMPONENTS = 4;
public const uint D3D12_HS_CONTROL_POINT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_HS_CONTROL_POINT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_HS_CONTROL_POINT_REGISTER_READ_PORTS = 1;
public const uint D3D12_HS_FORK_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xFFFFFFFF;
public const uint D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENTS = 1;
public const uint D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_COUNT = 1;
public const uint D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
public const uint D3D12_HS_INPUT_FORK_INSTANCE_ID_REGISTER_READ_PORTS = 1;
public const uint D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENTS = 1;
public const uint D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_COUNT = 1;
public const uint D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READS_PER_INST = 2;
public const uint D3D12_HS_INPUT_JOIN_INSTANCE_ID_REGISTER_READ_PORTS = 1;
public const uint D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENTS = 1;
public const uint D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_COUNT = 1;
public const uint D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READS_PER_INST = 2;
public const uint D3D12_HS_INPUT_PRIMITIVE_ID_REGISTER_READ_PORTS = 1;
public const uint D3D12_HS_JOIN_PHASE_INSTANCE_COUNT_UPPER_BOUND = 0xFFFFFFFF;
public const float D3D12_HS_MAXTESSFACTOR_LOWER_BOUND = 1.0f;
public const float D3D12_HS_MAXTESSFACTOR_UPPER_BOUND = 64.0f;
public const uint D3D12_HS_OUTPUT_CONTROL_POINTS_MAX_TOTAL_SCALARS = 3968;
public const uint D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENTS = 1;
public const uint D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_COUNT = 1;
public const uint D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READS_PER_INST = 2;
public const uint D3D12_HS_OUTPUT_CONTROL_POINT_ID_REGISTER_READ_PORTS = 1;
public const uint D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENTS = 4;
public const uint D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_COUNT = 32;
public const uint D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_READ_PORTS = 1;
public const uint D3D12_HS_OUTPUT_PATCH_CONSTANT_REGISTER_SCALAR_COMPONENTS = 128;
public const uint D3D12_IA_DEFAULT_INDEX_BUFFER_OFFSET_IN_BYTES = 0;
public const uint D3D12_IA_DEFAULT_PRIMITIVE_TOPOLOGY = 0;
public const uint D3D12_IA_DEFAULT_VERTEX_BUFFER_OFFSET_IN_BYTES = 0;
public const uint D3D12_IA_INDEX_INPUT_RESOURCE_SLOT_COUNT = 1;
public const uint D3D12_IA_INSTANCE_ID_BIT_COUNT = 32;
public const uint D3D12_IA_INTEGER_ARITHMETIC_BIT_COUNT = 32;
public const uint D3D12_IA_PATCH_MAX_CONTROL_POINT_COUNT = 32;
public const uint D3D12_IA_PRIMITIVE_ID_BIT_COUNT = 32;
public const uint D3D12_IA_VERTEX_ID_BIT_COUNT = 32;
public const uint D3D12_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
public const uint D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128;
public const uint D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32;
public const uint D3D12_INTEGER_DIVIDE_BY_ZERO_QUOTIENT = 0xFFFFFFFF;
public const uint D3D12_INTEGER_DIVIDE_BY_ZERO_REMAINDER = 0xFFFFFFFF;
public const uint D3D12_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL = 0xFFFFFFFF;
public const uint D3D12_KEEP_UNORDERED_ACCESS_VIEWS = 0xFFFFFFFF;
public const float D3D12_LINEAR_GAMMA = 1.0f;
public const uint D3D12_MAJOR_VERSION = 12;
public const float D3D12_MAX_BORDER_COLOR_COMPONENT = 1.0f;
public const float D3D12_MAX_DEPTH = 1.0f;
public const uint D3D12_MAX_LIVE_STATIC_SAMPLERS = 2032;
public const uint D3D12_MAX_MAXANISOTROPY = 16;
public const uint D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT = 32;
public const float D3D12_MAX_POSITION_VALUE = 3.402823466e+34f;
public const uint D3D12_MAX_ROOT_COST = 64;
public const uint D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_1 = 1000000;
public const uint D3D12_MAX_SHADER_VISIBLE_DESCRIPTOR_HEAP_SIZE_TIER_2 = 1000000;
public const uint D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE = 2048;
public const uint D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP = 17;
public const uint D3D12_MAX_VIEW_INSTANCE_COUNT = 4;
public const uint D3D12_MINOR_VERSION = 0;
public const float D3D12_MIN_BORDER_COLOR_COMPONENT = 0.0f;
public const float D3D12_MIN_DEPTH = 0.0f;
public const uint D3D12_MIN_MAXANISOTROPY = 0;
public const float D3D12_MIP_LOD_BIAS_MAX = 15.99f;
public const float D3D12_MIP_LOD_BIAS_MIN = -16.0f;
public const uint D3D12_MIP_LOD_FRACTIONAL_BIT_COUNT = 8;
public const uint D3D12_MIP_LOD_RANGE_BIT_COUNT = 8;
public const float D3D12_MULTISAMPLE_ANTIALIAS_LINE_WIDTH = 1.4f;
public const uint D3D12_NONSAMPLE_FETCH_OUT_OF_RANGE_ACCESS_RESULT = 0;
public const uint D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END = 0xFFFFFFFF;
public const uint D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START = 0xFFFFFFF8;
public const uint D3D12_PACKED_TILE = 0xFFFFFFFF;
public const uint D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15;
public const uint D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 16;
public const uint D3D12_PS_CS_UAV_REGISTER_COMPONENTS = 1;
public const uint D3D12_PS_CS_UAV_REGISTER_COUNT = 8;
public const uint D3D12_PS_CS_UAV_REGISTER_READS_PER_INST = 1;
public const uint D3D12_PS_CS_UAV_REGISTER_READ_PORTS = 1;
public const uint D3D12_PS_FRONTFACING_DEFAULT_VALUE = 0xFFFFFFFF;
public const uint D3D12_PS_FRONTFACING_FALSE_VALUE = 0x00000000;
public const uint D3D12_PS_FRONTFACING_TRUE_VALUE = 0xFFFFFFFF;
public const uint D3D12_PS_INPUT_REGISTER_COMPONENTS = 4;
public const uint D3D12_PS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_PS_INPUT_REGISTER_COUNT = 32;
public const uint D3D12_PS_INPUT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_PS_INPUT_REGISTER_READ_PORTS = 1;
public const float D3D12_PS_LEGACY_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.0f;
public const uint D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENTS = 1;
public const uint D3D12_PS_OUTPUT_DEPTH_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_PS_OUTPUT_DEPTH_REGISTER_COUNT = 1;
public const uint D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1;
public const uint D3D12_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_PS_OUTPUT_MASK_REGISTER_COUNT = 1;
public const uint D3D12_PS_OUTPUT_REGISTER_COMPONENTS = 4;
public const uint D3D12_PS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_PS_OUTPUT_REGISTER_COUNT = 8;
public const float D3D12_PS_PIXEL_CENTER_FRACTIONAL_COMPONENT = 0.5f;
public const uint D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT = 16;
public const uint D3D12_RAYTRACING_AABB_BYTE_ALIGNMENT = 8;
public const uint D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT = 256;
public const uint D3D12_RAYTRACING_INSTANCE_DESCS_BYTE_ALIGNMENT = 16;
public const uint D3D12_RAYTRACING_MAX_ATTRIBUTE_SIZE_IN_BYTES = 32;
public const uint D3D12_RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH = 31;
public const uint D3D12_RAYTRACING_MAX_GEOMETRIES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE = 16777216;
public const uint D3D12_RAYTRACING_MAX_INSTANCES_PER_TOP_LEVEL_ACCELERATION_STRUCTURE = 16777216;
public const uint D3D12_RAYTRACING_MAX_PRIMITIVES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE = 536870912;
public const uint D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS = 1073741824;
public const uint D3D12_RAYTRACING_MAX_SHADER_RECORD_STRIDE = 4096;
public const uint D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT = 32;
public const uint D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT = 64;
public const uint D3D12_RAYTRACING_TRANSFORM3X4_BYTE_ALIGNMENT = 16;
public const uint D3D12_REQ_BLEND_OBJECT_COUNT_PER_DEVICE = 4096;
public const uint D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP = 27;
public const uint D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
public const uint D3D12_REQ_DEPTH_STENCIL_OBJECT_COUNT_PER_DEVICE = 4096;
public const uint D3D12_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 32;
public const uint D3D12_REQ_DRAW_VERTEX_COUNT_2_TO_EXP = 32;
public const uint D3D12_REQ_FILTERING_HW_ADDRESSABLE_RESOURCE_DIMENSION = 16384;
public const uint D3D12_REQ_GS_INVOCATION_32BIT_OUTPUT_COMPONENT_LIMIT = 1024;
public const uint D3D12_REQ_IMMEDIATE_CONSTANT_BUFFER_ELEMENT_COUNT = 4096;
public const uint D3D12_REQ_MAXANISOTROPY = 16;
public const uint D3D12_REQ_MIP_LEVELS = 15;
public const uint D3D12_REQ_MULTI_ELEMENT_STRUCTURE_SIZE_IN_BYTES = 2048;
public const uint D3D12_REQ_RASTERIZER_OBJECT_COUNT_PER_DEVICE = 4096;
public const uint D3D12_REQ_RENDER_TO_BUFFER_WINDOW_WIDTH = 16384;
public const uint D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM = 128;
public const float D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_B_TERM = 0.25f;
public const uint D3D12_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_C_TERM = 2048;
public const uint D3D12_REQ_RESOURCE_VIEW_COUNT_PER_DEVICE_2_TO_EXP = 20;
public const uint D3D12_REQ_SAMPLER_OBJECT_COUNT_PER_DEVICE = 4096;
public const uint D3D12_REQ_SUBRESOURCES = 30720;
public const uint D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION = 2048;
public const uint D3D12_REQ_TEXTURE1D_U_DIMENSION = 16384;
public const uint D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION = 2048;
public const uint D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION = 16384;
public const uint D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION = 2048;
public const uint D3D12_REQ_TEXTURECUBE_DIMENSION = 16384;
public const uint D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0;
public const uint D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES = 0xFFFFFFFF;
public const uint D3D12_RS_SET_SHADING_RATE_COMBINER_COUNT = 2;
public const uint D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES = 32;
public const uint D3D12_SHADER_MAJOR_VERSION = 5;
public const uint D3D12_SHADER_MAX_INSTANCES = 65535;
public const uint D3D12_SHADER_MAX_INTERFACES = 253;
public const uint D3D12_SHADER_MAX_INTERFACE_CALL_SITES = 4096;
public const uint D3D12_SHADER_MAX_TYPES = 65535;
public const uint D3D12_SHADER_MINOR_VERSION = 1;
public const uint D3D12_SHIFT_INSTRUCTION_PAD_VALUE = 0;
public const uint D3D12_SHIFT_INSTRUCTION_SHIFT_VALUE_BIT_COUNT = 5;
public const uint D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT = 8;
public const uint D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT = 65536;
public const uint D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT = 4096;
public const uint D3D12_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
public const uint D3D12_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 512;
public const uint D3D12_SO_BUFFER_SLOT_COUNT = 4;
public const uint D3D12_SO_DDI_REGISTER_INDEX_DENOTING_GAP = 0xFFFFFFFF;
public const uint D3D12_SO_NO_RASTERIZED_STREAM = 0xFFFFFFFF;
public const uint D3D12_SO_OUTPUT_COMPONENT_COUNT = 128;
public const uint D3D12_SO_STREAM_COUNT = 4;
public const uint D3D12_SPEC_DATE_DAY = 14;
public const uint D3D12_SPEC_DATE_MONTH = 11;
public const uint D3D12_SPEC_DATE_YEAR = 2014;
public const float D3D12_SPEC_VERSION = 1.16f;
public const float D3D12_SRGB_GAMMA = 2.2f;
public const float D3D12_SRGB_TO_FLOAT_DENOMINATOR_1 = 12.92f;
public const float D3D12_SRGB_TO_FLOAT_DENOMINATOR_2 = 1.055f;
public const float D3D12_SRGB_TO_FLOAT_EXPONENT = 2.4f;
public const float D3D12_SRGB_TO_FLOAT_OFFSET = 0.055f;
public const float D3D12_SRGB_TO_FLOAT_THRESHOLD = 0.04045f;
public const float D3D12_SRGB_TO_FLOAT_TOLERANCE_IN_ULP = 0.5f;
public const uint D3D12_STANDARD_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_STANDARD_COMPONENT_BIT_COUNT_DOUBLED = 64;
public const uint D3D12_STANDARD_MAXIMUM_ELEMENT_ALIGNMENT_BYTE_MULTIPLE = 4;
public const uint D3D12_STANDARD_PIXEL_COMPONENT_COUNT = 128;
public const uint D3D12_STANDARD_PIXEL_ELEMENT_COUNT = 32;
public const uint D3D12_STANDARD_VECTOR_SIZE = 4;
public const uint D3D12_STANDARD_VERTEX_ELEMENT_COUNT = 32;
public const uint D3D12_STANDARD_VERTEX_TOTAL_COMPONENT_COUNT = 64;
public const uint D3D12_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
public const uint D3D12_SUBTEXEL_FRACTIONAL_BIT_COUNT = 8;
public const uint D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_END = 0xFFFFFFFF;
public const uint D3D12_SYSTEM_RESERVED_REGISTER_SPACE_VALUES_START = 0xFFFFFFF0;
public const uint D3D12_TESSELLATOR_MAX_EVEN_TESSELLATION_FACTOR = 64;
public const uint D3D12_TESSELLATOR_MAX_ISOLINE_DENSITY_TESSELLATION_FACTOR = 64;
public const uint D3D12_TESSELLATOR_MAX_ODD_TESSELLATION_FACTOR = 63;
public const uint D3D12_TESSELLATOR_MAX_TESSELLATION_FACTOR = 64;
public const uint D3D12_TESSELLATOR_MIN_EVEN_TESSELLATION_FACTOR = 2;
public const uint D3D12_TESSELLATOR_MIN_ISOLINE_DENSITY_TESSELLATION_FACTOR = 1;
public const uint D3D12_TESSELLATOR_MIN_ODD_TESSELLATION_FACTOR = 1;
public const uint D3D12_TEXEL_ADDRESS_RANGE_BIT_COUNT = 16;
public const uint D3D12_TEXTURE_DATA_PITCH_ALIGNMENT = 256;
public const uint D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT = 512;
public const uint D3D12_TILED_RESOURCE_TILE_SIZE_IN_BYTES = 65536;
public const uint D3D12_TRACKED_WORKLOAD_MAX_INSTANCES = 32;
public const uint D3D12_UAV_COUNTER_PLACEMENT_ALIGNMENT = 4096;
public const uint D3D12_UAV_SLOT_COUNT = 64;
public const uint D3D12_UNBOUND_MEMORY_ACCESS_RESULT = 0;
public const uint D3D12_VIDEO_DECODE_MAX_ARGUMENTS = 10;
public const uint D3D12_VIDEO_DECODE_MAX_HISTOGRAM_COMPONENTS = 4;
public const uint D3D12_VIDEO_DECODE_MIN_BITSTREAM_OFFSET_ALIGNMENT = 256;
public const uint D3D12_VIDEO_DECODE_MIN_HISTOGRAM_OFFSET_ALIGNMENT = 256;
public const uint D3D12_VIDEO_DECODE_STATUS_MACROBLOCKS_AFFECTED_UNKNOWN = 0xFFFFFFFF;
public const uint D3D12_VIDEO_PROCESS_MAX_FILTERS = 32;
public const uint D3D12_VIDEO_PROCESS_STEREO_VIEWS = 2;
public const uint D3D12_VIEWPORT_AND_SCISSORRECT_MAX_INDEX = 15;
public const uint D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16;
public const uint D3D12_VIEWPORT_BOUNDS_MAX = 32767;
public const int D3D12_VIEWPORT_BOUNDS_MIN = -32768;
public const uint D3D12_VS_INPUT_REGISTER_COMPONENTS = 4;
public const uint D3D12_VS_INPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_VS_INPUT_REGISTER_COUNT = 32;
public const uint D3D12_VS_INPUT_REGISTER_READS_PER_INST = 2;
public const uint D3D12_VS_INPUT_REGISTER_READ_PORTS = 1;
public const uint D3D12_VS_OUTPUT_REGISTER_COMPONENTS = 4;
public const uint D3D12_VS_OUTPUT_REGISTER_COMPONENT_BIT_COUNT = 32;
public const uint D3D12_VS_OUTPUT_REGISTER_COUNT = 32;
public const uint D3D12_WHQL_CONTEXT_COUNT_FOR_RESOURCE_LIMIT = 10;
public const uint D3D12_WHQL_DRAWINDEXED_INDEX_COUNT_2_TO_EXP = 25;
public const uint D3D12_WHQL_DRAW_VERTEX_COUNT_2_TO_EXP = 25;
public const uint D3D12_SHADER_COMPONENT_MAPPING_MASK = 0x7;
public const uint D3D12_SHADER_COMPONENT_MAPPING_SHIFT = 3;
public const uint D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES = 1 << (unchecked((int)D3D12_SHADER_COMPONENT_MAPPING_SHIFT) * 4);
public const uint D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING = 0x1688;
public const uint D3D12_FILTER_REDUCTION_TYPE_MASK = 0x00000003;
public const uint D3D12_FILTER_REDUCTION_TYPE_SHIFT = 7;
public const uint D3D12_FILTER_TYPE_MASK = 0x00000003;
public const uint D3D12_MIN_FILTER_SHIFT = 4;
public const uint D3D12_MAG_FILTER_SHIFT = 2;
public const uint D3D12_MIP_FILTER_SHIFT = 0;
public const uint D3D12_ANISOTROPIC_FILTERING_BIT = 0x00000040;
public const uint D3D12_SHADING_RATE_X_AXIS_SHIFT = 2;
public const uint D3D12_SHADING_RATE_VALID_MASK = 3;
public static uint D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(D3D12_SHADER_COMPONENT_MAPPING Src0, D3D12_SHADER_COMPONENT_MAPPING Src1, D3D12_SHADER_COMPONENT_MAPPING Src2, D3D12_SHADER_COMPONENT_MAPPING Src3)
{
return ((uint)Src0 & D3D12_SHADER_COMPONENT_MAPPING_MASK)
| (((uint)Src1 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << unchecked((int)D3D12_SHADER_COMPONENT_MAPPING_SHIFT))
| (((uint)Src2 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (unchecked((int)D3D12_SHADER_COMPONENT_MAPPING_SHIFT) * 2))
| (((uint)Src3 & D3D12_SHADER_COMPONENT_MAPPING_MASK) << (unchecked((int)D3D12_SHADER_COMPONENT_MAPPING_SHIFT) * 3))
| D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES;
}
public static D3D12_SHADER_COMPONENT_MAPPING D3D12_DECODE_SHADER_4_COMPONENT_MAPPING(int ComponentToExtract, uint Mapping) => (D3D12_SHADER_COMPONENT_MAPPING)((Mapping >> (unchecked((int)D3D12_SHADER_COMPONENT_MAPPING_SHIFT) * ComponentToExtract)) & D3D12_SHADER_COMPONENT_MAPPING_MASK);
public static D3D12_FILTER D3D12_ENCODE_BASIC_FILTER(D3D12_FILTER_TYPE min, D3D12_FILTER_TYPE mag, D3D12_FILTER_TYPE mip, D3D12_FILTER_REDUCTION_TYPE reduction)
{
return (D3D12_FILTER)((((uint)min & D3D12_FILTER_TYPE_MASK) << unchecked((int)D3D12_MIN_FILTER_SHIFT))
| (((uint)mag & D3D12_FILTER_TYPE_MASK) << unchecked((int)D3D12_MAG_FILTER_SHIFT))
| (((uint)mip & D3D12_FILTER_TYPE_MASK) << unchecked((int)D3D12_MIP_FILTER_SHIFT))
| (((uint)reduction & D3D12_FILTER_REDUCTION_TYPE_MASK) << unchecked((int)D3D12_FILTER_REDUCTION_TYPE_SHIFT)));
}
public static D3D12_FILTER D3D12_ENCODE_ANISOTROPIC_FILTER(D3D12_FILTER_REDUCTION_TYPE reduction) => (D3D12_FILTER)(D3D12_ANISOTROPIC_FILTERING_BIT | (uint)D3D12_ENCODE_BASIC_FILTER(D3D12_FILTER_TYPE_LINEAR, D3D12_FILTER_TYPE_LINEAR, D3D12_FILTER_TYPE_LINEAR, reduction));
public static D3D12_FILTER_TYPE D3D12_DECODE_MIN_FILTER(D3D12_FILTER D3D12Filter) => (D3D12_FILTER_TYPE)(((uint)D3D12Filter >> unchecked((int)D3D12_MIN_FILTER_SHIFT)) & D3D12_FILTER_TYPE_MASK);
public static D3D12_FILTER_TYPE D3D12_DECODE_MAG_FILTER(D3D12_FILTER D3D12Filter) => (D3D12_FILTER_TYPE)(((uint)D3D12Filter >> unchecked((int)D3D12_MAG_FILTER_SHIFT)) & D3D12_FILTER_TYPE_MASK);
public static D3D12_FILTER_TYPE D3D12_DECODE_MIP_FILTER(D3D12_FILTER D3D12Filter) => (D3D12_FILTER_TYPE)(((uint)D3D12Filter >> unchecked((int)D3D12_MIP_FILTER_SHIFT)) & D3D12_FILTER_TYPE_MASK);
public static D3D12_FILTER_REDUCTION_TYPE D3D12_DECODE_FILTER_REDUCTION(D3D12_FILTER D3D12Filter) => (D3D12_FILTER_REDUCTION_TYPE)(((uint)D3D12Filter >> unchecked((int)D3D12_FILTER_REDUCTION_TYPE_SHIFT)) & D3D12_FILTER_REDUCTION_TYPE_MASK);
public static bool D3D12_DECODE_IS_COMPARISON_FILTER(D3D12_FILTER D3D12Filter) => D3D12_DECODE_FILTER_REDUCTION(D3D12Filter) == D3D12_FILTER_REDUCTION_TYPE_COMPARISON;
public static bool D3D12_DECODE_IS_ANISOTROPIC_FILTER(D3D12_FILTER D3D12Filter)
{
return (((uint)D3D12Filter & D3D12_ANISOTROPIC_FILTERING_BIT) != 0)
&& (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIN_FILTER(D3D12Filter))
&& (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MAG_FILTER(D3D12Filter))
&& (D3D12_FILTER_TYPE_LINEAR == D3D12_DECODE_MIP_FILTER(D3D12Filter));
}
public static uint D3D12_MAKE_COARSE_SHADING_RATE(uint x, uint y) => (x << unchecked((int)D3D12_SHADING_RATE_X_AXIS_SHIFT)) | y;
public static uint D3D12_GET_COARSE_SHADING_RATE_X_AXIS(uint x) => (x >> unchecked((int)D3D12_SHADING_RATE_X_AXIS_SHIFT)) & D3D12_SHADING_RATE_VALID_MASK;
public static uint D3D12_GET_COARSE_SHADING_RATE_Y_AXIS(uint y) => y & D3D12_SHADING_RATE_VALID_MASK;
//public static int D3D12ReflectLibrary(void* pSrcData, UIntPtr SrcDataSize, ID3D12LibraryReflection** ppReflector)
//{
// var iid = IID_ID3D12LibraryReflection;
// return D3DReflectLibrary(pSrcData, SrcDataSize, &iid, (void**)ppReflector);
//}
//public static int D3D_SET_OBJECT_NAME_N_A(ID3D12Object* pObject, uint Chars, sbyte* pName)
//{
// var guid = WKPDID_D3DDebugObjectName;
// return pObject->SetPrivateData(&guid, Chars, pName);
//}
//public static int D3D_SET_OBJECT_NAME_A(ID3D12Object* pObject, sbyte* pName)
//{
// return D3D_SET_OBJECT_NAME_N_A(pObject, (uint)lstrlenA(pName), pName);
//}
//public static int D3D_SET_OBJECT_NAME_N_W(ID3D12Object* pObject, uint Chars, ushort* pName)
//{
// var guid = WKPDID_D3DDebugObjectNameW;
// return pObject->SetPrivateData(&guid, Chars * 2, pName);
//}
//public static int D3D_SET_OBJECT_NAME_W(ID3D12Object* pObject, ushort* pName)
//{
// return D3D_SET_OBJECT_NAME_N_W(pObject, (uint)lstrlenW(pName), pName);
//}
}
}

Просмотреть файл

@ -1,69 +0,0 @@
using System;
namespace Windows.Win32.Dxgi
{
public static unsafe partial class Apis
{
public const uint DXGI_USAGE_SHADER_INPUT = 0x00000010;
public const uint DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x00000020;
public const uint DXGI_USAGE_BACK_BUFFER = 0x00000040;
public const uint DXGI_USAGE_SHARED = 0x00000080;
public const uint DXGI_USAGE_READ_ONLY = 0x00000100;
public const uint DXGI_USAGE_DISCARD_ON_PRESENT = 0x00000200;
public const uint DXGI_USAGE_UNORDERED_ACCESS = 0x00000400;
public const uint DXGI_RESOURCE_PRIORITY_MINIMUM = 0x28000000;
public const uint DXGI_RESOURCE_PRIORITY_LOW = 0x50000000;
public const uint DXGI_RESOURCE_PRIORITY_NORMAL = 0x78000000;
public const uint DXGI_RESOURCE_PRIORITY_HIGH = 0xA0000000;
public const uint DXGI_RESOURCE_PRIORITY_MAXIMUM = 0xC8000000;
public const uint DXGI_MAP_READ = 1;
public const uint DXGI_MAP_WRITE = 2;
public const uint DXGI_MAP_DISCARD = 4;
public const uint DXGI_ENUM_MODES_INTERLACED = 1;
public const uint DXGI_ENUM_MODES_SCALING = 2;
public const uint DXGI_MAX_SWAP_CHAIN_BUFFERS = 16;
public const uint DXGI_PRESENT_TEST = 0x00000001;
public const uint DXGI_PRESENT_DO_NOT_SEQUENCE = 0x00000002;
public const uint DXGI_PRESENT_RESTART = 0x00000004;
public const uint DXGI_PRESENT_DO_NOT_WAIT = 0x00000008;
public const uint DXGI_PRESENT_STEREO_PREFER_RIGHT = 0x00000010;
public const uint DXGI_PRESENT_STEREO_TEMPORARY_MONO = 0x00000020;
public const uint DXGI_PRESENT_RESTRICT_TO_OUTPUT = 0x00000040;
public const uint DXGI_PRESENT_USE_DURATION = 0x00000100;
public const uint DXGI_PRESENT_ALLOW_TEARING = 0x00000200;
public const uint DXGI_MWA_NO_WINDOW_CHANGES = 1 << 0;
public const uint DXGI_MWA_NO_ALT_ENTER = 1 << 1;
public const uint DXGI_MWA_NO_PRINT_SCREEN = 1 << 2;
public const uint DXGI_MWA_VALID = 0x7;
}
}

Просмотреть файл

@ -11,96 +11,8 @@ namespace Windows.Win32.Direct3DHlsl
{
public const string D3DCOMPILER_DLL = "d3dcompiler_47.dll";
public const int D3D_COMPILER_VERSION = 47;
public const uint D3DCOMPILE_DEBUG = 1 << 0;
public const uint D3DCOMPILE_SKIP_VALIDATION = 1 << 1;
public const uint D3DCOMPILE_SKIP_OPTIMIZATION = 1 << 2;
public const uint D3DCOMPILE_PACK_MATRIX_ROW_MAJOR = 1 << 3;
public const uint D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR = 1 << 4;
public const uint D3DCOMPILE_PARTIAL_PRECISION = 1 << 5;
public const uint D3DCOMPILE_FORCE_VS_SOFTWARE_NO_OPT = 1 << 6;
public const uint D3DCOMPILE_FORCE_PS_SOFTWARE_NO_OPT = 1 << 7;
public const uint D3DCOMPILE_NO_PRESHADER = 1 << 8;
public const uint D3DCOMPILE_AVOID_FLOW_CONTROL = 1 << 9;
public const uint D3DCOMPILE_PREFER_FLOW_CONTROL = 1 << 10;
public const uint D3DCOMPILE_ENABLE_STRICTNESS = 1 << 11;
public const uint D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY = 1 << 12;
public const uint D3DCOMPILE_IEEE_STRICTNESS = 1 << 13;
public const uint D3DCOMPILE_OPTIMIZATION_LEVEL0 = 1 << 14;
public const uint D3DCOMPILE_OPTIMIZATION_LEVEL1 = 0;
public const uint D3DCOMPILE_OPTIMIZATION_LEVEL2 = (1 << 14) | (1 << 15);
public const uint D3DCOMPILE_OPTIMIZATION_LEVEL3 = 1 << 15;
public const uint D3DCOMPILE_RESERVED16 = 1 << 16;
public const uint D3DCOMPILE_RESERVED17 = 1 << 17;
public const uint D3DCOMPILE_WARNINGS_ARE_ERRORS = 1 << 18;
public const uint D3DCOMPILE_RESOURCES_MAY_ALIAS = 1 << 19;
public const uint D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES = 1 << 20;
public const uint D3DCOMPILE_ALL_RESOURCES_BOUND = 1 << 21;
public const uint D3DCOMPILE_DEBUG_NAME_FOR_SOURCE = 1 << 22;
public const uint D3DCOMPILE_DEBUG_NAME_FOR_BINARY = 1 << 23;
public const uint D3DCOMPILE_EFFECT_CHILD_EFFECT = 1 << 0;
public const uint D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS = 1 << 1;
public const uint D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST = 0;
public const uint D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_0 = 1 << 4;
public const uint D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_1 = 1 << 5;
public const uint D3D_COMPILE_STANDARD_FILE_INCLUDE = 1;
public const uint D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS = 0x00000001;
public const uint D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS = 0x00000002;
public const uint D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH = 0x00000004;
public const uint D3D_DISASM_ENABLE_COLOR_CODE = 0x00000001;
public const uint D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS = 0x00000002;
public const uint D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING = 0x00000004;
public const uint D3D_DISASM_ENABLE_INSTRUCTION_CYCLE = 0x00000008;
public const uint D3D_DISASM_DISABLE_DEBUG_INFO = 0x00000010;
public const uint D3D_DISASM_ENABLE_INSTRUCTION_OFFSET = 0x00000020;
public const uint D3D_DISASM_INSTRUCTION_ONLY = 0x00000040;
public const uint D3D_DISASM_PRINT_HEX_LITERALS = 0x00000080;
public const uint D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE = 0x00000001;
public const uint D3D_COMPRESS_SHADER_KEEP_ALL_PARTS = 0x00000001;
}
}

Просмотреть файл

@ -12,19 +12,6 @@ namespace Windows.Win32.FileSystem
FIND_FIRST_EX_ON_DISK_ENTRIES_ONLY = 0x00000004
}
[Flags]
public enum FILE_NOTIFY_CHANGE : uint
{
FILE_NOTIFY_CHANGE_FILE_NAME = 0x00000001,
FILE_NOTIFY_CHANGE_DIR_NAME = 0x00000002,
FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x00000004,
FILE_NOTIFY_CHANGE_SIZE = 0x00000008,
FILE_NOTIFY_CHANGE_LAST_WRITE = 0x00000010,
FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x00000020,
FILE_NOTIFY_CHANGE_CREATION = 0x00000040,
FILE_NOTIFY_CHANGE_SECURITY = 0x00000100,
}
[Flags]
public enum DEFINE_DOS_DEVICE_FLAGS : uint
{
@ -127,9 +114,4 @@ namespace Windows.Win32.FileSystem
FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE)
}
public static unsafe partial class Apis
{
public const int MAX_PATH = 260;
}
}

Просмотреть файл

@ -39,4 +39,10 @@ namespace Windows.Win32.Security
CREDUIWIN_PREPROMPTING = 0X00002000,
CREDUIWIN_PACK_32_WOW = 0x10000000
}
public static unsafe partial class Apis
{
// Has to be int so it can be used in a shift
public const int CERT_COMPARE_SHIFT = 16;
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -58,29 +58,4 @@ namespace Windows.Win32.WindowsProgramming
STD_OUTPUT_HANDLE = unchecked((uint)-11),
STD_ERROR_HANDLE = unchecked((uint)-12),
}
[Flags]
public enum VER_FLAGS : uint
{
VER_MINORVERSION = 0x0000001,
VER_MAJORVERSION = 0x0000002,
VER_BUILDNUMBER = 0x0000004,
VER_PLATFORMID = 0x0000008,
VER_SERVICEPACKMINOR = 0x0000010,
VER_SERVICEPACKMAJOR = 0x0000020,
VER_SUITENAME = 0x0000040,
VER_PRODUCT_TYPE = 0x0000080
}
[Flags]
public enum FORMAT_MESSAGE_OPTIONS
{
FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100,
FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200,
FORMAT_MESSAGE_FROM_STRING = 0x00000400,
FORMAT_MESSAGE_FROM_HMODULE = 0x00000800,
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000,
FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000,
FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000FF
}
}

Просмотреть файл

@ -2,7 +2,7 @@ using System;
using System.Runtime.InteropServices;
using Windows.Win32.Interop;
namespace Windows.Win32.MenusAndResources
namespace Windows.Win32.WindowsAndMessaging
{
[UnmanagedFunctionPointer]
[return: NativeTypeName("BOOL")]

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -134,8 +134,8 @@ VirtualProtect::flNewProtect=PAGE_TYPE
VirtualProtect::lpflOldProtect=PAGE_TYPE*
VirtualProtectEx::flNewProtect=PAGE_TYPE
VirtualProtectEx::lpflOldProtect=PAGE_TYPE*
GetConsoleMode::lpMode=ConsoleMode*
SetConsoleMode::dwMode=ConsoleMode
GetConsoleMode::lpMode=CONSOLE_MODE*
SetConsoleMode::dwMode=CONSOLE_MODE
SHGetFileInfoA::dwFileAttributes=FILE_FLAGS_AND_ATTRIBUTES
SHGetFileInfoA::uFlags=SHGFI_FLAGS
SHGetFileInfoW::dwFileAttributes=FILE_FLAGS_AND_ATTRIBUTES
@ -197,3 +197,6 @@ IAMMultiMediaStream::AddMediaStream::dwFlags=AMMSF_MS_FLAGS
IMultiMediaStream::GetInformation::pdwFlags=MMSSF_GET_INFORMATION_FLAGS*
IIdentityProvider::Advise::dwIdentityUpdateEvents=IdentityUpdateEvent
IIdentityAdvise::IdentityUpdated::dwIdentityUpdateEvents=IdentityUpdateEvent
TITLEBARINFO::rgstate=uint
TITLEBARINFOEX::rgstate=uint
PARAFORMAT::rgxTabs=uint

Просмотреть файл

@ -14792,304 +14792,304 @@ SetManagedExternally=Windows.Win32.MobileDeviceManagementRegistration
UnregisterDeviceWithManagement=Windows.Win32.MobileDeviceManagementRegistration
MANAGEMENT_SERVICE_INFO=Windows.Win32.MobileDeviceManagementRegistration
ISystemMediaTransportControlsInterop=Windows.Win32.MediaTransport
ENUMRESNAMEPROCA=Windows.Win32.MenusAndResources
ENUMRESNAMEPROCW=Windows.Win32.MenusAndResources
ENUMRESTYPEPROCA=Windows.Win32.MenusAndResources
ENUMRESTYPEPROCW=Windows.Win32.MenusAndResources
EnumResourceLanguagesExA=Windows.Win32.MenusAndResources
EnumResourceLanguagesExW=Windows.Win32.MenusAndResources
EnumResourceNamesExA=Windows.Win32.MenusAndResources
EnumResourceNamesExW=Windows.Win32.MenusAndResources
EnumResourceTypesExA=Windows.Win32.MenusAndResources
EnumResourceTypesExW=Windows.Win32.MenusAndResources
FreeResource=Windows.Win32.MenusAndResources
LoadResource=Windows.Win32.MenusAndResources
LockResource=Windows.Win32.MenusAndResources
SizeofResource=Windows.Win32.MenusAndResources
CreateResourceIndexer=Windows.Win32.MenusAndResources
DestroyIndexedResults=Windows.Win32.MenusAndResources
DestroyResourceIndexer=Windows.Win32.MenusAndResources
IndexFilePath=Windows.Win32.MenusAndResources
IndexedResourceQualifier=Windows.Win32.MenusAndResources
StringCbCatA=Windows.Win32.MenusAndResources
StringCbCatExA=Windows.Win32.MenusAndResources
StringCbCatExW=Windows.Win32.MenusAndResources
StringCbCatNA=Windows.Win32.MenusAndResources
StringCbCatNExA=Windows.Win32.MenusAndResources
StringCbCatNExW=Windows.Win32.MenusAndResources
StringCbCatNW=Windows.Win32.MenusAndResources
StringCbCatW=Windows.Win32.MenusAndResources
StringCbCopyA=Windows.Win32.MenusAndResources
StringCbCopyExA=Windows.Win32.MenusAndResources
StringCbCopyExW=Windows.Win32.MenusAndResources
StringCbCopyNA=Windows.Win32.MenusAndResources
StringCbCopyNExA=Windows.Win32.MenusAndResources
StringCbCopyNExW=Windows.Win32.MenusAndResources
StringCbCopyNW=Windows.Win32.MenusAndResources
StringCbCopyW=Windows.Win32.MenusAndResources
StringCbGetsA=Windows.Win32.MenusAndResources
StringCbGetsExA=Windows.Win32.MenusAndResources
StringCbGetsExW=Windows.Win32.MenusAndResources
StringCbGetsW=Windows.Win32.MenusAndResources
StringCbLengthA=Windows.Win32.MenusAndResources
StringCbLengthW=Windows.Win32.MenusAndResources
StringCbPrintf_lA=Windows.Win32.MenusAndResources
StringCbPrintf_lExA=Windows.Win32.MenusAndResources
StringCbPrintf_lExW=Windows.Win32.MenusAndResources
StringCbPrintf_lW=Windows.Win32.MenusAndResources
StringCbPrintfA=Windows.Win32.MenusAndResources
StringCbPrintfExA=Windows.Win32.MenusAndResources
StringCbPrintfExW=Windows.Win32.MenusAndResources
StringCbPrintfW=Windows.Win32.MenusAndResources
StringCbVPrintf_lA=Windows.Win32.MenusAndResources
StringCbVPrintf_lExA=Windows.Win32.MenusAndResources
StringCbVPrintf_lExW=Windows.Win32.MenusAndResources
StringCbVPrintf_lW=Windows.Win32.MenusAndResources
StringCbVPrintfA=Windows.Win32.MenusAndResources
StringCbVPrintfExA=Windows.Win32.MenusAndResources
StringCbVPrintfExW=Windows.Win32.MenusAndResources
StringCbVPrintfW=Windows.Win32.MenusAndResources
StringCchCatA=Windows.Win32.MenusAndResources
StringCchCatExA=Windows.Win32.MenusAndResources
StringCchCatExW=Windows.Win32.MenusAndResources
StringCchCatNA=Windows.Win32.MenusAndResources
StringCchCatNExA=Windows.Win32.MenusAndResources
StringCchCatNExW=Windows.Win32.MenusAndResources
StringCchCatNW=Windows.Win32.MenusAndResources
StringCchCatW=Windows.Win32.MenusAndResources
StringCchCopyA=Windows.Win32.MenusAndResources
StringCchCopyExA=Windows.Win32.MenusAndResources
StringCchCopyExW=Windows.Win32.MenusAndResources
StringCchCopyNA=Windows.Win32.MenusAndResources
StringCchCopyNExA=Windows.Win32.MenusAndResources
StringCchCopyNExW=Windows.Win32.MenusAndResources
StringCchCopyNW=Windows.Win32.MenusAndResources
StringCchCopyW=Windows.Win32.MenusAndResources
StringCchGetsA=Windows.Win32.MenusAndResources
StringCchGetsExA=Windows.Win32.MenusAndResources
StringCchGetsExW=Windows.Win32.MenusAndResources
StringCchGetsW=Windows.Win32.MenusAndResources
StringCchLengthA=Windows.Win32.MenusAndResources
StringCchLengthW=Windows.Win32.MenusAndResources
StringCchPrintf_lA=Windows.Win32.MenusAndResources
StringCchPrintf_lExA=Windows.Win32.MenusAndResources
StringCchPrintf_lExW=Windows.Win32.MenusAndResources
StringCchPrintf_lW=Windows.Win32.MenusAndResources
StringCchPrintfA=Windows.Win32.MenusAndResources
StringCchPrintfExA=Windows.Win32.MenusAndResources
StringCchPrintfExW=Windows.Win32.MenusAndResources
StringCchPrintfW=Windows.Win32.MenusAndResources
StringCchVPrintf_lA=Windows.Win32.MenusAndResources
StringCchVPrintf_lExA=Windows.Win32.MenusAndResources
StringCchVPrintf_lExW=Windows.Win32.MenusAndResources
StringCchVPrintf_lW=Windows.Win32.MenusAndResources
StringCchVPrintfA=Windows.Win32.MenusAndResources
StringCchVPrintfExA=Windows.Win32.MenusAndResources
StringCchVPrintfExW=Windows.Win32.MenusAndResources
StringCchVPrintfW=Windows.Win32.MenusAndResources
VS_FIXEDFILEINFO=Windows.Win32.MenusAndResources
BeginUpdateResourceA=Windows.Win32.MenusAndResources
BeginUpdateResourceW=Windows.Win32.MenusAndResources
EndUpdateResourceA=Windows.Win32.MenusAndResources
EndUpdateResourceW=Windows.Win32.MenusAndResources
EnumResourceLanguagesA=Windows.Win32.MenusAndResources
EnumResourceLanguagesW=Windows.Win32.MenusAndResources
EnumResourceNamesA=Windows.Win32.MenusAndResources
EnumResourceTypesA=Windows.Win32.MenusAndResources
EnumResourceTypesW=Windows.Win32.MenusAndResources
FindResourceA=Windows.Win32.MenusAndResources
FindResourceExA=Windows.Win32.MenusAndResources
lstrcatA=Windows.Win32.MenusAndResources
lstrcatW=Windows.Win32.MenusAndResources
lstrcmpA=Windows.Win32.MenusAndResources
lstrcmpiA=Windows.Win32.MenusAndResources
lstrcmpiW=Windows.Win32.MenusAndResources
lstrcmpW=Windows.Win32.MenusAndResources
lstrcpyA=Windows.Win32.MenusAndResources
lstrcpynA=Windows.Win32.MenusAndResources
lstrcpynW=Windows.Win32.MenusAndResources
lstrcpyW=Windows.Win32.MenusAndResources
lstrlenA=Windows.Win32.MenusAndResources
lstrlenW=Windows.Win32.MenusAndResources
UpdateResourceA=Windows.Win32.MenusAndResources
UpdateResourceW=Windows.Win32.MenusAndResources
MESSAGE_RESOURCE_BLOCK=Windows.Win32.MenusAndResources
MESSAGE_RESOURCE_DATA=Windows.Win32.MenusAndResources
MESSAGE_RESOURCE_ENTRY=Windows.Win32.MenusAndResources
AppendMenuA=Windows.Win32.MenusAndResources
AppendMenuW=Windows.Win32.MenusAndResources
CharLowerA=Windows.Win32.MenusAndResources
CharLowerBuffA=Windows.Win32.MenusAndResources
CharLowerBuffW=Windows.Win32.MenusAndResources
CharLowerW=Windows.Win32.MenusAndResources
CharNextA=Windows.Win32.MenusAndResources
CharNextExA=Windows.Win32.MenusAndResources
CharNextW=Windows.Win32.MenusAndResources
CharPrevA=Windows.Win32.MenusAndResources
CharPrevExA=Windows.Win32.MenusAndResources
CharPrevW=Windows.Win32.MenusAndResources
CharToOemA=Windows.Win32.MenusAndResources
CharToOemBuffA=Windows.Win32.MenusAndResources
CharToOemBuffW=Windows.Win32.MenusAndResources
CharToOemW=Windows.Win32.MenusAndResources
CharUpperA=Windows.Win32.MenusAndResources
CharUpperBuffA=Windows.Win32.MenusAndResources
CharUpperBuffW=Windows.Win32.MenusAndResources
CharUpperW=Windows.Win32.MenusAndResources
CheckMenuItem=Windows.Win32.MenusAndResources
CheckMenuRadioItem=Windows.Win32.MenusAndResources
ClipCursor=Windows.Win32.MenusAndResources
CopyAcceleratorTableA=Windows.Win32.MenusAndResources
CopyAcceleratorTableW=Windows.Win32.MenusAndResources
CopyCursor=Windows.Win32.MenusAndResources
CopyIcon=Windows.Win32.MenusAndResources
CopyImage=Windows.Win32.MenusAndResources
CreateAcceleratorTableA=Windows.Win32.MenusAndResources
CreateAcceleratorTableW=Windows.Win32.MenusAndResources
CreateCaret=Windows.Win32.MenusAndResources
CreateCursor=Windows.Win32.MenusAndResources
CreateIcon=Windows.Win32.MenusAndResources
CreateIconFromResource=Windows.Win32.MenusAndResources
CreateIconFromResourceEx=Windows.Win32.MenusAndResources
CreateIconIndirect=Windows.Win32.MenusAndResources
CreateMenu=Windows.Win32.MenusAndResources
CreatePopupMenu=Windows.Win32.MenusAndResources
DeleteMenu=Windows.Win32.MenusAndResources
DestroyAcceleratorTable=Windows.Win32.MenusAndResources
DestroyCaret=Windows.Win32.MenusAndResources
DestroyCursor=Windows.Win32.MenusAndResources
DestroyIcon=Windows.Win32.MenusAndResources
DestroyMenu=Windows.Win32.MenusAndResources
DrawIcon=Windows.Win32.MenusAndResources
DrawIconEx=Windows.Win32.MenusAndResources
DrawMenuBar=Windows.Win32.MenusAndResources
EnableMenuItem=Windows.Win32.MenusAndResources
EndMenu=Windows.Win32.MenusAndResources
GetCaretBlinkTime=Windows.Win32.MenusAndResources
GetCaretPos=Windows.Win32.MenusAndResources
GetClipCursor=Windows.Win32.MenusAndResources
GetCursor=Windows.Win32.MenusAndResources
GetCursorInfo=Windows.Win32.MenusAndResources
GetCursorPos=Windows.Win32.MenusAndResources
GetIconInfo=Windows.Win32.MenusAndResources
GetIconInfoExA=Windows.Win32.MenusAndResources
GetIconInfoExW=Windows.Win32.MenusAndResources
GetMenu=Windows.Win32.MenusAndResources
GetMenuBarInfo=Windows.Win32.MenusAndResources
GetMenuCheckMarkDimensions=Windows.Win32.MenusAndResources
GetMenuDefaultItem=Windows.Win32.MenusAndResources
GetMenuInfo=Windows.Win32.MenusAndResources
GetMenuItemCount=Windows.Win32.MenusAndResources
GetMenuItemID=Windows.Win32.MenusAndResources
GetMenuItemInfoA=Windows.Win32.MenusAndResources
GetMenuItemInfoW=Windows.Win32.MenusAndResources
GetMenuItemRect=Windows.Win32.MenusAndResources
GetMenuState=Windows.Win32.MenusAndResources
GetMenuStringA=Windows.Win32.MenusAndResources
GetMenuStringW=Windows.Win32.MenusAndResources
GetPhysicalCursorPos=Windows.Win32.MenusAndResources
GetSubMenu=Windows.Win32.MenusAndResources
GetSystemMenu=Windows.Win32.MenusAndResources
HideCaret=Windows.Win32.MenusAndResources
HiliteMenuItem=Windows.Win32.MenusAndResources
InsertMenuA=Windows.Win32.MenusAndResources
InsertMenuItemA=Windows.Win32.MenusAndResources
InsertMenuItemW=Windows.Win32.MenusAndResources
InsertMenuW=Windows.Win32.MenusAndResources
IS_INTRESOURCE=Windows.Win32.MenusAndResources
IsCharAlphaA=Windows.Win32.MenusAndResources
IsCharAlphaNumericA=Windows.Win32.MenusAndResources
IsCharAlphaNumericW=Windows.Win32.MenusAndResources
IsCharAlphaW=Windows.Win32.MenusAndResources
IsCharLowerA=Windows.Win32.MenusAndResources
IsCharUpperA=Windows.Win32.MenusAndResources
IsCharUpperW=Windows.Win32.MenusAndResources
IsMenu=Windows.Win32.MenusAndResources
LoadAcceleratorsA=Windows.Win32.MenusAndResources
LoadAcceleratorsW=Windows.Win32.MenusAndResources
LoadCursorA=Windows.Win32.MenusAndResources
LoadCursorFromFileA=Windows.Win32.MenusAndResources
LoadCursorFromFileW=Windows.Win32.MenusAndResources
LoadCursorW=Windows.Win32.MenusAndResources
LoadIconA=Windows.Win32.MenusAndResources
LoadIconW=Windows.Win32.MenusAndResources
LoadImageA=Windows.Win32.MenusAndResources
LoadImageW=Windows.Win32.MenusAndResources
LoadMenuA=Windows.Win32.MenusAndResources
LoadMenuIndirectA=Windows.Win32.MenusAndResources
LoadMenuIndirectW=Windows.Win32.MenusAndResources
LoadMenuW=Windows.Win32.MenusAndResources
LoadStringA=Windows.Win32.MenusAndResources
LoadStringW=Windows.Win32.MenusAndResources
LookupIconIdFromDirectory=Windows.Win32.MenusAndResources
LookupIconIdFromDirectoryEx=Windows.Win32.MenusAndResources
MAKEINTRESOURCEA=Windows.Win32.MenusAndResources
MAKEINTRESOURCEW=Windows.Win32.MenusAndResources
MenuItemFromPoint=Windows.Win32.MenusAndResources
ModifyMenuA=Windows.Win32.MenusAndResources
ModifyMenuW=Windows.Win32.MenusAndResources
OemToCharA=Windows.Win32.MenusAndResources
OemToCharBuffA=Windows.Win32.MenusAndResources
OemToCharBuffW=Windows.Win32.MenusAndResources
OemToCharW=Windows.Win32.MenusAndResources
PrivateExtractIconsA=Windows.Win32.MenusAndResources
PrivateExtractIconsW=Windows.Win32.MenusAndResources
RemoveMenu=Windows.Win32.MenusAndResources
SetCaretBlinkTime=Windows.Win32.MenusAndResources
SetCaretPos=Windows.Win32.MenusAndResources
SetCursor=Windows.Win32.MenusAndResources
SetCursorPos=Windows.Win32.MenusAndResources
SetMenu=Windows.Win32.MenusAndResources
SetMenuDefaultItem=Windows.Win32.MenusAndResources
SetMenuInfo=Windows.Win32.MenusAndResources
SetMenuItemBitmaps=Windows.Win32.MenusAndResources
SetMenuItemInfoA=Windows.Win32.MenusAndResources
SetMenuItemInfoW=Windows.Win32.MenusAndResources
SetPhysicalCursorPos=Windows.Win32.MenusAndResources
SetSystemCursor=Windows.Win32.MenusAndResources
ShowCaret=Windows.Win32.MenusAndResources
ShowCursor=Windows.Win32.MenusAndResources
TrackPopupMenu=Windows.Win32.MenusAndResources
TrackPopupMenuEx=Windows.Win32.MenusAndResources
TranslateAcceleratorA=Windows.Win32.MenusAndResources
TranslateAcceleratorW=Windows.Win32.MenusAndResources
wsprintfA=Windows.Win32.MenusAndResources
wsprintfW=Windows.Win32.MenusAndResources
wvsprintfA=Windows.Win32.MenusAndResources
wvsprintfW=Windows.Win32.MenusAndResources
ACCEL=Windows.Win32.MenusAndResources
CURSORINFO=Windows.Win32.MenusAndResources
CURSORSHAPE=Windows.Win32.MenusAndResources
ICONINFO=Windows.Win32.MenusAndResources
ICONINFOEXA=Windows.Win32.MenusAndResources
ICONINFOEXW=Windows.Win32.MenusAndResources
ICONMETRICSA=Windows.Win32.MenusAndResources
ICONMETRICSW=Windows.Win32.MenusAndResources
MDINEXTMENU=Windows.Win32.MenusAndResources
MENUBARINFO=Windows.Win32.MenusAndResources
MENUGETOBJECTINFO=Windows.Win32.MenusAndResources
MENUINFO=Windows.Win32.MenusAndResources
MENUITEMINFOA=Windows.Win32.MenusAndResources
MENUITEMINFOW=Windows.Win32.MenusAndResources
MENUITEMTEMPLATE=Windows.Win32.MenusAndResources
MENUITEMTEMPLATEHEADER=Windows.Win32.MenusAndResources
TPMPARAMS=Windows.Win32.MenusAndResources
GetFileVersionInfoA=Windows.Win32.MenusAndResources
GetFileVersionInfoExA=Windows.Win32.MenusAndResources
GetFileVersionInfoExW=Windows.Win32.MenusAndResources
GetFileVersionInfoSizeA=Windows.Win32.MenusAndResources
GetFileVersionInfoSizeExA=Windows.Win32.MenusAndResources
GetFileVersionInfoSizeExW=Windows.Win32.MenusAndResources
GetFileVersionInfoSizeW=Windows.Win32.MenusAndResources
GetFileVersionInfoW=Windows.Win32.MenusAndResources
VerFindFileA=Windows.Win32.MenusAndResources
VerFindFileW=Windows.Win32.MenusAndResources
VerInstallFileA=Windows.Win32.MenusAndResources
VerInstallFileW=Windows.Win32.MenusAndResources
VerLanguageNameA=Windows.Win32.MenusAndResources
VerLanguageNameW=Windows.Win32.MenusAndResources
VerQueryValueA=Windows.Win32.MenusAndResources
VerQueryValueW=Windows.Win32.MenusAndResources
ENUMRESNAMEPROCA=Windows.Win32.WindowsAndMessaging
ENUMRESNAMEPROCW=Windows.Win32.WindowsAndMessaging
ENUMRESTYPEPROCA=Windows.Win32.WindowsAndMessaging
ENUMRESTYPEPROCW=Windows.Win32.WindowsAndMessaging
EnumResourceLanguagesExA=Windows.Win32.WindowsAndMessaging
EnumResourceLanguagesExW=Windows.Win32.WindowsAndMessaging
EnumResourceNamesExA=Windows.Win32.WindowsAndMessaging
EnumResourceNamesExW=Windows.Win32.WindowsAndMessaging
EnumResourceTypesExA=Windows.Win32.WindowsAndMessaging
EnumResourceTypesExW=Windows.Win32.WindowsAndMessaging
FreeResource=Windows.Win32.WindowsAndMessaging
LoadResource=Windows.Win32.WindowsAndMessaging
LockResource=Windows.Win32.WindowsAndMessaging
SizeofResource=Windows.Win32.WindowsAndMessaging
CreateResourceIndexer=Windows.Win32.WindowsAndMessaging
DestroyIndexedResults=Windows.Win32.WindowsAndMessaging
DestroyResourceIndexer=Windows.Win32.WindowsAndMessaging
IndexFilePath=Windows.Win32.WindowsAndMessaging
IndexedResourceQualifier=Windows.Win32.WindowsAndMessaging
StringCbCatA=Windows.Win32.WindowsAndMessaging
StringCbCatExA=Windows.Win32.WindowsAndMessaging
StringCbCatExW=Windows.Win32.WindowsAndMessaging
StringCbCatNA=Windows.Win32.WindowsAndMessaging
StringCbCatNExA=Windows.Win32.WindowsAndMessaging
StringCbCatNExW=Windows.Win32.WindowsAndMessaging
StringCbCatNW=Windows.Win32.WindowsAndMessaging
StringCbCatW=Windows.Win32.WindowsAndMessaging
StringCbCopyA=Windows.Win32.WindowsAndMessaging
StringCbCopyExA=Windows.Win32.WindowsAndMessaging
StringCbCopyExW=Windows.Win32.WindowsAndMessaging
StringCbCopyNA=Windows.Win32.WindowsAndMessaging
StringCbCopyNExA=Windows.Win32.WindowsAndMessaging
StringCbCopyNExW=Windows.Win32.WindowsAndMessaging
StringCbCopyNW=Windows.Win32.WindowsAndMessaging
StringCbCopyW=Windows.Win32.WindowsAndMessaging
StringCbGetsA=Windows.Win32.WindowsAndMessaging
StringCbGetsExA=Windows.Win32.WindowsAndMessaging
StringCbGetsExW=Windows.Win32.WindowsAndMessaging
StringCbGetsW=Windows.Win32.WindowsAndMessaging
StringCbLengthA=Windows.Win32.WindowsAndMessaging
StringCbLengthW=Windows.Win32.WindowsAndMessaging
StringCbPrintf_lA=Windows.Win32.WindowsAndMessaging
StringCbPrintf_lExA=Windows.Win32.WindowsAndMessaging
StringCbPrintf_lExW=Windows.Win32.WindowsAndMessaging
StringCbPrintf_lW=Windows.Win32.WindowsAndMessaging
StringCbPrintfA=Windows.Win32.WindowsAndMessaging
StringCbPrintfExA=Windows.Win32.WindowsAndMessaging
StringCbPrintfExW=Windows.Win32.WindowsAndMessaging
StringCbPrintfW=Windows.Win32.WindowsAndMessaging
StringCbVPrintf_lA=Windows.Win32.WindowsAndMessaging
StringCbVPrintf_lExA=Windows.Win32.WindowsAndMessaging
StringCbVPrintf_lExW=Windows.Win32.WindowsAndMessaging
StringCbVPrintf_lW=Windows.Win32.WindowsAndMessaging
StringCbVPrintfA=Windows.Win32.WindowsAndMessaging
StringCbVPrintfExA=Windows.Win32.WindowsAndMessaging
StringCbVPrintfExW=Windows.Win32.WindowsAndMessaging
StringCbVPrintfW=Windows.Win32.WindowsAndMessaging
StringCchCatA=Windows.Win32.WindowsAndMessaging
StringCchCatExA=Windows.Win32.WindowsAndMessaging
StringCchCatExW=Windows.Win32.WindowsAndMessaging
StringCchCatNA=Windows.Win32.WindowsAndMessaging
StringCchCatNExA=Windows.Win32.WindowsAndMessaging
StringCchCatNExW=Windows.Win32.WindowsAndMessaging
StringCchCatNW=Windows.Win32.WindowsAndMessaging
StringCchCatW=Windows.Win32.WindowsAndMessaging
StringCchCopyA=Windows.Win32.WindowsAndMessaging
StringCchCopyExA=Windows.Win32.WindowsAndMessaging
StringCchCopyExW=Windows.Win32.WindowsAndMessaging
StringCchCopyNA=Windows.Win32.WindowsAndMessaging
StringCchCopyNExA=Windows.Win32.WindowsAndMessaging
StringCchCopyNExW=Windows.Win32.WindowsAndMessaging
StringCchCopyNW=Windows.Win32.WindowsAndMessaging
StringCchCopyW=Windows.Win32.WindowsAndMessaging
StringCchGetsA=Windows.Win32.WindowsAndMessaging
StringCchGetsExA=Windows.Win32.WindowsAndMessaging
StringCchGetsExW=Windows.Win32.WindowsAndMessaging
StringCchGetsW=Windows.Win32.WindowsAndMessaging
StringCchLengthA=Windows.Win32.WindowsAndMessaging
StringCchLengthW=Windows.Win32.WindowsAndMessaging
StringCchPrintf_lA=Windows.Win32.WindowsAndMessaging
StringCchPrintf_lExA=Windows.Win32.WindowsAndMessaging
StringCchPrintf_lExW=Windows.Win32.WindowsAndMessaging
StringCchPrintf_lW=Windows.Win32.WindowsAndMessaging
StringCchPrintfA=Windows.Win32.WindowsAndMessaging
StringCchPrintfExA=Windows.Win32.WindowsAndMessaging
StringCchPrintfExW=Windows.Win32.WindowsAndMessaging
StringCchPrintfW=Windows.Win32.WindowsAndMessaging
StringCchVPrintf_lA=Windows.Win32.WindowsAndMessaging
StringCchVPrintf_lExA=Windows.Win32.WindowsAndMessaging
StringCchVPrintf_lExW=Windows.Win32.WindowsAndMessaging
StringCchVPrintf_lW=Windows.Win32.WindowsAndMessaging
StringCchVPrintfA=Windows.Win32.WindowsAndMessaging
StringCchVPrintfExA=Windows.Win32.WindowsAndMessaging
StringCchVPrintfExW=Windows.Win32.WindowsAndMessaging
StringCchVPrintfW=Windows.Win32.WindowsAndMessaging
VS_FIXEDFILEINFO=Windows.Win32.WindowsAndMessaging
BeginUpdateResourceA=Windows.Win32.WindowsAndMessaging
BeginUpdateResourceW=Windows.Win32.WindowsAndMessaging
EndUpdateResourceA=Windows.Win32.WindowsAndMessaging
EndUpdateResourceW=Windows.Win32.WindowsAndMessaging
EnumResourceLanguagesA=Windows.Win32.WindowsAndMessaging
EnumResourceLanguagesW=Windows.Win32.WindowsAndMessaging
EnumResourceNamesA=Windows.Win32.WindowsAndMessaging
EnumResourceTypesA=Windows.Win32.WindowsAndMessaging
EnumResourceTypesW=Windows.Win32.WindowsAndMessaging
FindResourceA=Windows.Win32.WindowsAndMessaging
FindResourceExA=Windows.Win32.WindowsAndMessaging
lstrcatA=Windows.Win32.WindowsAndMessaging
lstrcatW=Windows.Win32.WindowsAndMessaging
lstrcmpA=Windows.Win32.WindowsAndMessaging
lstrcmpiA=Windows.Win32.WindowsAndMessaging
lstrcmpiW=Windows.Win32.WindowsAndMessaging
lstrcmpW=Windows.Win32.WindowsAndMessaging
lstrcpyA=Windows.Win32.WindowsAndMessaging
lstrcpynA=Windows.Win32.WindowsAndMessaging
lstrcpynW=Windows.Win32.WindowsAndMessaging
lstrcpyW=Windows.Win32.WindowsAndMessaging
lstrlenA=Windows.Win32.WindowsAndMessaging
lstrlenW=Windows.Win32.WindowsAndMessaging
UpdateResourceA=Windows.Win32.WindowsAndMessaging
UpdateResourceW=Windows.Win32.WindowsAndMessaging
MESSAGE_RESOURCE_BLOCK=Windows.Win32.WindowsAndMessaging
MESSAGE_RESOURCE_DATA=Windows.Win32.WindowsAndMessaging
MESSAGE_RESOURCE_ENTRY=Windows.Win32.WindowsAndMessaging
AppendMenuA=Windows.Win32.WindowsAndMessaging
AppendMenuW=Windows.Win32.WindowsAndMessaging
CharLowerA=Windows.Win32.WindowsAndMessaging
CharLowerBuffA=Windows.Win32.WindowsAndMessaging
CharLowerBuffW=Windows.Win32.WindowsAndMessaging
CharLowerW=Windows.Win32.WindowsAndMessaging
CharNextA=Windows.Win32.WindowsAndMessaging
CharNextExA=Windows.Win32.WindowsAndMessaging
CharNextW=Windows.Win32.WindowsAndMessaging
CharPrevA=Windows.Win32.WindowsAndMessaging
CharPrevExA=Windows.Win32.WindowsAndMessaging
CharPrevW=Windows.Win32.WindowsAndMessaging
CharToOemA=Windows.Win32.WindowsAndMessaging
CharToOemBuffA=Windows.Win32.WindowsAndMessaging
CharToOemBuffW=Windows.Win32.WindowsAndMessaging
CharToOemW=Windows.Win32.WindowsAndMessaging
CharUpperA=Windows.Win32.WindowsAndMessaging
CharUpperBuffA=Windows.Win32.WindowsAndMessaging
CharUpperBuffW=Windows.Win32.WindowsAndMessaging
CharUpperW=Windows.Win32.WindowsAndMessaging
CheckMenuItem=Windows.Win32.WindowsAndMessaging
CheckMenuRadioItem=Windows.Win32.WindowsAndMessaging
ClipCursor=Windows.Win32.WindowsAndMessaging
CopyAcceleratorTableA=Windows.Win32.WindowsAndMessaging
CopyAcceleratorTableW=Windows.Win32.WindowsAndMessaging
CopyCursor=Windows.Win32.WindowsAndMessaging
CopyIcon=Windows.Win32.WindowsAndMessaging
CopyImage=Windows.Win32.WindowsAndMessaging
CreateAcceleratorTableA=Windows.Win32.WindowsAndMessaging
CreateAcceleratorTableW=Windows.Win32.WindowsAndMessaging
CreateCaret=Windows.Win32.WindowsAndMessaging
CreateCursor=Windows.Win32.WindowsAndMessaging
CreateIcon=Windows.Win32.WindowsAndMessaging
CreateIconFromResource=Windows.Win32.WindowsAndMessaging
CreateIconFromResourceEx=Windows.Win32.WindowsAndMessaging
CreateIconIndirect=Windows.Win32.WindowsAndMessaging
CreateMenu=Windows.Win32.WindowsAndMessaging
CreatePopupMenu=Windows.Win32.WindowsAndMessaging
DeleteMenu=Windows.Win32.WindowsAndMessaging
DestroyAcceleratorTable=Windows.Win32.WindowsAndMessaging
DestroyCaret=Windows.Win32.WindowsAndMessaging
DestroyCursor=Windows.Win32.WindowsAndMessaging
DestroyIcon=Windows.Win32.WindowsAndMessaging
DestroyMenu=Windows.Win32.WindowsAndMessaging
DrawIcon=Windows.Win32.WindowsAndMessaging
DrawIconEx=Windows.Win32.WindowsAndMessaging
DrawMenuBar=Windows.Win32.WindowsAndMessaging
EnableMenuItem=Windows.Win32.WindowsAndMessaging
EndMenu=Windows.Win32.WindowsAndMessaging
GetCaretBlinkTime=Windows.Win32.WindowsAndMessaging
GetCaretPos=Windows.Win32.WindowsAndMessaging
GetClipCursor=Windows.Win32.WindowsAndMessaging
GetCursor=Windows.Win32.WindowsAndMessaging
GetCursorInfo=Windows.Win32.WindowsAndMessaging
GetCursorPos=Windows.Win32.WindowsAndMessaging
GetIconInfo=Windows.Win32.WindowsAndMessaging
GetIconInfoExA=Windows.Win32.WindowsAndMessaging
GetIconInfoExW=Windows.Win32.WindowsAndMessaging
GetMenu=Windows.Win32.WindowsAndMessaging
GetMenuBarInfo=Windows.Win32.WindowsAndMessaging
GetMenuCheckMarkDimensions=Windows.Win32.WindowsAndMessaging
GetMenuDefaultItem=Windows.Win32.WindowsAndMessaging
GetMenuInfo=Windows.Win32.WindowsAndMessaging
GetMenuItemCount=Windows.Win32.WindowsAndMessaging
GetMenuItemID=Windows.Win32.WindowsAndMessaging
GetMenuItemInfoA=Windows.Win32.WindowsAndMessaging
GetMenuItemInfoW=Windows.Win32.WindowsAndMessaging
GetMenuItemRect=Windows.Win32.WindowsAndMessaging
GetMenuState=Windows.Win32.WindowsAndMessaging
GetMenuStringA=Windows.Win32.WindowsAndMessaging
GetMenuStringW=Windows.Win32.WindowsAndMessaging
GetPhysicalCursorPos=Windows.Win32.WindowsAndMessaging
GetSubMenu=Windows.Win32.WindowsAndMessaging
GetSystemMenu=Windows.Win32.WindowsAndMessaging
HideCaret=Windows.Win32.WindowsAndMessaging
HiliteMenuItem=Windows.Win32.WindowsAndMessaging
InsertMenuA=Windows.Win32.WindowsAndMessaging
InsertMenuItemA=Windows.Win32.WindowsAndMessaging
InsertMenuItemW=Windows.Win32.WindowsAndMessaging
InsertMenuW=Windows.Win32.WindowsAndMessaging
IS_INTRESOURCE=Windows.Win32.WindowsAndMessaging
IsCharAlphaA=Windows.Win32.WindowsAndMessaging
IsCharAlphaNumericA=Windows.Win32.WindowsAndMessaging
IsCharAlphaNumericW=Windows.Win32.WindowsAndMessaging
IsCharAlphaW=Windows.Win32.WindowsAndMessaging
IsCharLowerA=Windows.Win32.WindowsAndMessaging
IsCharUpperA=Windows.Win32.WindowsAndMessaging
IsCharUpperW=Windows.Win32.WindowsAndMessaging
IsMenu=Windows.Win32.WindowsAndMessaging
LoadAcceleratorsA=Windows.Win32.WindowsAndMessaging
LoadAcceleratorsW=Windows.Win32.WindowsAndMessaging
LoadCursorA=Windows.Win32.WindowsAndMessaging
LoadCursorFromFileA=Windows.Win32.WindowsAndMessaging
LoadCursorFromFileW=Windows.Win32.WindowsAndMessaging
LoadCursorW=Windows.Win32.WindowsAndMessaging
LoadIconA=Windows.Win32.WindowsAndMessaging
LoadIconW=Windows.Win32.WindowsAndMessaging
LoadImageA=Windows.Win32.WindowsAndMessaging
LoadImageW=Windows.Win32.WindowsAndMessaging
LoadMenuA=Windows.Win32.WindowsAndMessaging
LoadMenuIndirectA=Windows.Win32.WindowsAndMessaging
LoadMenuIndirectW=Windows.Win32.WindowsAndMessaging
LoadMenuW=Windows.Win32.WindowsAndMessaging
LoadStringA=Windows.Win32.WindowsAndMessaging
LoadStringW=Windows.Win32.WindowsAndMessaging
LookupIconIdFromDirectory=Windows.Win32.WindowsAndMessaging
LookupIconIdFromDirectoryEx=Windows.Win32.WindowsAndMessaging
MAKEINTRESOURCEA=Windows.Win32.WindowsAndMessaging
MAKEINTRESOURCEW=Windows.Win32.WindowsAndMessaging
MenuItemFromPoint=Windows.Win32.WindowsAndMessaging
ModifyMenuA=Windows.Win32.WindowsAndMessaging
ModifyMenuW=Windows.Win32.WindowsAndMessaging
OemToCharA=Windows.Win32.WindowsAndMessaging
OemToCharBuffA=Windows.Win32.WindowsAndMessaging
OemToCharBuffW=Windows.Win32.WindowsAndMessaging
OemToCharW=Windows.Win32.WindowsAndMessaging
PrivateExtractIconsA=Windows.Win32.WindowsAndMessaging
PrivateExtractIconsW=Windows.Win32.WindowsAndMessaging
RemoveMenu=Windows.Win32.WindowsAndMessaging
SetCaretBlinkTime=Windows.Win32.WindowsAndMessaging
SetCaretPos=Windows.Win32.WindowsAndMessaging
SetCursor=Windows.Win32.WindowsAndMessaging
SetCursorPos=Windows.Win32.WindowsAndMessaging
SetMenu=Windows.Win32.WindowsAndMessaging
SetMenuDefaultItem=Windows.Win32.WindowsAndMessaging
SetMenuInfo=Windows.Win32.WindowsAndMessaging
SetMenuItemBitmaps=Windows.Win32.WindowsAndMessaging
SetMenuItemInfoA=Windows.Win32.WindowsAndMessaging
SetMenuItemInfoW=Windows.Win32.WindowsAndMessaging
SetPhysicalCursorPos=Windows.Win32.WindowsAndMessaging
SetSystemCursor=Windows.Win32.WindowsAndMessaging
ShowCaret=Windows.Win32.WindowsAndMessaging
ShowCursor=Windows.Win32.WindowsAndMessaging
TrackPopupMenu=Windows.Win32.WindowsAndMessaging
TrackPopupMenuEx=Windows.Win32.WindowsAndMessaging
TranslateAcceleratorA=Windows.Win32.WindowsAndMessaging
TranslateAcceleratorW=Windows.Win32.WindowsAndMessaging
wsprintfA=Windows.Win32.WindowsAndMessaging
wsprintfW=Windows.Win32.WindowsAndMessaging
wvsprintfA=Windows.Win32.WindowsAndMessaging
wvsprintfW=Windows.Win32.WindowsAndMessaging
ACCEL=Windows.Win32.WindowsAndMessaging
CURSORINFO=Windows.Win32.WindowsAndMessaging
CURSORSHAPE=Windows.Win32.WindowsAndMessaging
ICONINFO=Windows.Win32.WindowsAndMessaging
ICONINFOEXA=Windows.Win32.WindowsAndMessaging
ICONINFOEXW=Windows.Win32.WindowsAndMessaging
ICONMETRICSA=Windows.Win32.WindowsAndMessaging
ICONMETRICSW=Windows.Win32.WindowsAndMessaging
MDINEXTMENU=Windows.Win32.WindowsAndMessaging
MENUBARINFO=Windows.Win32.WindowsAndMessaging
MENUGETOBJECTINFO=Windows.Win32.WindowsAndMessaging
MENUINFO=Windows.Win32.WindowsAndMessaging
MENUITEMINFOA=Windows.Win32.WindowsAndMessaging
MENUITEMINFOW=Windows.Win32.WindowsAndMessaging
MENUITEMTEMPLATE=Windows.Win32.WindowsAndMessaging
MENUITEMTEMPLATEHEADER=Windows.Win32.WindowsAndMessaging
TPMPARAMS=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoA=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoExA=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoExW=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoSizeA=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoSizeExA=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoSizeExW=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoSizeW=Windows.Win32.WindowsAndMessaging
GetFileVersionInfoW=Windows.Win32.WindowsAndMessaging
VerFindFileA=Windows.Win32.WindowsAndMessaging
VerFindFileW=Windows.Win32.WindowsAndMessaging
VerInstallFileA=Windows.Win32.WindowsAndMessaging
VerInstallFileW=Windows.Win32.WindowsAndMessaging
VerLanguageNameA=Windows.Win32.WindowsAndMessaging
VerLanguageNameW=Windows.Win32.WindowsAndMessaging
VerQueryValueA=Windows.Win32.WindowsAndMessaging
VerQueryValueW=Windows.Win32.WindowsAndMessaging
eAVDecDDStereoDownMixMode=Windows.Win32.MediaFoundation
eAVEncAdaptiveMode=Windows.Win32.MediaFoundation
eAVEncH264PictureType=Windows.Win32.MediaFoundation
@ -24185,10 +24185,10 @@ ComDBOpen=Windows.Win32.SerialController
ComDBReleasePort=Windows.Win32.SerialController
ComDBResizeDatabase=Windows.Win32.SerialController
SerialDisplayAdvancedSettings=Windows.Win32.SerialController
ChangeServiceConfigA=Windows.Win32.Services
ChangeServiceConfigW=Windows.Win32.Services
CreateServiceA=Windows.Win32.Services
CreateServiceW=Windows.Win32.Services
ChangeServiceConfigA=Windows.Win32.SystemServices
ChangeServiceConfigW=Windows.Win32.SystemServices
CreateServiceA=Windows.Win32.SystemServices
CreateServiceW=Windows.Win32.SystemServices
LPDISPLAYVAL=Windows.Win32.ApplicationInstallationAndServicing
LPEVALCOMCALLBACK=Windows.Win32.ApplicationInstallationAndServicing
IValidate=Windows.Win32.ApplicationInstallationAndServicing

Просмотреть файл

@ -0,0 +1,112 @@
--with-type
DELETE=uint
READ_CONTROL=uint
WRITE_DAC=uint
WRITE_OWNER=uint
SYNCHRONIZE=uint
STANDARD_RIGHTS_REQUIRED=uint
STANDARD_RIGHTS_ALL=uint
SPECIFIC_RIGHTS_ALL=uint
ACCESS_SYSTEM_SECURITY=uint
MAXIMUM_ALLOWED=uint
GENERIC_READ=uint
GENERIC_WRITE=uint
GENERIC_EXECUTE=uint
GENERIC_ALL=uint
--rename
FORMAT_MESSAGE=FORMAT_MESSAGE_OPTIONS
VER_SET_CONDITION__c_=VER_CONDITION_MASK
--exclude
TRUE
FALSE
ClfsNullRecord
ClfsDataRecord
ClfsRestartRecord
ClsContainerInitializing
ClsContainerInactive
ClsContainerActive
ClsContainerActivePendingDelete
ClsContainerPendingArchive
ClsContainerPendingArchiveAndDelete
ClfsContainerInitializing
ClfsContainerInactive
ClfsContainerActive
ClfsContainerActivePendingDelete
ClfsContainerPendingArchive
ClfsContainerPendingArchiveAndDelete
CLFS_SCAN_INIT
CLFS_SCAN_FORWARD
CLFS_SCAN_BACKWARD
CLFS_SCAN_CLOSE
CLFS_SCAN_INITIALIZED
CLFS_SCAN_BUFFERED
CLFS_MAX_CONTAINER_INFO
NCRYPT_PIN_CACHE_PIN_BYTE_LENGTH,Eap;EapHost
WM_DEVICECHANGE,Base
BSM_ALLCOMPONENTS,Base
BSM_VXDS,Base
BSM_NETDRIVER,Base
BSM_INSTALLABLEDRIVERS,Base
BSM_APPLICATIONS,Base
BSF_QUERY,Base
BSF_IGNORECURRENTTASK,Base
BSF_FLUSHDISK,Base
BSF_NOHANG,Base
BSF_POSTMESSAGE,Base
BSF_FORCEIFHUNG,Base
BSF_NOTIMEOUTIFNOTHUNG,Base
NETWORK_APP_INSTANCE_CSV_FLAGS_VALID_ONLY_IF_CSV_COORDINATOR,Backup
JOB_OBJECT_LIMIT
CREDUI_FLAGS
CERT_COMPARE_SHIFT
CSBFT_CERTSERVER_DATABASE
CSBFT_CHECKPOINT_DIR
CSBFT_LOG_DIR
SECURITY_ANONYMOUS
SECURITY_CONTEXT_TRACKING
SECURITY_DELEGATION
SECURITY_EFFECTIVE_ONLY
SECURITY_IDENTIFICATION
SECURITY_IMPERSONATION
TVI_FIRST
TVI_LAST
TVI_ROOT
TVI_SORT
URL_OID_CERTIFICATE_ISSUER
URL_OID_CERTIFICATE_CRL_DIST_POINT
URL_OID_CERTIFICATE_CRL_DIST_POINT_AND_OCSP
URL_OID_CERTIFICATE_OCSP
URL_OID_CERTIFICATE_OCSP_AND_CRL_DIST_POINT
URL_OID_CERTIFICATE_ONLY_OCSP
URL_OID_CTL_ISSUER
URL_OID_CTL_NEXT_UPDATE
URL_OID_CRL_ISSUER
URL_OID_CERTIFICATE_FRESHEST_CRL
URL_OID_CRL_FRESHEST_CRL
URL_OID_CROSS_CERT_DIST_POINT
URL_OID_CROSS_CERT_SUBJECT_INFO_ACCESS
CONTEXT_OID_CERTIFICATE
CONTEXT_OID_CRL
CONTEXT_OID_CTL
CONTEXT_OID_PKCS7
CONTEXT_OID_CAPI2_ANY
CONTEXT_OID_OCSP_RESP
TIME_VALID_OID_GET_CTL
TIME_VALID_OID_GET_CRL
TIME_VALID_OID_GET_CRL_FROM_CERT
TIME_VALID_OID_GET_FRESHEST_CRL_FROM_CERT
TIME_VALID_OID_GET_FRESHEST_CRL_FROM_CRL
INVALID_HANDLE_VALUE
PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY
PROC_THREAD_ATTRIBUTE_HANDLE_LIST
PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR
PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY
PROC_THREAD_ATTRIBUTE_PARENT_PROCESS
PROC_THREAD_ATTRIBUTE_PREFERRED_NODE
PROC_THREAD_ATTRIBUTE_UMS_THREAD
PROC_THREAD_ATTRIBUTE_SECURITY_CAPABILITIES
PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL
PROC_THREAD_ATTRIBUTE_CHILD_PROCESS_POLICY
PROC_THREAD_ATTRIBUTE_DESKTOP_APP_POLICY
CSBFT_LOG
CSBFT_PATCH_FILE

Просмотреть файл

@ -73,9 +73,9 @@ LoadPackagedLibrary
<IncludeRoot>/um/vsmgmt.h
<IncludeRoot>/um/vsadmin.h
<IncludeRoot>/um/vsprov.h
<IncludeRoot>/um/devpkey.h
<IncludeRoot>/um/devpropdef.h
<IncludeRoot>/um/dispatcherqueue.h
<IncludeRoot>/um/libloaderapi.h
<IncludeRoot>/shared/winerror.h
--namespace
Windows.Win32.SystemServices

Просмотреть файл

@ -21,7 +21,6 @@ _GUID
<IncludeRoot>/um/ole2.h
<IncludeRoot>/um/OleDlg.h
<IncludeRoot>/um/urlmon.h
<IncludeRoot>/shared/winerror.h
<IncludeRoot>/um/combaseapi.h
<IncludeRoot>/um/ObjIdlbase.h
<IncludeRoot>/um/callobj.h

Просмотреть файл

@ -48,5 +48,6 @@
<IncludeRoot>/um/austream.h
<IncludeRoot>/um/ddstream.h
<IncludeRoot>/um/mmstream.h
<IncludeRoot>/um/vfwmsgs.h
--namespace
Windows.Win32.DirectShow

Просмотреть файл

@ -14,7 +14,7 @@
<IncludeRoot>/shared/strsafe.h
<IncludeRoot>/um/winver.h
--namespace
Windows.Win32.MenusAndResources
Windows.Win32.WindowsAndMessaging
--exclude
WINSTAENUMPROC
WINSTAENUMPROCA

Просмотреть файл

@ -39,7 +39,6 @@ _NavigateToPidl=_NavigateToPidl2
<IncludeRoot>/um/thumbnailstreamcache.h
<IncludeRoot>/um/shdeprecated.h
<IncludeRoot>/um/ImageTranscode.h
<IncludeRoot>/shared/intsafe.h
<IncludeRoot>/um/PathCch.h
<IncludeRoot>/um/ScrnSave.h
<IncludeRoot>/um/IntShCut.h

Просмотреть файл

@ -28,7 +28,6 @@ _DL_EUI48
<IncludeRoot>/um/winsock.h
<IncludeRoot>/um/NspAPI.h
<IncludeRoot>/um/WS2tcpip.h
<IncludeRoot>/um/wsipv6ok.h
<IncludeRoot>/um/socketapi.h
<IncludeRoot>/um/SpOrder.h
--namespace

42066
generation/scraper/enums.json Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -11,6 +11,11 @@ if (!$assemblyVersion)
$assemblyVersion = $defaultWinSDKNugetVersion
}
$constantsScraperPath = "$sourcesDir\ConstantsScraper"
$constantsScraperProj = "$constantsScraperPath\ConstantsScraper.csproj"
$constantsScraperPathBin = "$constantsScraperPath\bin\Release\netcoreapp3.1\ConstantsScraper.dll"
& dotnet build $constantsScraperProj -c Release
$clangSharpSourceToWinmdPath = "$sourcesDir\ClangSharpSourceToWinmd"
$clangSharpSourceToWinmdProj = "$clangSharpSourceToWinmdPath\ClangSharpSourceToWinmd.csproj"
$clangSharpSourceToWinmdBin = "$clangSharpSourceToWinmdPath\bin\Release\netcoreapp3.1\ClangSharpSourceToWinmd.dll"
@ -24,11 +29,22 @@ $metadataInteropBin = "$metadataInteropPath\bin\Release\netstandard2.1\Windows.W
Copy-Item $metadataInteropBin $binDir
$remapFileName = "$emitterDir\remap.rsp"
$enumsRemapFileName = "$emitterDir\generated\enumsRemap.rsp"
$autoTypesFileName = "$emitterDir\autoTypes.rsp"
$requiredNamespacesForNames = "$emitterDir\requiredNamespacesForNames.rsp"
$constantsScraperRsp = "$scraperDir\ConstantsScraper.rsp"
$manualEnumsJson = "$scraperDir\manualEnums.json"
$enumsJson = "$scraperDir\enums.json"
Write-Output "`n"
Write-Output "Scraping constants and enums..."
Write-Output "Calling: dotnet $constantsScraperPathBin --repoRoot rootDir --enumsJson $manualEnumsJson --enumsJson $enumsJson @$constantsScraperRsp @$requiredNamespacesForNames @$remapFileName"
& dotnet $constantsScraperPathBin --repoRoot $rootDir --enumsJson $manualEnumsJson --enumsJson $enumsJson @$constantsScraperRsp @$requiredNamespacesForNames @$remapFileName
Write-Output "`n"
Write-Output "Creating $outputWinmdFileName..."
Write-Output "Calling: dotnet $clangSharpSourceToWinmdBin --sourceDir $emitterDir --interopFileName $metadataInteropBin --outputFileName $outputWinmdFileName --version $assemblyVersion @$remapFileName @$requiredNamespacesForNames @$autoTypesFileName"
Write-Output "Calling: dotnet $clangSharpSourceToWinmdBin --sourceDir $emitterDir --interopFileName $metadataInteropBin --outputFileName $outputWinmdFileName --version $assemblyVersion @$remapFileName @$requiredNamespacesForNames @$autoTypesFileName @$enumsRemapFileName"
& dotnet $clangSharpSourceToWinmdBin --sourceDir $emitterDir --interopFileName $metadataInteropBin --outputFileName $outputWinmdFileName --version $assemblyVersion @$remapFileName @$requiredNamespacesForNames @$autoTypesFileName
& dotnet $clangSharpSourceToWinmdBin --sourceDir $emitterDir --interopFileName $metadataInteropBin --outputFileName $outputWinmdFileName --version $assemblyVersion @$remapFileName @$requiredNamespacesForNames @$autoTypesFileName @$enumsRemapFileName

Просмотреть файл

@ -67,3 +67,6 @@ Write-Output "`nLooking for duplicate types in $outputWinmdFileName..."
Write-Output "Calling: dotnet $winmdUtilsPathBin showDuplicateTypes --winmd $winmdPath"
& dotnet $winmdUtilsPathBin showDuplicateTypes --winmd $winmdPath
Write-Output "`nLooking for duplicate constants in $outputWinmdFileName..."
Write-Output "Calling: dotnet $winmdUtilsPathBin showDuplicateConstants --winmd $winmdPath"
& dotnet $winmdUtilsPathBin showDuplicateConstants --winmd $winmdPath

Просмотреть файл

@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClangSharpSourceToWinmd", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Win32MetadataInterop", "..\Win32MetadataInterop\Win32MetadataInterop.csproj", "{C08DB25A-5497-4CE2-82F2-2D8624283387}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinmdUtils", "..\WinmdUtils\WinmdUtils.csproj", "{6D8F0882-429D-4359-A3DD-CBD905D95C14}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -21,6 +23,10 @@ Global
{C08DB25A-5497-4CE2-82F2-2D8624283387}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C08DB25A-5497-4CE2-82F2-2D8624283387}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C08DB25A-5497-4CE2-82F2-2D8624283387}.Release|Any CPU.Build.0 = Release|Any CPU
{6D8F0882-429D-4359-A3DD-CBD905D95C14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D8F0882-429D-4359-A3DD-CBD905D95C14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D8F0882-429D-4359-A3DD-CBD905D95C14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D8F0882-429D-4359-A3DD-CBD905D95C14}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Просмотреть файл

@ -1,8 +1,8 @@
{
"profiles": {
"ClangSharpSourceToWinmd": {
"commandName": "Project",
"commandLineArgs": "-s $(ProjectDir)..\\..\\generation\\emitter -i $(ProjectDir)..\\Win32MetadataInterop\\bin\\Debug\\netstandard2.1\\Windows.Win32.Interop.dll -o $(ProjectDir)..\\..\\bin\\Windows.Win32.winmd -v 10.0.19041.5 @$(ProjectDir)..\\..\\generation\\emitter\\remap.rsp @$(ProjectDir)..\\..\\generation\\emitter\\requiredNamespacesForNames.rsp"
"commandName": "Project",
"commandLineArgs": "-s $(ProjectDir)..\\..\\generation\\emitter -i $(ProjectDir)..\\Win32MetadataInterop\\bin\\Debug\\netstandard2.1\\Windows.Win32.Interop.dll -o $(ProjectDir)..\\..\\bin\\Windows.Win32.winmd -v 10.0.19041.5 @$(ProjectDir)..\\..\\generation\\emitter\\remap.rsp @$(ProjectDir)..\\..\\generation\\emitter\\requiredNamespacesForNames.rsp @$(ProjectDir)..\\..\\generation\\emitter\\generated\\enumRemaps.rsp"
},
"TestSource": {
"commandName": "Project",

Просмотреть файл

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20371.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PartitionUtilsLib\PartitionUtilsLib.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConstantsScraper", "ConstantsScraper.csproj", "{39E2AD50-323F-4490-8B05-A6C6AFCC1443}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PartitionUtilsLib", "..\PartitionUtilsLib\PartitionUtilsLib.csproj", "{E82F7065-4797-4CD3-B8FD-71933B9A3FED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{39E2AD50-323F-4490-8B05-A6C6AFCC1443}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39E2AD50-323F-4490-8B05-A6C6AFCC1443}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39E2AD50-323F-4490-8B05-A6C6AFCC1443}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39E2AD50-323F-4490-8B05-A6C6AFCC1443}.Release|Any CPU.Build.0 = Release|Any CPU
{E82F7065-4797-4CD3-B8FD-71933B9A3FED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E82F7065-4797-4CD3-B8FD-71933B9A3FED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E82F7065-4797-4CD3-B8FD-71933B9A3FED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E82F7065-4797-4CD3-B8FD-71933B9A3FED}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {570EE57B-A467-4DAE-A45C-60EBE8A0872B}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,139 @@
using System.Collections.Generic;
using System.CommandLine;
using System.CommandLine.Invocation;
namespace ConstantsScraperApp
{
public static class Program
{
static int Main(string[] args)
{
var rootCommand = new RootCommand("Scrape traversed headers for constants.")
{
new Option<string>(new[] { "--repoRoot" }, "The location of the repo.") { IsRequired = true },
new Option(new string[] { "--exclude" }, "A constant to exclude.")
{
Argument = new Argument("<value>")
{
ArgumentType = typeof(string),
Arity = ArgumentArity.OneOrMore,
}
},
new Option(new string[] { "--requiredNamespaceForName", "-n" }, "The required namespace for a named item.")
{
Argument = new Argument("<name>=<value>")
{
ArgumentType = typeof(string),
Arity = ArgumentArity.OneOrMore,
}
},
new Option(new string[] { "--rename", "-m" }, "Rename an enum.")
{
Argument = new Argument("<name>=<value>")
{
ArgumentType = typeof(string),
Arity = ArgumentArity.OneOrMore,
}
},
new Option(new string[] { "--remap", "-r" }, "A field or parameter that should get remapped to a certain type.")
{
Argument = new Argument("<name>=<value>")
{
ArgumentType = typeof(string),
Arity = ArgumentArity.OneOrMore,
}
},
new Option(new string[] { "--with-type", "-t" }, "For a type for a constant.")
{
Argument = new Argument("<name>=<value>")
{
ArgumentType = typeof(string),
Arity = ArgumentArity.OneOrMore,
}
},
new Option(new string[] { "--enumsJson" }, "A json file with enum information.")
{
Argument = new Argument("<value>")
{
ArgumentType = typeof(string),
Arity = ArgumentArity.OneOrMore,
}
}
};
rootCommand.Handler = CommandHandler.Create(typeof(Program).GetMethod(nameof(Run)));
return rootCommand.Invoke(args);
}
public static int Run(InvocationContext context)
{
string repoRoot = context.ParseResult.ValueForOption<string>("repoRoot");
var excludeItems = context.ParseResult.ValueForOption<string[]>("exclude");
var enumJsonFiles = context.ParseResult.ValueForOption<string[]>("enumsJson");
var requiredNamespaceValuePairs = context.ParseResult.ValueForOption<string[]>("requiredNamespaceForName");
var renamedNameValuePairs = context.ParseResult.ValueForOption<string[]>("rename");
var remappedNameValuePairs = context.ParseResult.ValueForOption<string[]>("remap");
var withTypeValuePairs = context.ParseResult.ValueForOption<string[]>("with-type");
var exclusionNamesToPartitions = ConvertExclusionsToDictionary(excludeItems);
var requiredNamespaces = ConvertValuePairsToDictionary(requiredNamespaceValuePairs);
var remaps = ConvertValuePairsToDictionary(remappedNameValuePairs);
var renames = ConvertValuePairsToDictionary(renamedNameValuePairs);
var withTypes = ConvertValuePairsToDictionary(withTypeValuePairs);
PartitionUtilsLib.ConstantsScraper.ScrapeConstants(repoRoot, enumJsonFiles, exclusionNamesToPartitions, requiredNamespaces, remaps, withTypes, renames);
return 0;
}
private static Dictionary<string, string> ConvertValuePairsToDictionary(string[] items)
{
Dictionary<string, string> ret = new Dictionary<string, string>();
if (items != null)
{
foreach (var item in items)
{
if (string.IsNullOrEmpty(item))
{
continue;
}
int firstEqual = item.IndexOf('=');
if (firstEqual != -1)
{
string name = item.Substring(0, firstEqual);
string value = item.Substring(firstEqual + 1);
ret[name] = value;
}
}
}
return ret;
}
private static Dictionary<string, string> ConvertExclusionsToDictionary(string[] items)
{
Dictionary<string, string> ret = new Dictionary<string, string>();
if (items != null)
{
foreach (var item in items)
{
if (string.IsNullOrEmpty(item))
{
continue;
}
string[] parts = item.Split(',');
string name = parts[0];
string namespaces = parts.Length > 1 ? parts[1] : null;
ret[name] = namespaces;
}
}
return ret;
}
}
}

Просмотреть файл

@ -0,0 +1,8 @@
{
"profiles": {
"ConstantScraper": {
"commandName": "Project",
"commandLineArgs": "--repoRoot $(ProjectDir)..\\.. --enumsJson $(ProjectDir)..\\..\\generation\\scraper\\manualEnums.json --enumsJson $(ProjectDir)..\\..\\generation\\scraper\\enums.json @$(ProjectDir)..\\..\\generation\\scraper\\ConstantScraper.rsp @$(ProjectDir)..\\..\\generation\\emitter\\requiredNamespacesForNames.rsp @$(ProjectDir)..\\..\\generation\\emitter\\remap.rsp"
}
}
}

Просмотреть файл

@ -0,0 +1,155 @@
using System;
using System.Collections.Generic;
using System.IO;
namespace PartitionUtilsLib
{
public class ConstantWriter : IDisposable
{
private string path;
private string @namespace;
private StreamWriter writer;
private Dictionary<string, string> namesToValues = new Dictionary<string, string>();
public ConstantWriter(string path, string @namespace)
{
this.path = path;
this.@namespace = @namespace;
this.namesToValues["TRUE"] = "1";
this.namesToValues["FALSE"] = "0";
}
public void AddValue(string type, string name, string valueText)
{
this.EnsureStarted();
this.namesToValues[name] = valueText;
this.writer.WriteLine(
$" public const {type} {name} = {valueText};");
this.writer.WriteLine();
}
public static string FixIntValueText(bool forceUnsigned, ref string type, string valueText)
{
bool signed = false;
bool is64Bit = false;
if (valueText.EndsWith("UL") || valueText.EndsWith("ul"))
{
signed = false;
valueText = valueText.Substring(0, valueText.Length - 2);
}
else if (valueText.EndsWith('L') || valueText.EndsWith('l'))
{
signed = true;
valueText = valueText.Substring(0, valueText.Length - 1);
}
if (valueText.StartsWith('-'))
{
signed = true;
}
if (type == "int" || type == "long")
{
signed = true;
}
if (forceUnsigned)
{
signed = false;
}
if (valueText.StartsWith("0x"))
{
bool uncheckedNeeded;
if (valueText.Length > 10)
{
ulong value = ulong.Parse(valueText.Substring(2), System.Globalization.NumberStyles.HexNumber);
is64Bit = true;
uncheckedNeeded = signed && value > long.MaxValue;
}
else
{
uint value = uint.Parse(valueText.Substring(2), System.Globalization.NumberStyles.HexNumber);
uncheckedNeeded = signed && value > int.MaxValue;
}
if (uncheckedNeeded)
{
valueText = $"unchecked((int){valueText})";
}
}
if (!is64Bit)
{
type = signed ? "int" : "uint";
}
else
{
type = signed ? "long" : "ulong";
}
return valueText;
}
public void AddInt(string forceType, string nativeTypeName, string name, string valueText)
{
if (this.namesToValues.ContainsKey(name))
{
return;
}
string type = null;
if (nativeTypeName == "HRESULT" || nativeTypeName == "LPCWSTR" || nativeTypeName == "HWND")
{
type = "int";
}
bool forceUnsigned = forceType == "uint" || forceType == "ulong";
valueText = FixIntValueText(forceUnsigned, ref type, valueText);
if (nativeTypeName != null)
{
this.writer.WriteLine(
$" [NativeTypeName(\"{nativeTypeName}\")]");
}
string finalType = forceType != null ? forceType : type;
this.AddValue(finalType, name, valueText);
}
private void EnsureStarted()
{
if (this.writer == null)
{
this.writer = new StreamWriter(this.path);
this.writer.WriteLine(
@$"using Windows.Win32.Interop;
namespace {this.@namespace}
{{
public static partial class Apis
{{");
}
}
public void Dispose()
{
if (this.writer != null)
{
this.writer.WriteLine(
@" }
}");
this.writer.Close();
this.writer.Dispose();
this.writer = null;
}
}
}
}

Просмотреть файл

@ -0,0 +1,659 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace PartitionUtilsLib
{
public static class ConstantsScraper
{
public static void ScrapeConstants(
string repoRoot,
string[] enumJsonFiles,
Dictionary<string, string> exclusionNamesToPartitions,
Dictionary<string, string> requiredNamespaces,
Dictionary<string, string> remaps,
Dictionary<string, string> withTypes,
Dictionary<string, string> renames)
{
using ConstantsScraperImpl imp = new ConstantsScraperImpl();
imp.ScrapeConstants(repoRoot, enumJsonFiles, exclusionNamesToPartitions, requiredNamespaces, remaps, withTypes, renames);
}
private class ConstantsScraperImpl : IDisposable
{
private static readonly Regex DefineRegex =
new Regex(
@"^#define\s+([A-Z][\dA-Z_]+)\s+(.+)");
private static readonly Regex DefineConstantRegex =
new Regex(
@"^((_HRESULT_TYPEDEF_|_NDIS_ERROR_TYPEDEF_)\(((?:0x)?[\da-f]+L?)\)|(\(HRESULT\)((?:0x)?[\da-f]+L?))|(-?\d+\.\d+(?:e\+\d+)?f?)|((?:0x[\da-f]+|\-?\d+)(?:UL|L)?)|((\d+)\s*(<<\s*\d+))|(MAKEINTRESOURCE\(\s*(\-?\d+)\s*\))|(\(HWND\)(-?\d+)))$", RegexOptions.IgnoreCase);
private Dictionary<string, EnumWriter> namespacesToEnumWriters = new Dictionary<string, EnumWriter>();
private Dictionary<string, ConstantWriter> namespacesToConstantWriters = new Dictionary<string, ConstantWriter>();
private Dictionary<string, string> requiredNamespaces;
private Dictionary<string, string> writtenConstants = new Dictionary<string, string>();
private string repoRoot;
private List<EnumObject> enumObjectsFromJsons;
private Dictionary<string, List<EnumObject>> enumMemberNameToEnumObj;
public ConstantsScraperImpl()
{
}
public void ScrapeConstants(
string repoRoot,
string[] enumJsonFiles,
Dictionary<string, string> exclusionNamesToPartitions,
Dictionary<string, string> requiredNamespaces,
Dictionary<string, string> remaps,
Dictionary<string, string> withTypes,
Dictionary<string, string> renames)
{
this.requiredNamespaces = requiredNamespaces;
this.repoRoot = Path.GetFullPath(repoRoot);
this.LoadEnumObjectsFromJsonFiles(enumJsonFiles);
this.ScrapeConstantsFromTraversedFiles(exclusionNamesToPartitions, withTypes);
this.WriteEnumsAndRemaps(remaps, renames);
}
public void Dispose()
{
foreach (var enumWriter in namespacesToEnumWriters.Values)
{
enumWriter.Dispose();
}
namespacesToEnumWriters.Clear();
foreach (var constantWriter in namespacesToConstantWriters.Values)
{
constantWriter.Dispose();
}
namespacesToConstantWriters.Clear();
}
private static Dictionary<string, string> GetAutoValueReplacements()
{
Dictionary<string, string> ret = new Dictionary<string, string>();
ret["TRUE"] = "1";
ret["FALSE"] = "0";
ret["( (DWORD) (-1) )"] = "0xFFFFFFFF";
return ret;
}
private static void MergeObjIntoOther(EnumObject src, EnumObject dest, Dictionary<string, List<EnumObject>> memberMap)
{
foreach (var m in src.members)
{
if (StringComparer.OrdinalIgnoreCase.Equals(m.name, "None"))
{
continue;
}
dest.AddIfNotSet(m.name, m.value);
if (!memberMap.TryGetValue(m.name, out var oList))
{
oList = new List<EnumObject>();
oList.Add(dest);
}
else
{
if (oList.Contains(src))
{
oList.Remove(src);
}
if (!oList.Contains(dest))
{
oList.Add(dest);
}
}
}
foreach (var u in src.uses)
{
dest.AddUse(u);
}
}
private static Dictionary<string, List<EnumObject>> LoadMemberNameToEnumObjMap(List<EnumObject> enumObjects)
{
Dictionary<string, List<EnumObject>> enumMemberNameToEnumObj = new Dictionary<string, List<EnumObject>>();
foreach (var obj in enumObjects)
{
foreach (var member in obj.members)
{
if (StringComparer.OrdinalIgnoreCase.Equals(member.name, "None"))
{
continue;
}
if (!enumMemberNameToEnumObj.TryGetValue(member.name, out var objList))
{
objList = new List<EnumObject>();
enumMemberNameToEnumObj[member.name] = objList;
objList.Add(obj);
}
else
{
var mergingTo = objList[0];
MergeObjIntoOther(obj, mergingTo, enumMemberNameToEnumObj);
}
}
}
return enumMemberNameToEnumObj;
}
private static List<EnumObject> LoadEnumsFromJsonFiles(string[] enumJsonFiles)
{
List<EnumObject> enumObjects = new List<EnumObject>();
if (enumJsonFiles != null)
{
foreach (var enumJsonFile in enumJsonFiles)
{
enumObjects.AddRange(EnumObjectUtils.NormalizeEnumObjects(EnumObject.LoadFromFile(enumJsonFile)));
}
}
return enumObjects;
}
private static List<EnumObject> LoadEnumsFromSourceFiles(string sourcesDir)
{
List<EnumObject> enumObjects = new List<EnumObject>();
foreach (var file in Directory.GetFiles(sourcesDir, "*.cs"))
{
enumObjects.AddRange(EnumObject.LoadFromFile(file));
}
return enumObjects;
}
private static string StripComments(string rawValue)
{
int commentIndex = rawValue.IndexOf("//");
if (commentIndex != -1)
{
rawValue = rawValue.Substring(0, commentIndex).Trim();
}
commentIndex = rawValue.IndexOf("/*");
if (commentIndex != -1)
{
rawValue = rawValue.Substring(0, commentIndex).Trim();
}
return rawValue;
}
private void AddConstantValue(string originalNamespace, string type, string name, string valueText)
{
if (this.writtenConstants.ContainsKey(name))
{
return;
}
var writer = this.GetConstantWriter(originalNamespace, name);
writer.AddValue(type, name, valueText);
this.writtenConstants[name] = valueText;
}
private void AddConstantInteger(string originalNamespace, string forceType, string nativeTypeName, string name, string valueText)
{
if (this.writtenConstants.ContainsKey(name))
{
return;
}
var writer = this.GetConstantWriter(originalNamespace, name);
writer.AddInt(forceType, nativeTypeName, name, valueText);
this.writtenConstants[name] = valueText;
}
private ConstantWriter GetConstantWriter(string originalNamespace, string name)
{
string foundNamespace = originalNamespace;
if (this.requiredNamespaces.TryGetValue(name, out var newNamspace))
{
foundNamespace = newNamspace;
}
if (!this.namespacesToConstantWriters.TryGetValue(foundNamespace, out var constantWriter))
{
string partConstantsFile = Path.Combine(repoRoot, $@"generation\emitter\generated\{foundNamespace}.constants.cs");
if (File.Exists(partConstantsFile))
{
File.Delete(partConstantsFile);
}
constantWriter = new ConstantWriter(partConstantsFile, foundNamespace);
this.namespacesToConstantWriters.Add(foundNamespace, constantWriter);
}
return constantWriter;
}
private HashSet<string> GetManualEnumNames()
{
string manualSourceFiles = Path.Combine(repoRoot, $@"generation\emitter\manual");
List<EnumObject> enumObjectsFromManualSources = LoadEnumsFromSourceFiles(manualSourceFiles);
HashSet<string> manualEnumNames = new HashSet<string>();
foreach (var obj in enumObjectsFromManualSources)
{
manualEnumNames.Add(obj.name);
}
return manualEnumNames;
}
private void LoadEnumObjectsFromJsonFiles(string[] enumJsonFiles)
{
// Load the enums scraped from the docs
this.enumObjectsFromJsons = LoadEnumsFromJsonFiles(enumJsonFiles);
// Load a map from member names to enum obj
// This will merge up and objects that share the same members
this.enumMemberNameToEnumObj = LoadMemberNameToEnumObjMap(enumObjectsFromJsons);
}
private void ScrapeConstantsFromTraversedFiles(
Dictionary<string, string> exclusionNamesToPartitions,
Dictionary<string, string> withTypes)
{
var autoReplacements = GetAutoValueReplacements();
RepoInfo repoInfo = new RepoInfo(repoRoot);
// For each partition, scrape the constants
foreach (var partInfo in repoInfo.GetPartitionInfos())
{
// File path to constants for the partition
string partConstantsFile = Path.Combine(repoRoot, $@"generation\emitter\generated\{partInfo.Name}.constants.cs");
if (File.Exists(partConstantsFile))
{
File.Delete(partConstantsFile);
}
string currentNamespace = partInfo.Namespace;
// For each traversed header, scrape the constants
foreach (var header in partInfo.GetTraverseHeaders(true))
{
if (!File.Exists(header))
{
continue;
}
string currentHeaderName = Path.GetFileName(header).ToLowerInvariant();
List<EnumObject> autoEnumObjsForCurrentHeader =
new List<EnumObject>(enumObjectsFromJsons.Where(e => e.autoPopulate != null && e.autoPopulate.header.ToLowerInvariant() == currentHeaderName));
Regex autoPopulateReg = null;
if (autoEnumObjsForCurrentHeader.Count != 0)
{
StringBuilder autoPopulateRegexPattern = new StringBuilder();
foreach (var autoEnumObj in autoEnumObjsForCurrentHeader)
{
if (autoPopulateRegexPattern.Length != 0)
{
autoPopulateRegexPattern.Append('|');
}
autoPopulateRegexPattern.Append($"(^{autoEnumObj.autoPopulate.filter})");
}
autoPopulateReg = new Regex(autoPopulateRegexPattern.ToString());
}
string continuation = null;
foreach (string currentLine in File.ReadAllLines(header))
{
string line = continuation == null ? currentLine : continuation + currentLine;
if (line.EndsWith("\\"))
{
continuation = line.Substring(0, line.Length - 1);
continue;
}
continuation = null;
var defineMatch = DefineRegex.Match(line);
// Skip if not #define ...
if (!defineMatch.Success)
{
continue;
}
string name = defineMatch.Groups[1].Value;
// If it's in the exclusion list see if we should ignore it based on the
// current partition
if (exclusionNamesToPartitions.TryGetValue(name, out var partitions))
{
bool shouldIgnore = partitions == null;
if (!shouldIgnore)
{
string[] parts = partitions.Split(';');
foreach (var part in parts)
{
if (StringComparer.OrdinalIgnoreCase.Equals(part, partInfo.Name))
{
shouldIgnore = true;
}
}
}
if (shouldIgnore)
{
continue;
}
}
// Get rid of trailing comments
string rawValue = StripComments(defineMatch.Groups[2].Value.Trim());
if (autoReplacements.TryGetValue(rawValue, out var updatedRawValue))
{
rawValue = updatedRawValue;
}
string fixedRawValue = rawValue;
// Get rid of enclosing parens. Makes it easier to parse with regex
if (fixedRawValue.StartsWith('(') && fixedRawValue.EndsWith(')'))
{
fixedRawValue = fixedRawValue.Substring(1, rawValue.Length - 2).Trim();
}
// See if matches one of our well known constants formats
var match = DefineConstantRegex.Match(fixedRawValue);
string valueText;
string nativeTypeName = null;
if (match.Success)
{
// #define E_UNEXPECTED _HRESULT_TYPEDEF_(0x8000FFFF)
if (!string.IsNullOrEmpty(match.Groups[2].Value))
{
if (match.Groups[2].Value == "_HRESULT_TYPEDEF_")
{
nativeTypeName = "HRESULT";
}
valueText = match.Groups[3].Value;
}
// #define E_UNEXPECTED ((HRESULT)0x8000FFFF)
else if (!string.IsNullOrEmpty(match.Groups[5].Value))
{
nativeTypeName = "HRESULT";
valueText = match.Groups[5].Value;
}
// #define DXGI_RESOURCE_PRIORITY_MINIMUM ( 0x28000000 )
else if (!string.IsNullOrEmpty(match.Groups[7].Value))
{
valueText = match.Groups[7].Value;
}
// 1.0, -2.0f
else if (!string.IsNullOrEmpty(match.Groups[6].Value))
{
valueText = match.Groups[6].Value;
string type = valueText.EndsWith('f') ? "float" : "double";
this.AddConstantValue(currentNamespace, type, name, valueText);
continue;
}
// 1 << 5
else if (!string.IsNullOrEmpty(match.Groups[8].Value))
{
string part1 = match.Groups[9].Value + "u";
string part2 = match.Groups[10].Value;
valueText = part1 + part2;
}
// MAKEINTRESOURCE(-4)
else if (!string.IsNullOrEmpty(match.Groups[11].Value))
{
nativeTypeName = "LPCWSTR";
valueText = match.Groups[12].Value;
this.AddConstantInteger(currentNamespace, null, nativeTypeName, name, valueText);
continue;
}
// (HWND)-4
else if (!string.IsNullOrEmpty(match.Groups[13].Value))
{
nativeTypeName = "HWND";
valueText = match.Groups[14].Value;
this.AddConstantInteger(currentNamespace, null, nativeTypeName, name, valueText);
continue;
}
else
{
continue;
}
}
else
{
valueText = rawValue;
// Don't do anything with strings. They can't be part of enums
if (valueText.StartsWith('"') || valueText.StartsWith("L\"") || valueText.StartsWith("__TEXT"))
{
continue;
}
valueText = valueText.Replace("(DWORD)", "(uint)");
}
bool updatedEnum = false;
// If we see the member is part of an enum, update the member value
if (enumMemberNameToEnumObj.TryGetValue(name, out var enumObjList))
{
foreach (var enumObj in enumObjList)
{
enumObj.AddIfNotSet(name, valueText);
updatedEnum = true;
}
}
if (autoPopulateReg != null)
{
Match autoPopulate = autoPopulateReg.Match(name);
if (autoPopulate.Success)
{
for (int i = 1; i < autoPopulate.Groups.Count; i++)
{
if (!string.IsNullOrEmpty(autoPopulate.Groups[i].Value))
{
var foundObjEnum = autoEnumObjsForCurrentHeader[i - 1];
foundObjEnum.AddIfNotSet(name, valueText);
updatedEnum = true;
if (!enumMemberNameToEnumObj.TryGetValue(name, out var list))
{
list = new List<EnumObject>();
enumMemberNameToEnumObj.Add(name, list);
list.Add(foundObjEnum);
}
else
{
var needMerging = list.Where(o => o != foundObjEnum).ToArray();
foreach (var src in needMerging)
{
MergeObjIntoOther(src, foundObjEnum, enumMemberNameToEnumObj);
}
list.Clear();
list.Add(foundObjEnum);
}
break;
}
}
}
}
// If we haven't used the member to update an enum, skip it...
// ...unless it's an HRESULT or error code. Always emit them as constants too
if (match.Success && (!updatedEnum || nativeTypeName != null || name.StartsWith("ERROR_")))
{
withTypes.TryGetValue(name, out var forceType);
this.AddConstantInteger(currentNamespace, forceType, nativeTypeName, name, valueText);
}
}
}
}
}
private void WriteEnumsAndRemaps(
Dictionary<string, string> remaps,
Dictionary<string, string> renames)
{
// Output the enums and the rsp entries that map parameters and fields to use
// enum names
var enumRemapsFileName = Path.Combine(repoRoot, $@"generation\emitter\generated\enumsRemap.rsp");
using StreamWriter enumRemapsWriter = new StreamWriter(enumRemapsFileName);
enumRemapsWriter.WriteLine("--remap");
HashSet<string> manualEnumNames = GetManualEnumNames();
// For each enum object...
foreach (var obj in enumObjectsFromJsons)
{
if (renames.TryGetValue(obj.name, out var newName))
{
obj.name = newName;
}
// Skip if no members
if (obj.members.Count == 0)
{
continue;
}
string foundNamespace = null;
List<string> remapsToAdd = new List<string>();
// For each use in an enum...
foreach (var use in obj.uses)
{
string lookupNameForNamespace;
string remapName = use.ToString();
// lookupNameForNamespace = the name to use to lookup the namespace
// remapName = used in .rsp to map a param or field to use the enum
if (use.@interface != null)
{
lookupNameForNamespace = use.@interface;
}
else if (use.method != null)
{
lookupNameForNamespace = use.method;
}
else
{
lookupNameForNamespace = use.@struct;
}
// If we haven't found a namespace yet, try to look it up
if (foundNamespace == null)
{
requiredNamespaces.TryGetValue(lookupNameForNamespace, out foundNamespace);
}
// If we don't already have a remap entry for this param or field, add one
if (!remaps.ContainsKey(remapName))
{
remapsToAdd.Add(remapName);
}
}
if (foundNamespace == null)
{
foundNamespace = "Windows.Win32.SystemServices";
}
// If the enum name didn't already exist in the manual enums, and (if the enum has uses or
// is an auto-populate), write the enum
bool shouldWriteEnum =
!manualEnumNames.Contains(obj.name) && (remapsToAdd.Count != 0 || obj.autoPopulate != null);
if (!shouldWriteEnum)
{
continue;
}
// Lookup the enum writer in the cache or add it if we can't find it
if (!namespacesToEnumWriters.TryGetValue(foundNamespace, out var enumWriter))
{
string fixedNamespaceName = foundNamespace.Replace("Windows.Win32.", string.Empty);
string enumFile = Path.Combine(repoRoot, $@"generation\emitter\generated\{fixedNamespaceName}.enums.cs");
if (File.Exists(enumFile))
{
File.Delete(enumFile);
}
enumWriter = new EnumWriter(enumFile, foundNamespace);
namespacesToEnumWriters.Add(foundNamespace, enumWriter);
}
EnumObject objectForRemap = obj;
if (obj.autoPopulate == null)
{
foreach (var member in obj.members)
{
if (enumMemberNameToEnumObj.TryGetValue(member.name, out var list))
{
objectForRemap = list.Where(e => e.autoPopulate != null).FirstOrDefault();
if (objectForRemap == null)
{
objectForRemap = list.Where(e => e.members.Any(m => m.value != null)).FirstOrDefault();
if (objectForRemap == null)
{
objectForRemap = obj;
}
}
break;
}
}
}
bool addedEnum = false;
bool convergedToOtherObj = obj != objectForRemap;
if (!convergedToOtherObj)
{
addedEnum = enumWriter.AddEnum(obj);
}
if (addedEnum || convergedToOtherObj)
{
foreach (var remap in remapsToAdd)
{
enumRemapsWriter.WriteLine($"{remap}={objectForRemap.name}");
remaps.TryAdd(remap, objectForRemap.name);
}
}
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,222 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace PartitionUtilsLib
{
public class EnumObject
{
public static IEnumerable<EnumObject> LoadFromFile(string fileName)
{
string ext = Path.GetExtension(fileName);
if (ext == ".cs")
{
return EnumObjFromCSharpDeserializer.DeserializeObjects(fileName);
}
else if (ext == ".json")
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<EnumObject[]>(File.ReadAllText(fileName));
}
else
{
throw new ArgumentException();
}
}
public string @namespace { get; set; }
public string type { get; set; }
public bool finished { get; set; }
public string name { get; set; }
public bool flags { get; set; }
public AutoPopulate autoPopulate { get; set; }
public List<Member> members { get; } = new List<Member>();
public List<Use> uses { get; } = new List<Use>();
public override string ToString()
{
if (this.@namespace != null)
{
return $"{@namespace}.{name}";
}
else
{
return this.name;
}
}
public class AutoPopulate
{
public string filter { get; set; }
public string header { get; set; }
}
public class Member
{
public string name { get; set; }
public string value { get; set; }
public override string ToString()
{
if (this.value == null)
{
return $"{name} = null";
}
else
{
return $"{name} = {value}";
}
}
}
public class Use
{
public string @interface { get; set; }
public string method { get; set; }
public string parameter { get; set; }
public string @struct { get; set; }
public string field { get; set; }
public override string ToString()
{
if (method != null)
{
if (@interface != null)
{
return $"{@interface}::{method}::{parameter}";
}
else
{
return $"{method}::{parameter}";
}
}
else
{
return $"{@struct}::{field}";
}
}
}
private static class EnumObjFromCSharpDeserializer
{
public static IEnumerable<EnumObject> DeserializeObjects(string sourceFile)
{
TreeWalker walker = new TreeWalker();
return walker.GetEnumObjects(sourceFile);
}
private class TreeWalker : CSharpSyntaxWalker
{
private string currentNamespace;
private List<EnumObject> enumObjects = new List<EnumObject>();
public IEnumerable<EnumObject> GetEnumObjects(string fileName)
{
var tree = CSharpSyntaxTree.ParseText(File.ReadAllText(fileName), null, fileName);
this.Visit(tree.GetRoot());
return enumObjects;
}
public override void VisitNamespaceDeclaration(NamespaceDeclarationSyntax node)
{
this.currentNamespace = node.Name.ToString();
base.VisitNamespaceDeclaration(node);
}
public override void VisitEnumDeclaration(EnumDeclarationSyntax node)
{
base.VisitEnumDeclaration(node);
EnumObject enumObject = new EnumObject();
enumObject.@namespace = this.currentNamespace;
enumObject.name = node.Identifier.ValueText;
enumObject.flags = node.AttributeLists.Any(list => list.Attributes.Any(attr => attr.Name.ToString().StartsWith("Flags")));
foreach (EnumMemberDeclarationSyntax member in node.Members)
{
EnumObject.Member m = new EnumObject.Member();
m.name = member.Identifier.ValueText;
if (member.EqualsValue != null)
{
m.value = member.EqualsValue.Value.ToString();
}
enumObject.members.Add(m);
}
this.enumObjects.Add(enumObject);
}
}
}
public void AddUse(Use use)
{
var foundUse = this.uses.FirstOrDefault(u => u.ToString() == use.ToString());
if (foundUse == null)
{
Use newUse = new Use() { field = use.field, @interface = use.@interface, method = use.method, parameter = use.parameter, @struct = use.@struct };
this.uses.Add(newUse);
}
}
private void AddMember(string name, string valueText)
{
this.members.Add(new Member() { name = name, value = valueText });
}
public void AddIfNotSet(string name, string valueText)
{
var member = this.members.FirstOrDefault(m => m.name == name);
if (member == null)
{
this.AddMember(name, valueText);
}
else
{
if (string.IsNullOrEmpty(member.value))
{
member.value = valueText;
}
}
}
public void AddOrUpdateMember(string name, string valueText)
{
if (!this.UpdateMember(name, valueText))
{
this.AddMember(name, valueText);
}
}
public bool CanOverrideValue => this.autoPopulate == null;
public bool UpdateMember(string name, string valueText)
{
if (this.finished || string.IsNullOrEmpty(valueText))
{
return true;
}
for (int i = 0; i < this.members.Count; i++)
{
if (this.members[i].name == name)
{
if (this.CanOverrideValue || string.IsNullOrEmpty(this.members[i].value))
{
this.members[i].value = valueText;
}
return true;
}
}
return false;
}
}
}

Просмотреть файл

@ -0,0 +1,137 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace PartitionUtilsLib
{
public static class EnumObjectUtils
{
private static readonly Regex CamelCaseWordsRegex = new Regex(@"[A-Z][a-z]*");
public static IEnumerable<EnumObject> NormalizeEnumObjects(IEnumerable<EnumObject> objects)
{
Dictionary<string, int> names = new Dictionary<string, int>();
foreach (var obj in objects)
{
if (obj.members.Count > 0 && obj.members[0].name == "TRUE")
{
continue;
}
var fixedObj = Normalize(obj);
string currentName = fixedObj.name;
if (names.TryGetValue(currentName, out int nameCount))
{
nameCount++;
fixedObj.name += $"_{nameCount}";
}
names[currentName] = nameCount;
yield return fixedObj;
}
}
public static EnumObject Normalize(EnumObject enumObject)
{
EnumObject fixedObject = Newtonsoft.Json.JsonConvert.DeserializeObject<EnumObject>(Newtonsoft.Json.JsonConvert.SerializeObject(enumObject));
if (fixedObject.name != null && fixedObject.name.Contains('.'))
{
fixedObject.name = fixedObject.name.Replace('.', '_');
}
var firstUse = fixedObject.uses.FirstOrDefault();
if (firstUse == null)
{
return fixedObject;
}
if (fixedObject.name == null || !fixedObject.name.Contains('_'))
{
List<string> namesToMatch = new List<string>();
const int MaxToCheck = 4;
for (int i = 0; i < fixedObject.uses.Count; i++)
{
var use = fixedObject.uses[i];
if (use.method != null)
{
namesToMatch.Add(use.method);
if (namesToMatch.Count == MaxToCheck)
{
break;
}
}
}
string varName = firstUse.method != null ? firstUse.parameter : firstUse.field;
string matchedName = GetCommonCamelCaseName(namesToMatch.ToArray());
if (string.IsNullOrEmpty(matchedName))
{
matchedName = firstUse.method != null ? firstUse.method : firstUse.@struct;
}
fixedObject.name = $"{matchedName}_{varName}";
}
foreach (var member in fixedObject.members)
{
if (int.TryParse(member.name, out var value))
{
string name = firstUse.parameter != null ? firstUse.parameter : firstUse.field;
member.value = member.name;
member.name = $"{name}{value}";
}
}
return fixedObject;
}
private static string GetCommonCamelCaseName(string[] names)
{
if (names.Length == 0)
{
return null;
}
if (names.Length == 1)
{
return names[0];
}
List<string> matchingParts = new List<string>();
matchingParts.AddRange(GetCamelCaseParts(names[0]));
for (int i = 1; i < names.Length; i++)
{
string[] currentParts = GetCamelCaseParts(names[i]);
if (matchingParts.Count > currentParts.Length)
{
matchingParts.RemoveRange(currentParts.Length, matchingParts.Count - currentParts.Length);
}
for (int partIndex = 0; partIndex < currentParts.Length && partIndex < matchingParts.Count; partIndex++)
{
if (matchingParts[partIndex] != currentParts[partIndex])
{
matchingParts.RemoveRange(partIndex, matchingParts.Count - partIndex);
break;
}
}
}
return string.Join(string.Empty, matchingParts.ToArray());
}
private static string[] GetCamelCaseParts(string name)
{
List<string> parts = new List<string>();
foreach (Match match in CamelCaseWordsRegex.Matches(name))
{
parts.Add(match.Groups[0].Value);
}
return parts.ToArray();
}
}
}

Просмотреть файл

@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace PartitionUtilsLib
{
public class EnumWriter : IDisposable
{
private string path;
private string @namespace;
private StreamWriter writer;
private Dictionary<string, string> namesToValues = new Dictionary<string, string>();
public EnumWriter(string path, string @namespace)
{
this.path = path;
this.@namespace = @namespace;
}
public bool AddEnum(EnumObject enumObject)
{
if (!enumObject.members.Any(m => m.value != null))
{
// Skip if we have no values to write
return false;
}
this.EnsureStarted();
if (enumObject.flags)
{
this.writer.WriteLine(
$" [Flags]");
}
string type = "uint";
bool forceUnsigned = enumObject.flags;
StringWriter enumBodyWriter = new StringWriter();
foreach (var member in enumObject.members.Where(m => m.value != null))
{
var currentType = type;
string valueText = ConstantWriter.FixIntValueText(forceUnsigned, ref currentType, member.value);
enumBodyWriter.Write(
$@" {member.name} = {valueText};
");
// Make the type more specific if it's signed
if (currentType != type && (type != "int" && type != "long"))
{
type = currentType;
}
}
if (enumObject.type != null)
{
type = enumObject.type;
}
string typePart = type != "int" ? $" : {type}" : string.Empty;
this.writer.WriteLine(
$@" public enum {enumObject.name}{typePart}
{{");
this.writer.Write(enumBodyWriter.ToString());
this.writer.WriteLine(
$@" }}
");
return true;
}
private void EnsureStarted()
{
if (this.writer == null)
{
this.writer = new StreamWriter(this.path);
this.writer.WriteLine(
@$"using System;
using Windows.Win32.Interop;
using static {this.@namespace}.Apis;
namespace {this.@namespace}
{{");
}
}
public void Dispose()
{
if (this.writer != null)
{
this.writer.WriteLine(
"}");
this.writer.Close();
this.writer.Dispose();
this.writer = null;
}
}
}
}

Просмотреть файл

@ -0,0 +1,174 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
namespace PartitionUtilsLib
{
public class PartitionInfo
{
private RepoInfo repoInfo;
private string partitionName;
private List<string> visitedHeaders;
private List<string> traverseHeaders;
private string incRoot;
public PartitionInfo(RepoInfo repoInfo, string partitionName)
{
this.repoInfo = repoInfo;
this.partitionName = partitionName;
}
public void EnsureSettingsUsingNamspace()
{
if (this.Namespace == null)
{
File.AppendAllText(this.SettingsFile, $"--namespace\r\n{this.DefaultNamespaceName}\r\n");
}
}
public IEnumerable<string> GetSettingsValues(string settingsName)
{
bool inSettingsName = false;
foreach (string line in File.ReadAllLines(this.SettingsFile))
{
if (line.StartsWith("--"))
{
inSettingsName = line == settingsName;
continue;
}
if (inSettingsName)
{
yield return line;
}
}
}
public string Namespace
{
get
{
var values = this.GetSettingsValues("--namespace");
return values.FirstOrDefault();
}
}
public void AddTraverseHeader(string header)
{
var oldLines = File.ReadAllLines(this.SettingsFile);
bool foundTraverseBlock = false;
using (StreamWriter writer = new StreamWriter(this.SettingsFile))
{
foreach (string line in oldLines)
{
writer.WriteLine(line);
if (!foundTraverseBlock && line == "--traverse")
{
foundTraverseBlock = true;
writer.WriteLine($"<IncludeRoot>{header.Replace('\\', '/')}");
}
}
}
}
private static readonly Regex VisitingHeaderRegex = new Regex(@"Info: Visiting (.+)(\/(?:um|shared|winrt)\/[^\r\n]+)");
private static readonly Regex FilesInSettingsRspRegex = new Regex(@".+(\/(?:um|shared|winrt)\/.+)");
public string Name => this.partitionName;
public string DefaultNamespaceName => this.partitionName.Replace("_", string.Empty);
public string SettingsFile => Path.Combine(this.repoInfo.ParitionDir, $"{this.partitionName}\\settings.rsp");
public string GenerationOutputFile => Path.Combine(this.repoInfo.ScraperOutputDir, $"{this.partitionName}.generation.output.txt");
public ReadOnlyCollection<string> VisitedHeaders
{
get
{
this.LoadVisitedHeaders();
return this.visitedHeaders.AsReadOnly();
}
}
public ReadOnlyCollection<string> GetTraverseHeaders(bool fullPath)
{
if (this.traverseHeaders == null)
{
this.LoadVisitedHeaders();
this.traverseHeaders = new List<string>();
bool inTraverse = false;
foreach (string line in File.ReadAllLines(this.SettingsFile))
{
if (line.StartsWith("--"))
{
inTraverse = line == "--traverse";
continue;
}
if (inTraverse)
{
var match = FilesInSettingsRspRegex.Match(line);
if (match.Success)
{
this.traverseHeaders.Add(match.Groups[1].Value);
}
}
}
}
if (!fullPath)
{
return this.traverseHeaders.AsReadOnly();
}
List<string> longPaths = new List<string>();
foreach (var shortPath in this.traverseHeaders)
{
string longPath = this.incRoot + shortPath;
longPath = longPath.Replace('/', '\\');
longPaths.Add(longPath);
}
return longPaths.AsReadOnly();
}
private void LoadVisitedHeaders()
{
if (this.visitedHeaders == null)
{
this.visitedHeaders = new List<string>();
//this.shortPathToLongPath = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
string text = File.ReadAllText(this.GenerationOutputFile);
foreach (Match match in VisitingHeaderRegex.Matches(text))
{
string rootDir = match.Groups[1].Value;
if (this.incRoot == null)
{
this.incRoot = rootDir;
}
string shortName = match.Groups[2].Value;
string fullPath = rootDir + shortName;
this.visitedHeaders.Add(fullPath);
//this.shortPathToLongPath[shortName] = fullPath;
}
}
}
public override string ToString()
{
return this.partitionName;
}
public override int GetHashCode()
{
return this.ToString().GetHashCode();
}
}
}

Просмотреть файл

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0-1.final" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,51 @@
using System.Collections.Generic;
using System.IO;
namespace PartitionUtilsLib
{
public class RepoInfo
{
private string repoRoot;
public RepoInfo(string repoRoot)
{
this.repoRoot = Path.GetFullPath(repoRoot);
}
public string ParitionDir => Path.Combine(this.repoRoot, "generation\\scraper\\partitions");
public string ScraperOutputDir => Path.Combine(this.repoRoot, "generation\\scraper\\obj");
public IEnumerable<PartitionInfo> GetPartitionInfos()
{
foreach (var partionDir in Directory.GetDirectories(this.ParitionDir))
{
var partitionName = Path.GetFileName(partionDir);
yield return new PartitionInfo(this, partitionName);
}
}
public void UpdateGeneratedSourceHeader()
{
string headerPath = Path.Combine(this.repoRoot, "generation\\header.txt");
using (StreamWriter streamWriter = new StreamWriter(headerPath))
{
streamWriter.WriteLine("// Copyright © Microsoft");
streamWriter.WriteLine("using Windows.Win32.Interop");
streamWriter.WriteLine();
foreach (var partInfo in this.GetPartitionInfos())
{
var ns = partInfo.Namespace;
streamWriter.WriteLine($"using {ns}");
}
}
}
public void AddTraverseHeader(string header, string partName)
{
var partInfo = new PartitionInfo(this, partName);
partInfo.AddTraverseHeader(header);
}
}
}

Просмотреть файл

@ -33,16 +33,68 @@ namespace WinmdUtils
showDuplicateTypes.Handler = CommandHandler.Create<FileInfo, IConsole>(ShowDuplicateTypes);
var showDuplicateConstants = new Command("showDuplicateConstants", "Show duplicate constants in a single winmd files.")
{
new Option(new[] { "--winmd" }, "The winmd to inspect.") { Argument = new Argument<FileInfo>().ExistingOnly(), IsRequired = true },
};
showDuplicateConstants.Handler = CommandHandler.Create<FileInfo, IConsole>(ShowDuplicateConstants);
var rootCommand = new RootCommand("Win32metadata winmd utils")
{
showMissingImportsCommand,
showDuplicateImports,
showDuplicateTypes
showDuplicateTypes,
showDuplicateConstants
};
return rootCommand.Invoke(args);
}
public static int ShowDuplicateConstants(FileInfo winmd, IConsole console)
{
using WinmdUtils w1 = WinmdUtils.LoadFromFile(winmd.FullName);
Dictionary<string, List<string>> nameToNamespace = new Dictionary<string, List<string>>();
foreach (var constant in w1.GetConstants())
{
if (!nameToNamespace.TryGetValue(constant.Name, out var namespaces))
{
namespaces = new List<string>();
nameToNamespace[constant.Name] = namespaces;
}
namespaces.Add(constant.Namespace);
}
bool dupsFound = false;
foreach (var pair in nameToNamespace)
{
if (pair.Value.Count > 1)
{
if (dupsFound == false)
{
dupsFound = true;
console.Out.Write("Duplicate constants detected:\r\n");
}
pair.Value.Sort();
console.Out.Write($"{pair.Key}\r\n");
foreach (var @namespace in pair.Value)
{
console.Out.Write($" {@namespace}\r\n");
}
}
}
if (!dupsFound)
{
console.Out.Write("No duplicate constants found.\r\n");
}
return dupsFound ? -1 : 0;
}
public static int ShowDuplicateTypes(FileInfo winmd, IConsole console)
{
using WinmdUtils w1 = WinmdUtils.LoadFromFile(winmd.FullName);

Просмотреть файл

@ -10,7 +10,7 @@
},
"showDuplicateTypes": {
"commandName": "Project",
"commandLineArgs": "showDuplicateTypes --winmd $(ProjectDir)..\\..\\bin\\Windows.Win32.winmd"
"commandLineArgs": "showDuplicateConstants --winmd $(ProjectDir)..\\..\\bin\\Windows.Win32.winmd"
}
}
}

Просмотреть файл

@ -51,6 +51,40 @@ namespace WinmdUtils
}
}
public IEnumerable<ConstInfo> GetConstants()
{
foreach (var typeDefHandle in this.metadataReader.TypeDefinitions)
{
var typeDef = this.metadataReader.GetTypeDefinition(typeDefHandle);
if (typeDef.IsNested)
{
continue;
}
var name = this.metadataReader.GetString(typeDef.Name);
if (name != "Apis")
{
continue;
}
var ns = this.metadataReader.GetString(typeDef.Namespace);
var fields = typeDef.GetFields();
foreach (var handle in fields)
{
var fieldDef = this.metadataReader.GetFieldDefinition(handle);
if (fieldDef.Attributes.HasFlag(System.Reflection.FieldAttributes.Static | System.Reflection.FieldAttributes.Literal))
{
var constantHandle = fieldDef.GetDefaultValue();
var constant = this.metadataReader.GetConstant(constantHandle);
string fieldName = metadataReader.GetString(fieldDef.Name);
yield return new ConstInfo(ns, fieldName, constant.TypeCode);
}
}
}
}
public IEnumerable<TypeInfo> GetTypes()
{
foreach (var typeDefHandle in this.metadataReader.TypeDefinitions)
@ -59,6 +93,11 @@ namespace WinmdUtils
var name = this.metadataReader.GetString(typeDef.Name);
var ns = this.metadataReader.GetString(typeDef.Namespace);
if (typeDef.IsNested)
{
continue;
}
if (name == "Apis")
{
continue;
@ -109,11 +148,6 @@ namespace WinmdUtils
}
}
if (typeDef.IsNested)
{
continue;
}
yield return new TypeInfo(ns, name);
}
}
@ -132,6 +166,22 @@ namespace WinmdUtils
public string Name { get; private set; }
}
public class ConstInfo
{
public ConstInfo(string @namespace, string name, ConstantTypeCode typeCode)
{
this.Namespace = @namespace;
this.Name = name;
this.ConstantTypeCode = typeCode;
}
public string Namespace { get; private set; }
public string Name { get; private set; }
public ConstantTypeCode ConstantTypeCode { get; private set; }
}
public class DllImport
{
public DllImport(string name, string dll, string declaringType)

Просмотреть файл

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>