From 25f7c9cefe68102809dc874d2d3c88dba8c0a861 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 15:02:57 -0500 Subject: [PATCH 01/36] Add ShellScalingApi.h --- TerraFX.Interop.Windows.sln | 8 +++ generation/um/ShellScalingApi/generate.rsp | 14 +++++ generation/um/ShellScalingApi/header.txt | 4 ++ .../um/ShellScalingApi/um-ShellScalingApi.h | 2 + .../um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs | 13 +++++ .../um/ShellScalingApi/MONITOR_DPI_TYPE.cs | 15 ++++++ .../ShellScalingApi/PROCESS_DPI_AWARENESS.cs | 14 +++++ .../um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs | 17 ++++++ .../um/ShellScalingApi/SHELL_UI_COMPONENT.cs | 14 +++++ .../Windows/um/ShellScalingApi/Windows.cs | 52 +++++++++++++++++++ 10 files changed, 153 insertions(+) create mode 100644 generation/um/ShellScalingApi/generate.rsp create mode 100644 generation/um/ShellScalingApi/header.txt create mode 100644 generation/um/ShellScalingApi/um-ShellScalingApi.h create mode 100644 sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs create mode 100644 sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs create mode 100644 sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs create mode 100644 sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs create mode 100644 sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs create mode 100644 sources/Interop/Windows/um/ShellScalingApi/Windows.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 789b4adc93..0cbf839245 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1841,6 +1841,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lmerr", "lmerr", "{E76B7894 generation\shared\lmerr\shared-lmerr.h = generation\shared\lmerr\shared-lmerr.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ShellScalingApi", "ShellScalingApi", "{42998229-3948-4CE4-B7AC-646C65CD0EC5}" + ProjectSection(SolutionItems) = preProject + generation\um\ShellScalingApi\generate.rsp = generation\um\ShellScalingApi\generate.rsp + generation\um\ShellScalingApi\header.txt = generation\um\ShellScalingApi\header.txt + generation\um\ShellScalingApi\um-ShellScalingApi.h = generation\um\ShellScalingApi\um-ShellScalingApi.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2132,6 +2139,7 @@ Global {9337A17E-7551-48F3-B73D-AF8086062660} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {3B2ED67D-9E95-4351-9A11-272C1104414F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {E76B7894-62A5-41ED-9BF2-454BC2DE7565} = {F9716DD9-2967-4295-AC71-F1FD5A9EEFEF} + {42998229-3948-4CE4-B7AC-646C65CD0EC5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/um/ShellScalingApi/generate.rsp b/generation/um/ShellScalingApi/generate.rsp new file mode 100644 index 0000000000..24742c2df6 --- /dev/null +++ b/generation/um/ShellScalingApi/generate.rsp @@ -0,0 +1,14 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-ShellScalingApi.h +--output +../../../sources/Interop/Windows/um/ShellScalingApi +--test-output +../../../tests/Interop/Windows/um/ShellScalingApi +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ShellScalingApi.h +--with-attribute +SCALE_CHANGE_FLAGS=Flags +--with-librarypath +*=shcore \ No newline at end of file diff --git a/generation/um/ShellScalingApi/header.txt b/generation/um/ShellScalingApi/header.txt new file mode 100644 index 0000000000..9307f073cd --- /dev/null +++ b/generation/um/ShellScalingApi/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/ShellScalingApi/um-ShellScalingApi.h b/generation/um/ShellScalingApi/um-ShellScalingApi.h new file mode 100644 index 0000000000..554c964544 --- /dev/null +++ b/generation/um/ShellScalingApi/um-ShellScalingApi.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs b/sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs new file mode 100644 index 0000000000..9b62242519 --- /dev/null +++ b/sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum DISPLAY_DEVICE_TYPE + { + DEVICE_PRIMARY = 0, + DEVICE_IMMERSIVE = 1, + } +} diff --git a/sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs b/sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs new file mode 100644 index 0000000000..4ca82ef98a --- /dev/null +++ b/sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum MONITOR_DPI_TYPE + { + MDT_EFFECTIVE_DPI = 0, + MDT_ANGULAR_DPI = 1, + MDT_RAW_DPI = 2, + MDT_DEFAULT = MDT_EFFECTIVE_DPI, + } +} diff --git a/sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs b/sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs new file mode 100644 index 0000000000..fb9ed7f66e --- /dev/null +++ b/sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum PROCESS_DPI_AWARENESS + { + PROCESS_DPI_UNAWARE = 0, + PROCESS_SYSTEM_DPI_AWARE = 1, + PROCESS_PER_MONITOR_DPI_AWARE = 2, + } +} diff --git a/sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs b/sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs new file mode 100644 index 0000000000..07ecb55aef --- /dev/null +++ b/sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs @@ -0,0 +1,17 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum SCALE_CHANGE_FLAGS + { + SCF_VALUE_NONE = 0x00, + SCF_SCALE = 0x01, + SCF_PHYSICAL = 0x02, + } +} diff --git a/sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs b/sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs new file mode 100644 index 0000000000..c950e7de89 --- /dev/null +++ b/sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum SHELL_UI_COMPONENT + { + SHELL_UI_COMPONENT_TASKBARS = 0, + SHELL_UI_COMPONENT_NOTIFICATIONAREA = 1, + SHELL_UI_COMPONENT_DESKBAND = 2, + } +} diff --git a/sources/Interop/Windows/um/ShellScalingApi/Windows.cs b/sources/Interop/Windows/um/ShellScalingApi/Windows.cs new file mode 100644 index 0000000000..9c03b8be5d --- /dev/null +++ b/sources/Interop/Windows/um/ShellScalingApi/Windows.cs @@ -0,0 +1,52 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("shcore", ExactSpelling = true)] + public static extern DEVICE_SCALE_FACTOR GetScaleFactorForDevice(DISPLAY_DEVICE_TYPE deviceType); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RegisterScaleChangeNotifications(DISPLAY_DEVICE_TYPE displayDevice, [NativeTypeName("HWND")] IntPtr hwndNotify, [NativeTypeName("UINT")] uint uMsgNotify, [NativeTypeName("DWORD *")] uint* pdwCookie); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RevokeScaleChangeNotifications(DISPLAY_DEVICE_TYPE displayDevice, [NativeTypeName("DWORD")] uint dwCookie); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetScaleFactorForMonitor([NativeTypeName("HMONITOR")] IntPtr hMon, [NativeTypeName("DEVICE_SCALE_FACTOR *")] DEVICE_SCALE_FACTOR* pScale); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RegisterScaleChangeEvent([NativeTypeName("HANDLE")] IntPtr hEvent, [NativeTypeName("DWORD_PTR *")] nuint* pdwCookie); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int UnregisterScaleChangeEvent([NativeTypeName("DWORD_PTR")] nuint dwCookie); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetProcessDpiAwareness([NativeTypeName("HANDLE")] IntPtr hprocess, [NativeTypeName("PROCESS_DPI_AWARENESS *")] PROCESS_DPI_AWARENESS* value); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetDpiForMonitor([NativeTypeName("HMONITOR")] IntPtr hmonitor, MONITOR_DPI_TYPE dpiType, [NativeTypeName("UINT *")] uint* dpiX, [NativeTypeName("UINT *")] uint* dpiY); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("UINT")] + public static extern uint GetDpiForShellUIComponent(SHELL_UI_COMPONENT param0); + } +} From 630bb55bb668f5ee36f4640bf66fa765fc8fd526 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 17:17:22 -0500 Subject: [PATCH 02/36] Add IsolatedAppLauncher.h --- TerraFX.Interop.Windows.sln | 8 +++ generation/remap.rsp | 2 + .../um/IsolatedAppLauncher/generate.rsp | 12 +++++ generation/um/IsolatedAppLauncher/header.txt | 4 ++ .../um-IsolatedAppLauncher.h | 2 + .../IIsolatedAppLauncher.cs | 46 +++++++++++++++++ .../IsolatedAppLauncher.cs | 14 +++++ .../IsolatedAppLauncherTelemetryParameters.cs | 18 +++++++ .../Windows/um/IsolatedAppLauncher/Windows.cs | 25 +++++++++ .../IIsolatedAppLauncherTests.cs | 51 +++++++++++++++++++ ...atedAppLauncherTelemetryParametersTests.cs | 35 +++++++++++++ .../IsolatedAppLauncherTests.cs | 44 ++++++++++++++++ 12 files changed, 261 insertions(+) create mode 100644 generation/um/IsolatedAppLauncher/generate.rsp create mode 100644 generation/um/IsolatedAppLauncher/header.txt create mode 100644 generation/um/IsolatedAppLauncher/um-IsolatedAppLauncher.h create mode 100644 sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs create mode 100644 sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs create mode 100644 sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs create mode 100644 sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs create mode 100644 tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs create mode 100644 tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs create mode 100644 tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 0cbf839245..738f27ac19 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1848,6 +1848,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ShellScalingApi", "ShellSca generation\um\ShellScalingApi\um-ShellScalingApi.h = generation\um\ShellScalingApi\um-ShellScalingApi.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IsolatedAppLauncher", "IsolatedAppLauncher", "{BCE829EE-FED2-4C17-9DFD-F9D6C4DB1D45}" + ProjectSection(SolutionItems) = preProject + generation\um\IsolatedAppLauncher\generate.rsp = generation\um\IsolatedAppLauncher\generate.rsp + generation\um\IsolatedAppLauncher\header.txt = generation\um\IsolatedAppLauncher\header.txt + generation\um\IsolatedAppLauncher\um-IsolatedAppLauncher.h = generation\um\IsolatedAppLauncher\um-IsolatedAppLauncher.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2140,6 +2147,7 @@ Global {3B2ED67D-9E95-4351-9A11-272C1104414F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {E76B7894-62A5-41ED-9BF2-454BC2DE7565} = {F9716DD9-2967-4295-AC71-F1FD5A9EEFEF} {42998229-3948-4CE4-B7AC-646C65CD0EC5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {BCE829EE-FED2-4C17-9DFD-F9D6C4DB1D45} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 6dd3735103..c37873430f 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -449,6 +449,7 @@ IID_InkD2DRenderer=CLSID_InkD2DRenderer IID_InkDesktopHost=CLSID_InkDesktopHost IID_InMemoryPropertyStore=CLSID_InMemoryPropertyStore IID_InMemoryPropertyStoreMarshalByValue=CLSID_InMemoryPropertyStoreMarshalByValue +IID_IsolatedAppLauncher=CLSID_IsolatedAppLauncher IID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT=STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT IID_KSDATAFORMAT_SUBTYPE_PCM=STATIC_KSDATAFORMAT_SUBTYPE_PCM IID_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX=STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX @@ -2125,6 +2126,7 @@ _INTENT_TO_SEAL_ATTRIBUTE=INTENT_TO_SEAL_ATTRIBUTE _INTLIST=INTLIST _IO_COUNTERS=IO_COUNTERS _IO_IRP_EXT_TRACK_OFFSET_HEADER=IO_IRP_EXT_TRACK_OFFSET_HEADER +_IsolatedAppLauncherTelemetryParameters=IsolatedAppLauncherTelemetryParameters _JIT_DEBUG_INFO=JIT_DEBUG_INFO _JOBOBJECTINFOCLASS=JOBOBJECTINFOCLASS _JOBOBJECT_ASSOCIATE_COMPLETION_PORT=JOBOBJECT_ASSOCIATE_COMPLETION_PORT diff --git a/generation/um/IsolatedAppLauncher/generate.rsp b/generation/um/IsolatedAppLauncher/generate.rsp new file mode 100644 index 0000000000..8e7a2ae3eb --- /dev/null +++ b/generation/um/IsolatedAppLauncher/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-IsolatedAppLauncher.h +--output +../../../sources/Interop/Windows/um/IsolatedAppLauncher +--test-output +../../../tests/Interop/Windows/um/IsolatedAppLauncher +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/IsolatedAppLauncher.h +--with-librarypath +*=shcore diff --git a/generation/um/IsolatedAppLauncher/header.txt b/generation/um/IsolatedAppLauncher/header.txt new file mode 100644 index 0000000000..5a1b0b33f1 --- /dev/null +++ b/generation/um/IsolatedAppLauncher/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/IsolatedAppLauncher/um-IsolatedAppLauncher.h b/generation/um/IsolatedAppLauncher/um-IsolatedAppLauncher.h new file mode 100644 index 0000000000..c66d210fdb --- /dev/null +++ b/generation/um/IsolatedAppLauncher/um-IsolatedAppLauncher.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs new file mode 100644 index 0000000000..0026c89c3f --- /dev/null +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs @@ -0,0 +1,46 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("F686878F-7B42-4CC4-96FB-F4F3B6E3D24D")] + [NativeTypeName("struct IIsolatedAppLauncher : IUnknown")] + public unsafe partial struct IIsolatedAppLauncher + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IIsolatedAppLauncher*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IIsolatedAppLauncher*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IIsolatedAppLauncher*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Launch([NativeTypeName("LPCWSTR")] ushort* appUserModelId, [NativeTypeName("LPCWSTR")] ushort* arguments, [NativeTypeName("const IsolatedAppLauncherTelemetryParameters *")] IsolatedAppLauncherTelemetryParameters* telemetryParameters) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IIsolatedAppLauncher*)Unsafe.AsPointer(ref this), appUserModelId, arguments, telemetryParameters); + } + } +} diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs new file mode 100644 index 0000000000..1741e27097 --- /dev/null +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("BC812430-E75E-4FD1-9641-1F9F1E2D9A1F")] + public partial struct IsolatedAppLauncher + { + } +} diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs new file mode 100644 index 0000000000..bc08164b7a --- /dev/null +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public partial struct IsolatedAppLauncherTelemetryParameters + { + [NativeTypeName("BOOL")] + public int EnableForLaunch; + + [NativeTypeName("GUID")] + public Guid CorrelationGUID; + } +} diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs new file mode 100644 index 0000000000..84d6e136b1 --- /dev/null +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs @@ -0,0 +1,25 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int IsProcessInWDAGContainer([NativeTypeName("PVOID")] void* Reserved, [NativeTypeName("BOOL *")] int* isProcessInWDAGContainer); + + [DllImport("shcore", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int IsProcessInIsolatedContainer([NativeTypeName("BOOL *")] int* isProcessInIsolatedContainer); + + public static readonly Guid IID_IIsolatedAppLauncher = new Guid(0xF686878F, 0x7B42, 0x4CC4, 0x96, 0xFB, 0xF4, 0xF3, 0xB6, 0xE3, 0xD2, 0x4D); + + public static readonly Guid CLSID_IsolatedAppLauncher = new Guid(0xBC812430, 0xE75E, 0x4FD1, 0x96, 0x41, 0x1F, 0x9F, 0x1E, 0x2D, 0x9A, 0x1F); + } +} diff --git a/tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs b/tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs new file mode 100644 index 0000000000..0fd9b530f4 --- /dev/null +++ b/tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IIsolatedAppLauncherTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IIsolatedAppLauncher).GUID, Is.EqualTo(IID_IIsolatedAppLauncher)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IIsolatedAppLauncher))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IIsolatedAppLauncher).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IIsolatedAppLauncher), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IIsolatedAppLauncher), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs new file mode 100644 index 0000000000..3db05d1238 --- /dev/null +++ b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IsolatedAppLauncherTelemetryParametersTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IsolatedAppLauncherTelemetryParameters))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IsolatedAppLauncherTelemetryParameters).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(IsolatedAppLauncherTelemetryParameters), Is.EqualTo(20)); + } + } +} diff --git a/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs new file mode 100644 index 0000000000..581a307226 --- /dev/null +++ b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IsolatedAppLauncherTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IsolatedAppLauncher).GUID, Is.EqualTo(CLSID_IsolatedAppLauncher)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IsolatedAppLauncher))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IsolatedAppLauncher).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(IsolatedAppLauncher), Is.EqualTo(1)); + } + } +} From 9c920f2449f57fb1c6b6ef2e102ce6e218f79677 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 17:24:03 -0500 Subject: [PATCH 03/36] Add MDMRegistration.h --- TerraFX.Interop.Windows.sln | 8 + generation/remap.rsp | 3 + generation/um/MDMRegistration/generate.rsp | 12 + generation/um/MDMRegistration/header.txt | 4 + .../um/MDMRegistration/um-MDMRegistration.h | 2 + .../MANAGEMENT_REGISTRATION_INFO.cs | 22 ++ .../MANAGEMENT_SERVICE_INFO.cs | 16 ++ .../REGISTRATION_INFORMATION_CLASS.cs | 13 + .../Windows/um/MDMRegistration/Windows.cs | 262 ++++++++++++++++++ .../MANAGEMENT_REGISTRATION_INFOTests.cs | 43 +++ .../MANAGEMENT_SERVICE_INFOTests.cs | 43 +++ 11 files changed, 428 insertions(+) create mode 100644 generation/um/MDMRegistration/generate.rsp create mode 100644 generation/um/MDMRegistration/header.txt create mode 100644 generation/um/MDMRegistration/um-MDMRegistration.h create mode 100644 sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs create mode 100644 sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs create mode 100644 sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs create mode 100644 sources/Interop/Windows/um/MDMRegistration/Windows.cs create mode 100644 tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs create mode 100644 tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 738f27ac19..9a5635b375 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1855,6 +1855,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IsolatedAppLauncher", "Isol generation\um\IsolatedAppLauncher\um-IsolatedAppLauncher.h = generation\um\IsolatedAppLauncher\um-IsolatedAppLauncher.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MDMRegistration", "MDMRegistration", "{09434D80-A91A-464C-966E-2B8397AB6C29}" + ProjectSection(SolutionItems) = preProject + generation\um\MDMRegistration\generate.rsp = generation\um\MDMRegistration\generate.rsp + generation\um\MDMRegistration\header.txt = generation\um\MDMRegistration\header.txt + generation\um\MDMRegistration\um-MDMRegistration.h = generation\um\MDMRegistration\um-MDMRegistration.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2148,6 +2155,7 @@ Global {E76B7894-62A5-41ED-9BF2-454BC2DE7565} = {F9716DD9-2967-4295-AC71-F1FD5A9EEFEF} {42998229-3948-4CE4-B7AC-646C65CD0EC5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {BCE829EE-FED2-4C17-9DFD-F9D6C4DB1D45} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {09434D80-A91A-464C-966E-2B8397AB6C29} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index c37873430f..d497434d68 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -2167,6 +2167,8 @@ _LUID=LUID _LUID_AND_ATTRIBUTES=LUID_AND_ATTRIBUTES _M128A=M128A _MACROBLOCK_DATA=MACROBLOCK_DATA +_MANAGEMENT_REGISTRATION_INFO=MANAGEMENT_REGISTRATION_INFO +_MANAGEMENT_SERVICE_INFO=MANAGEMENT_SERVICE_INFO _MANDATORY_LEVEL=MANDATORY_LEVEL _MARGINS=MARGINS _MARK_HANDLE_INFO=MARK_HANDLE_INFO @@ -2472,6 +2474,7 @@ _REFS_SMR_VOLUME_GC_METHOD=REFS_SMR_VOLUME_GC_METHOD _REFS_SMR_VOLUME_GC_PARAMETERS=REFS_SMR_VOLUME_GC_PARAMETERS _REFS_SMR_VOLUME_GC_STATE=REFS_SMR_VOLUME_GC_STATE _REFS_SMR_VOLUME_INFO_OUTPUT=REFS_SMR_VOLUME_INFO_OUTPUT +_REGISTRATION_INFORMATION_CLASS=REGISTRATION_INFORMATION_CLASS _RemotableHandle=RemotableHandle _remoteMETAFILEPICT=remoteMETAFILEPICT _REMOVE_ELEMENT_AND_TRUNCATE_REQUEST=REMOVE_ELEMENT_AND_TRUNCATE_REQUEST diff --git a/generation/um/MDMRegistration/generate.rsp b/generation/um/MDMRegistration/generate.rsp new file mode 100644 index 0000000000..0a89338cee --- /dev/null +++ b/generation/um/MDMRegistration/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-MDMRegistration.h +--output +../../../sources/Interop/Windows/um/MDMRegistration +--test-output +../../../tests/Interop/Windows/um/MDMRegistration +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/MDMRegistration.h +--with-librarypath +*=MDMRegistration diff --git a/generation/um/MDMRegistration/header.txt b/generation/um/MDMRegistration/header.txt new file mode 100644 index 0000000000..78e056e613 --- /dev/null +++ b/generation/um/MDMRegistration/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/MDMRegistration/um-MDMRegistration.h b/generation/um/MDMRegistration/um-MDMRegistration.h new file mode 100644 index 0000000000..e1e86447a8 --- /dev/null +++ b/generation/um/MDMRegistration/um-MDMRegistration.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs new file mode 100644 index 0000000000..0a80b3c6a6 --- /dev/null +++ b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct MANAGEMENT_REGISTRATION_INFO + { + [NativeTypeName("BOOL")] + public int fDeviceRegisteredWithManagement; + + [NativeTypeName("DWORD")] + public uint dwDeviceRegistionKind; + + [NativeTypeName("LPWSTR")] + public ushort* pszUPN; + + [NativeTypeName("LPWSTR")] + public ushort* pszMDMServiceUri; + } +} diff --git a/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs new file mode 100644 index 0000000000..3090f218a1 --- /dev/null +++ b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct MANAGEMENT_SERVICE_INFO + { + [NativeTypeName("LPWSTR")] + public ushort* pszMDMServiceUri; + + [NativeTypeName("LPWSTR")] + public ushort* pszAuthenticationUri; + } +} diff --git a/sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs new file mode 100644 index 0000000000..2cb6ba041c --- /dev/null +++ b/sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum REGISTRATION_INFORMATION_CLASS + { + DeviceRegistrationBasicInfo = 1, + MaxDeviceInfoClass, + } +} diff --git a/sources/Interop/Windows/um/MDMRegistration/Windows.cs b/sources/Interop/Windows/um/MDMRegistration/Windows.cs new file mode 100644 index 0000000000..f73cc09eb7 --- /dev/null +++ b/sources/Interop/Windows/um/MDMRegistration/Windows.cs @@ -0,0 +1,262 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetDeviceRegistrationInfo(REGISTRATION_INFORMATION_CLASS DeviceInformationClass, [NativeTypeName("PVOID *")] void** ppDeviceRegistrationInfo); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int IsDeviceRegisteredWithManagement([NativeTypeName("BOOL *")] int* pfIsDeviceRegisteredWithManagement, [NativeTypeName("DWORD")] uint cchUPN, [NativeTypeName("LPWSTR")] ushort* pszUPN); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int IsManagementRegistrationAllowed([NativeTypeName("BOOL *")] int* pfIsManagementRegistrationAllowed); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int IsMdmUxWithoutAadAllowed([NativeTypeName("BOOL *")] int* isEnrollmentAllowed); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SetManagedExternally([NativeTypeName("BOOL")] int IsManagedExternally); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int DiscoverManagementService([NativeTypeName("LPCWSTR")] ushort* pszUPN, [NativeTypeName("PMANAGEMENT_SERVICE_INFO *")] MANAGEMENT_SERVICE_INFO** ppMgmtInfo); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RegisterDeviceWithManagementUsingAADCredentials([NativeTypeName("HANDLE")] IntPtr UserToken); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RegisterDeviceWithManagementUsingAADDeviceCredentials(); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RegisterDeviceWithManagementUsingAADDeviceCredentials2([NativeTypeName("PCWSTR")] ushort* MDMApplicationID); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RegisterDeviceWithManagement([NativeTypeName("LPCWSTR")] ushort* pszUPN, [NativeTypeName("LPCWSTR")] ushort* ppszMDMServiceUri, [NativeTypeName("LPCWSTR")] ushort* ppzsAccessToken); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int UnregisterDeviceWithManagement([NativeTypeName("LPCWSTR")] ushort* enrollmentID); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetDeviceManagementConfigInfo([NativeTypeName("PCWSTR")] ushort* providerID, [NativeTypeName("DWORD *")] uint* configStringBufferLength, [NativeTypeName("PWSTR")] ushort* configString); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SetDeviceManagementConfigInfo([NativeTypeName("PCWSTR")] ushort* providerID, [NativeTypeName("PCWSTR")] ushort* configString); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetManagementAppHyperlink([NativeTypeName("DWORD")] uint cchHyperlink, [NativeTypeName("LPWSTR")] ushort* pszHyperlink); + + [DllImport("MDMRegistration", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int DiscoverManagementServiceEx([NativeTypeName("LPCWSTR")] ushort* pszUPN, [NativeTypeName("LPCWSTR")] ushort* pszDiscoveryServiceCandidate, [NativeTypeName("PMANAGEMENT_SERVICE_INFO *")] MANAGEMENT_SERVICE_INFO** ppMgmtInfo); + + [NativeTypeName("#define E_DATATYPE_MISMATCH HRESULT_FROM_WIN32(ERROR_DATATYPE_MISMATCH)")] + public static readonly int E_DATATYPE_MISMATCH = HRESULT_FROM_WIN32(1629); + + [NativeTypeName("#define MDM_REGISTRATION_FACILITY_CODE 25")] + public const int MDM_REGISTRATION_FACILITY_CODE = 25; + + [NativeTypeName("#define DEVICE_ENROLLER_FACILITY_CODE 24")] + public const int DEVICE_ENROLLER_FACILITY_CODE = 24; + + [NativeTypeName("#define MREGISTER_E_DEVICE_MESSAGE_FORMAT_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 1)")] + public const int MREGISTER_E_DEVICE_MESSAGE_FORMAT_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(1)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_MESSAGE_FORMAT_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 1)")] + public const int MENROLL_E_DEVICE_MESSAGE_FORMAT_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(1)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_AUTHENTICATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 2)")] + public const int MREGISTER_E_DEVICE_AUTHENTICATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(2)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_AUTHENTICATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 2)")] + public const int MENROLL_E_DEVICE_AUTHENTICATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(2)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_AUTHORIZATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 3)")] + public const int MREGISTER_E_DEVICE_AUTHORIZATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(3)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_AUTHORIZATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 3)")] + public const int MENROLL_E_DEVICE_AUTHORIZATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(3)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_CERTIFCATEREQUEST_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 4)")] + public const int MREGISTER_E_DEVICE_CERTIFCATEREQUEST_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(4)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_CERTIFCATEREQUEST_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 4)")] + public const int MENROLL_E_DEVICE_CERTIFCATEREQUEST_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(4)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_CONFIGMGRSERVER_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 5)")] + public const int MREGISTER_E_DEVICE_CONFIGMGRSERVER_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(5)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_CONFIGMGRSERVER_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 5)")] + public const int MENROLL_E_DEVICE_CONFIGMGRSERVER_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(5)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_INTERNALSERVICE_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 6)")] + public const int MREGISTER_E_DEVICE_INTERNALSERVICE_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(6)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_INTERNALSERVICE_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 6)")] + public const int MENROLL_E_DEVICE_INTERNALSERVICE_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(6)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_INVALIDSECURITY_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 7)")] + public const int MREGISTER_E_DEVICE_INVALIDSECURITY_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(7)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_INVALIDSECURITY_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 7)")] + public const int MENROLL_E_DEVICE_INVALIDSECURITY_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(7)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_UNKNOWN_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 8)")] + public const int MREGISTER_E_DEVICE_UNKNOWN_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(8)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_UNKNOWN_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 8)")] + public const int MENROLL_E_DEVICE_UNKNOWN_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(8)))); + + [NativeTypeName("#define MREGISTER_E_REGISTRATION_IN_PROGRESS MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 9)")] + public const int MREGISTER_E_REGISTRATION_IN_PROGRESS = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(9)))); + + [NativeTypeName("#define MENROLL_E_ENROLLMENT_IN_PROGRESS MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 9)")] + public const int MENROLL_E_ENROLLMENT_IN_PROGRESS = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(9)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_ALREADY_REGISTERED MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 10)")] + public const int MREGISTER_E_DEVICE_ALREADY_REGISTERED = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(10)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_ALREADY_ENROLLED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 10)")] + public const int MENROLL_E_DEVICE_ALREADY_ENROLLED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(10)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_NOT_REGISTERED MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 11)")] + public const int MREGISTER_E_DEVICE_NOT_REGISTERED = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(11)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_NOT_ENROLLED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 11)")] + public const int MENROLL_E_DEVICE_NOT_ENROLLED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(11)))); + + [NativeTypeName("#define MREGISTER_E_DISCOVERY_REDIRECTED MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 12)")] + public const int MREGISTER_E_DISCOVERY_REDIRECTED = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(12)))); + + [NativeTypeName("#define MREGISTER_E_DEVICE_NOT_AD_REGISTERED_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 13)")] + public const int MREGISTER_E_DEVICE_NOT_AD_REGISTERED_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(13)))); + + [NativeTypeName("#define MENROLL_E_DISCOVERY_SEC_CERT_DATE_INVALID MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 13)")] + public const int MENROLL_E_DISCOVERY_SEC_CERT_DATE_INVALID = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(13)))); + + [NativeTypeName("#define MREGISTER_E_DISCOVERY_FAILED MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 14)")] + public const int MREGISTER_E_DISCOVERY_FAILED = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(14)))); + + [NativeTypeName("#define MENROLL_E_PASSWORD_NEEDED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 14)")] + public const int MENROLL_E_PASSWORD_NEEDED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(14)))); + + [NativeTypeName("#define MENROLL_E_WAB_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 15)")] + public const int MENROLL_E_WAB_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(15)))); + + [NativeTypeName("#define MENROLL_E_CONNECTIVITY MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 16)")] + public const int MENROLL_E_CONNECTIVITY = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(16)))); + + [NativeTypeName("#define MENROLL_S_ENROLLMENT_SUSPENDED MAKE_HRESULT(SEVERITY_SUCCESS, DEVICE_ENROLLER_FACILITY_CODE, 17)")] + public const int MENROLL_S_ENROLLMENT_SUSPENDED = unchecked((int)(((uint)(0) << 31) | ((uint)(24) << 16) | ((uint)(17)))); + + [NativeTypeName("#define MENROLL_E_INVALIDSSLCERT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 18)")] + public const int MENROLL_E_INVALIDSSLCERT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(18)))); + + [NativeTypeName("#define MENROLL_E_DEVICECAPREACHED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 19)")] + public const int MENROLL_E_DEVICECAPREACHED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(19)))); + + [NativeTypeName("#define MENROLL_E_DEVICENOTSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 20)")] + public const int MENROLL_E_DEVICENOTSUPPORTED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(20)))); + + [NativeTypeName("#define MENROLL_E_NOTSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 21)")] + public const int MENROLL_E_NOTSUPPORTED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(21)))); + + [NativeTypeName("#define MENROLL_E_NOTELIGIBLETORENEW MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 22)")] + public const int MENROLL_E_NOTELIGIBLETORENEW = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(22)))); + + [NativeTypeName("#define MENROLL_E_INMAINTENANCE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 23)")] + public const int MENROLL_E_INMAINTENANCE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(23)))); + + [NativeTypeName("#define MENROLL_E_USERLICENSE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 24)")] + public const int MENROLL_E_USERLICENSE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(24)))); + + [NativeTypeName("#define MENROLL_E_ENROLLMENTDATAINVALID MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 25)")] + public const int MENROLL_E_ENROLLMENTDATAINVALID = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(25)))); + + [NativeTypeName("#define MENROLL_E_INSECUREREDIRECT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 26)")] + public const int MENROLL_E_INSECUREREDIRECT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(26)))); + + [NativeTypeName("#define MENROLL_E_PLATFORM_WRONG_STATE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 27)")] + public const int MENROLL_E_PLATFORM_WRONG_STATE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(27)))); + + [NativeTypeName("#define MENROLL_E_PLATFORM_LICENSE_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 28)")] + public const int MENROLL_E_PLATFORM_LICENSE_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(28)))); + + [NativeTypeName("#define MENROLL_E_PLATFORM_UNKNOWN_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 29)")] + public const int MENROLL_E_PLATFORM_UNKNOWN_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(29)))); + + [NativeTypeName("#define MENROLL_E_PROV_CSP_CERTSTORE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 30)")] + public const int MENROLL_E_PROV_CSP_CERTSTORE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(30)))); + + [NativeTypeName("#define MENROLL_E_PROV_CSP_W7 MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 31)")] + public const int MENROLL_E_PROV_CSP_W7 = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(31)))); + + [NativeTypeName("#define MENROLL_E_PROV_CSP_DMCLIENT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 32)")] + public const int MENROLL_E_PROV_CSP_DMCLIENT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(32)))); + + [NativeTypeName("#define MENROLL_E_PROV_CSP_PFW MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 33)")] + public const int MENROLL_E_PROV_CSP_PFW = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(33)))); + + [NativeTypeName("#define MENROLL_E_PROV_CSP_MISC MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 34)")] + public const int MENROLL_E_PROV_CSP_MISC = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(34)))); + + [NativeTypeName("#define MENROLL_E_PROV_UNKNOWN MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 35)")] + public const int MENROLL_E_PROV_UNKNOWN = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(35)))); + + [NativeTypeName("#define MENROLL_E_PROV_SSLCERTNOTFOUND MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 36)")] + public const int MENROLL_E_PROV_SSLCERTNOTFOUND = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(36)))); + + [NativeTypeName("#define MENROLL_E_PROV_CSP_APPMGMT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 37)")] + public const int MENROLL_E_PROV_CSP_APPMGMT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(37)))); + + [NativeTypeName("#define MENROLL_E_DEVICE_MANAGEMENT_BLOCKED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 38)")] + public const int MENROLL_E_DEVICE_MANAGEMENT_BLOCKED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(38)))); + + [NativeTypeName("#define MENROLL_E_CERTPOLICY_PRIVATEKEYCREATION_FAILED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 39)")] + public const int MENROLL_E_CERTPOLICY_PRIVATEKEYCREATION_FAILED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(39)))); + + [NativeTypeName("#define MENROLL_E_CERTAUTH_FAILED_TO_FIND_CERT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 40)")] + public const int MENROLL_E_CERTAUTH_FAILED_TO_FIND_CERT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(40)))); + + [NativeTypeName("#define MENROLL_E_EMPTY_MESSAGE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 41)")] + public const int MENROLL_E_EMPTY_MESSAGE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(41)))); + + [NativeTypeName("#define MENROLL_E_USER_CANCELED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 42)")] + public const int MENROLL_E_USER_CANCELED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(42)))); + + [NativeTypeName("#define MENROLL_E_MDM_NOT_CONFIGURED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 43)")] + public const int MENROLL_E_MDM_NOT_CONFIGURED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(43)))); + + [NativeTypeName("#define DEVICEREGISTRATIONTYPE_MDM_ONLY 0")] + public const int DEVICEREGISTRATIONTYPE_MDM_ONLY = 0; + + [NativeTypeName("#define DEVICEREGISTRATIONTYPE_MAM 5")] + public const int DEVICEREGISTRATIONTYPE_MAM = 5; + + [NativeTypeName("#define DEVICEREGISTRATIONTYPE_MDM_DEVICEWIDE_WITH_AAD 6")] + public const int DEVICEREGISTRATIONTYPE_MDM_DEVICEWIDE_WITH_AAD = 6; + + [NativeTypeName("#define DEVICEREGISTRATIONTYPE_MDM_USERSPECIFIC_WITH_AAD 13")] + public const int DEVICEREGISTRATIONTYPE_MDM_USERSPECIFIC_WITH_AAD = 13; + } +} diff --git a/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs new file mode 100644 index 0000000000..5baec5281c --- /dev/null +++ b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class MANAGEMENT_REGISTRATION_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(MANAGEMENT_REGISTRATION_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(MANAGEMENT_REGISTRATION_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(MANAGEMENT_REGISTRATION_INFO), Is.EqualTo(24)); + } + else + { + Assert.That(sizeof(MANAGEMENT_REGISTRATION_INFO), Is.EqualTo(16)); + } + } + } +} diff --git a/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs new file mode 100644 index 0000000000..8844779506 --- /dev/null +++ b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class MANAGEMENT_SERVICE_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(MANAGEMENT_SERVICE_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(MANAGEMENT_SERVICE_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(MANAGEMENT_SERVICE_INFO), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(MANAGEMENT_SERVICE_INFO), Is.EqualTo(8)); + } + } + } +} From eae36b2f20d7c4771cf19d1a307d3c648d37e6b0 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 17:32:23 -0500 Subject: [PATCH 04/36] Add swdevicedef.h --- TerraFX.Interop.Windows.sln | 8 ++++ generation/remap.rsp | 3 ++ generation/um/swdevicedef/generate.rsp | 12 ++++++ generation/um/swdevicedef/header.txt | 4 ++ generation/um/swdevicedef/um-swdevicedef.h | 2 + .../um/swdevicedef/SW_DEVICE_CAPABILITIES.cs | 19 ++++++++ .../um/swdevicedef/SW_DEVICE_CREATE_INFO.cs | 39 +++++++++++++++++ .../um/swdevicedef/SW_DEVICE_LIFETIME.cs | 14 ++++++ .../swdevicedef/SW_DEVICE_CREATE_INFOTests.cs | 43 +++++++++++++++++++ 9 files changed, 144 insertions(+) create mode 100644 generation/um/swdevicedef/generate.rsp create mode 100644 generation/um/swdevicedef/header.txt create mode 100644 generation/um/swdevicedef/um-swdevicedef.h create mode 100644 sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs create mode 100644 sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs create mode 100644 sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs create mode 100644 tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 9a5635b375..d1344a68d6 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1862,6 +1862,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MDMRegistration", "MDMRegis generation\um\MDMRegistration\um-MDMRegistration.h = generation\um\MDMRegistration\um-MDMRegistration.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "swdevicedef", "swdevicedef", "{AD839D00-8A71-4BC9-A9DF-F931C1241F1E}" + ProjectSection(SolutionItems) = preProject + generation\um\swdevicedef\generate.rsp = generation\um\swdevicedef\generate.rsp + generation\um\swdevicedef\header.txt = generation\um\swdevicedef\header.txt + generation\um\swdevicedef\um-swdevicedef.h = generation\um\swdevicedef\um-swdevicedef.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2156,6 +2163,7 @@ Global {42998229-3948-4CE4-B7AC-646C65CD0EC5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {BCE829EE-FED2-4C17-9DFD-F9D6C4DB1D45} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {09434D80-A91A-464C-966E-2B8397AB6C29} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {AD839D00-8A71-4BC9-A9DF-F931C1241F1E} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index d497434d68..8550a170b7 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -2877,6 +2877,9 @@ _STREAM_LAYOUT_ENTRY=STREAM_LAYOUT_ENTRY _STREAM_MEDIUM=STREAM_MEDIUM _SUBSCRIBE_GENERIC_TLS_EXTENSION=SUBSCRIBE_GENERIC_TLS_EXTENSION _SUPPORTED_OS_INFO=SUPPORTED_OS_INFO +_SW_DEVICE_CAPABILITIES=SW_DEVICE_CAPABILITIES +_SW_DEVICE_CREATE_INFO=SW_DEVICE_CREATE_INFO +_SW_DEVICE_LIFETIME=SW_DEVICE_LIFETIME _SYSTEMTIME=SYSTEMTIME _SYSTEM_ACCESS_FILTER_ACE=SYSTEM_ACCESS_FILTER_ACE _SYSTEM_ALARM_ACE=SYSTEM_ALARM_ACE diff --git a/generation/um/swdevicedef/generate.rsp b/generation/um/swdevicedef/generate.rsp new file mode 100644 index 0000000000..3c6e21a64d --- /dev/null +++ b/generation/um/swdevicedef/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-swdevicedef.h +--output +../../../sources/Interop/Windows/um/swdevicedef +--test-output +../../../tests/Interop/Windows/um/swdevicedef +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/swdevicedef.h +--with-attribute +SW_DEVICE_CAPABILITIES=Flags diff --git a/generation/um/swdevicedef/header.txt b/generation/um/swdevicedef/header.txt new file mode 100644 index 0000000000..0454fd9326 --- /dev/null +++ b/generation/um/swdevicedef/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/swdevicedef/um-swdevicedef.h b/generation/um/swdevicedef/um-swdevicedef.h new file mode 100644 index 0000000000..9fbced6934 --- /dev/null +++ b/generation/um/swdevicedef/um-swdevicedef.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs new file mode 100644 index 0000000000..a7fcc8733f --- /dev/null +++ b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum SW_DEVICE_CAPABILITIES + { + SWDeviceCapabilitiesNone = 0x00000000, + SWDeviceCapabilitiesRemovable = 0x00000001, + SWDeviceCapabilitiesSilentInstall = 0x00000002, + SWDeviceCapabilitiesNoDisplayInUI = 0x00000004, + SWDeviceCapabilitiesDriverRequired = 0x00000008, + } +} diff --git a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs new file mode 100644 index 0000000000..0341f945cf --- /dev/null +++ b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs @@ -0,0 +1,39 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public unsafe partial struct SW_DEVICE_CREATE_INFO + { + [NativeTypeName("ULONG")] + public uint cbSize; + + [NativeTypeName("PCWSTR")] + public ushort* pszInstanceId; + + [NativeTypeName("PCZZWSTR")] + public ushort* pszzHardwareIds; + + [NativeTypeName("PCZZWSTR")] + public ushort* pszzCompatibleIds; + + [NativeTypeName("const GUID *")] + public Guid* pContainerId; + + [NativeTypeName("ULONG")] + public uint CapabilityFlags; + + [NativeTypeName("PCWSTR")] + public ushort* pszDeviceDescription; + + [NativeTypeName("PCWSTR")] + public ushort* pszDeviceLocation; + + [NativeTypeName("const SECURITY_DESCRIPTOR *")] + public SECURITY_DESCRIPTOR* pSecurityDescriptor; + } +} diff --git a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs new file mode 100644 index 0000000000..92b7beda32 --- /dev/null +++ b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum SW_DEVICE_LIFETIME + { + SWDeviceLifetimeHandle, + SWDeviceLifetimeParentPresent, + SWDeviceLifetimeMax, + } +} diff --git a/tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs b/tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs new file mode 100644 index 0000000000..829dc7ce50 --- /dev/null +++ b/tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class SW_DEVICE_CREATE_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(SW_DEVICE_CREATE_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(SW_DEVICE_CREATE_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(SW_DEVICE_CREATE_INFO), Is.EqualTo(72)); + } + else + { + Assert.That(sizeof(SW_DEVICE_CREATE_INFO), Is.EqualTo(36)); + } + } + } +} From 71dba9c881d4bc9db83d34b7c3c988a89ca4a66b Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 17:36:18 -0500 Subject: [PATCH 05/36] Add swdevice.h --- TerraFX.Interop.Windows.sln | 8 ++++ generation/remap.rsp | 1 + generation/um/swdevice/generate.rsp | 12 +++++ generation/um/swdevice/header.txt | 4 ++ generation/um/swdevice/um-swdevice.h | 2 + .../Interop/Windows/um/swdevice/Windows.cs | 47 +++++++++++++++++++ 6 files changed, 74 insertions(+) create mode 100644 generation/um/swdevice/generate.rsp create mode 100644 generation/um/swdevice/header.txt create mode 100644 generation/um/swdevice/um-swdevice.h create mode 100644 sources/Interop/Windows/um/swdevice/Windows.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index d1344a68d6..f13ed77d33 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1869,6 +1869,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "swdevicedef", "swdevicedef" generation\um\swdevicedef\um-swdevicedef.h = generation\um\swdevicedef\um-swdevicedef.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "swdevice", "swdevice", "{422885A5-CD79-42CF-A6B2-E1156ABFC075}" + ProjectSection(SolutionItems) = preProject + generation\um\swdevice\generate.rsp = generation\um\swdevice\generate.rsp + generation\um\swdevice\header.txt = generation\um\swdevice\header.txt + generation\um\swdevice\um-swdevice.h = generation\um\swdevice\um-swdevice.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2164,6 +2171,7 @@ Global {BCE829EE-FED2-4C17-9DFD-F9D6C4DB1D45} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {09434D80-A91A-464C-966E-2B8397AB6C29} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {AD839D00-8A71-4BC9-A9DF-F931C1241F1E} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {422885A5-CD79-42CF-A6B2-E1156ABFC075} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 8550a170b7..387c258ac4 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -85,6 +85,7 @@ HSPRITE=IntPtr HSTR=IntPtr HSTRING=IntPtr HSTRING_BUFFER=IntPtr +HSWDEVICE=IntPtr HSYNTHETICPOINTERDEVICE=IntPtr HTASK=IntPtr HTOUCHINPUT=IntPtr diff --git a/generation/um/swdevice/generate.rsp b/generation/um/swdevice/generate.rsp new file mode 100644 index 0000000000..057be2599a --- /dev/null +++ b/generation/um/swdevice/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-swdevice.h +--output +../../../sources/Interop/Windows/um/swdevice +--test-output +../../../tests/Interop/Windows/um/swdevice +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/swdevice.h +--with-librarypath +*=cfgmgr32 diff --git a/generation/um/swdevice/header.txt b/generation/um/swdevice/header.txt new file mode 100644 index 0000000000..65db6a09b4 --- /dev/null +++ b/generation/um/swdevice/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/swdevice.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/swdevice/um-swdevice.h b/generation/um/swdevice/um-swdevice.h new file mode 100644 index 0000000000..c2ec7d918d --- /dev/null +++ b/generation/um/swdevice/um-swdevice.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/swdevice/Windows.cs b/sources/Interop/Windows/um/swdevice/Windows.cs new file mode 100644 index 0000000000..5bc57b2d2e --- /dev/null +++ b/sources/Interop/Windows/um/swdevice/Windows.cs @@ -0,0 +1,47 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/swdevice.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("cfgmgr32", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SwDeviceCreate([NativeTypeName("PCWSTR")] ushort* pszEnumeratorName, [NativeTypeName("PCWSTR")] ushort* pszParentDeviceInstance, [NativeTypeName("const SW_DEVICE_CREATE_INFO *")] SW_DEVICE_CREATE_INFO* pCreateInfo, [NativeTypeName("ULONG")] uint cPropertyCount, [NativeTypeName("const DEVPROPERTY *")] DEVPROPERTY* pProperties, [NativeTypeName("SW_DEVICE_CREATE_CALLBACK")] delegate* unmanaged pCallback, [NativeTypeName("PVOID")] void* pContext, [NativeTypeName("PHSWDEVICE")] IntPtr* phSwDevice); + + [DllImport("cfgmgr32", ExactSpelling = true)] + public static extern void SwDeviceClose([NativeTypeName("HSWDEVICE")] IntPtr hSwDevice); + + [DllImport("cfgmgr32", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SwDeviceSetLifetime([NativeTypeName("HSWDEVICE")] IntPtr hSwDevice, SW_DEVICE_LIFETIME Lifetime); + + [DllImport("cfgmgr32", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SwDeviceGetLifetime([NativeTypeName("HSWDEVICE")] IntPtr hSwDevice, [NativeTypeName("PSW_DEVICE_LIFETIME")] SW_DEVICE_LIFETIME* pLifetime); + + [DllImport("cfgmgr32", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SwDevicePropertySet([NativeTypeName("HSWDEVICE")] IntPtr hSwDevice, [NativeTypeName("ULONG")] uint cPropertyCount, [NativeTypeName("const DEVPROPERTY *")] DEVPROPERTY* pProperties); + + [DllImport("cfgmgr32", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SwDeviceInterfaceRegister([NativeTypeName("HSWDEVICE")] IntPtr hSwDevice, [NativeTypeName("const GUID *")] Guid* pInterfaceClassGuid, [NativeTypeName("PCWSTR")] ushort* pszReferenceString, [NativeTypeName("ULONG")] uint cPropertyCount, [NativeTypeName("const DEVPROPERTY *")] DEVPROPERTY* pProperties, [NativeTypeName("BOOL")] int fEnabled, [NativeTypeName("PWSTR *")] ushort** ppszDeviceInterfaceId); + + [DllImport("cfgmgr32", ExactSpelling = true)] + public static extern void SwMemFree([NativeTypeName("PVOID")] void* pMem); + + [DllImport("cfgmgr32", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SwDeviceInterfaceSetState([NativeTypeName("HSWDEVICE")] IntPtr hSwDevice, [NativeTypeName("PCWSTR")] ushort* pszDeviceInterfaceId, [NativeTypeName("BOOL")] int fEnabled); + + [DllImport("cfgmgr32", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int SwDeviceInterfacePropertySet([NativeTypeName("HSWDEVICE")] IntPtr hSwDevice, [NativeTypeName("PCWSTR")] ushort* pszDeviceInterfaceId, [NativeTypeName("ULONG")] uint cPropertyCount, [NativeTypeName("const DEVPROPERTY *")] DEVPROPERTY* pProperties); + } +} From f8db4e43e69ef41df1df65bdd9b05b8fb130398e Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 17:58:18 -0500 Subject: [PATCH 06/36] Add ddpbackup.h --- TerraFX.Interop.Windows.sln | 8 +++ generation/remap.rsp | 4 ++ generation/um/ddpbackup/generate.rsp | 10 ++++ generation/um/ddpbackup/header.txt | 4 ++ generation/um/ddpbackup/um-ddpbackup.h | 2 + .../Windows/um/ddpbackup/DDP_FILE_EXTENT.cs | 16 +++++ .../DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs | 13 ++++ .../um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs | 19 ++++++ .../um/ddpbackup/DedupBackupSupport.cs | 14 +++++ .../um/ddpbackup/IDedupBackupSupport.cs | 46 ++++++++++++++ .../um/ddpbackup/IDedupReadFileCallback.cs | 60 +++++++++++++++++++ .../Interop/Windows/um/ddpbackup/Windows.cs | 18 ++++++ .../um/ddpbackup/DDP_FILE_EXTENTTests.cs | 35 +++++++++++ .../ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs | 35 +++++++++++ .../um/ddpbackup/DedupBackupSupportTests.cs | 44 ++++++++++++++ .../um/ddpbackup/IDedupBackupSupportTests.cs | 51 ++++++++++++++++ .../ddpbackup/IDedupReadFileCallbackTests.cs | 51 ++++++++++++++++ 17 files changed, 430 insertions(+) create mode 100644 generation/um/ddpbackup/generate.rsp create mode 100644 generation/um/ddpbackup/header.txt create mode 100644 generation/um/ddpbackup/um-ddpbackup.h create mode 100644 sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs create mode 100644 sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs create mode 100644 sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs create mode 100644 sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs create mode 100644 sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs create mode 100644 sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs create mode 100644 sources/Interop/Windows/um/ddpbackup/Windows.cs create mode 100644 tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs create mode 100644 tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs create mode 100644 tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs create mode 100644 tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs create mode 100644 tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index f13ed77d33..081abef0a5 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1876,6 +1876,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "swdevice", "swdevice", "{42 generation\um\swdevice\um-swdevice.h = generation\um\swdevice\um-swdevice.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ddpbackup", "ddpbackup", "{B296E300-EC0C-4204-A1EE-2501C75C7B87}" + ProjectSection(SolutionItems) = preProject + generation\um\ddpbackup\generate.rsp = generation\um\ddpbackup\generate.rsp + generation\um\ddpbackup\header.txt = generation\um\ddpbackup\header.txt + generation\um\ddpbackup\um-ddpbackup.h = generation\um\ddpbackup\um-ddpbackup.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2172,6 +2179,7 @@ Global {09434D80-A91A-464C-966E-2B8397AB6C29} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {AD839D00-8A71-4BC9-A9DF-F931C1241F1E} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {422885A5-CD79-42CF-A6B2-E1156ABFC075} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {B296E300-EC0C-4204-A1EE-2501C75C7B87} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 387c258ac4..a67e01bfe7 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -428,6 +428,7 @@ IID_CODECAPI_GUID_AVEndMPEG4Video=STATIC_CODECAPI_GUID_AVEndMPEG4Video IID_CODECAPI_SetHDCPManagerContext=STATIC_CODECAPI_SetHDCPManagerContext IID_CODECAPI_VideoEncoderDisplayContentType=STATIC_CODECAPI_VideoEncoderDisplayContentType IID_DCompManipulationCompositor=CLSID_DCompManipulationCompositor +IID_DedupBackupSupport=CLSID_DedupBackupSupport IID_DirectManipulationManager=CLSID_DirectManipulationManager IID_DirectManipulationPrimaryContent=CLSID_DirectManipulationPrimaryContent IID_DirectManipulationSharedManager=CLSID_DirectManipulationSharedManager @@ -1721,6 +1722,7 @@ _DDOPTSURFACEDESC=DDOPTSURFACEDESC _DDOSCAPS=DDOSCAPS _DDOVERLAYFX=DDOVERLAYFX _DDPIXELFORMAT=DDPIXELFORMAT +_DDP_FILE_EXTENT=DDP_FILE_EXTENT _DDRGBA=DDRGBA _DDSCAPS2=DDSCAPS2 _DDSCAPS=DDSCAPS @@ -1730,6 +1732,8 @@ _DDSURFACEDESC=DDSURFACEDESC _DEBUG_EVENT=DEBUG_EVENT _DECIMATION_USAGE=DECIMATION_USAGE _DECRYPTION_STATUS_BUFFER=DECRYPTION_STATUS_BUFFER +_DEDUP_BACKUP_SUPPORT_PARAM_TYPE=DEDUP_BACKUP_SUPPORT_PARAM_TYPE +_DEDUP_CONTAINER_EXTENT=DEDUP_CONTAINER_EXTENT _DEP_SYSTEM_POLICY_TYPE=DEP_SYSTEM_POLICY_TYPE _DETECTION_TYPE=DETECTION_TYPE _DEVICEDUMP_COLLECTION_TYPE=DEVICEDUMP_COLLECTION_TYPE diff --git a/generation/um/ddpbackup/generate.rsp b/generation/um/ddpbackup/generate.rsp new file mode 100644 index 0000000000..112c163fda --- /dev/null +++ b/generation/um/ddpbackup/generate.rsp @@ -0,0 +1,10 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-ddpbackup.h +--output +../../../sources/Interop/Windows/um/ddpbackup +--test-output +../../../tests/Interop/Windows/um/ddpbackup +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ddpbackup.h diff --git a/generation/um/ddpbackup/header.txt b/generation/um/ddpbackup/header.txt new file mode 100644 index 0000000000..9f03ff4db0 --- /dev/null +++ b/generation/um/ddpbackup/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/ddpbackup/um-ddpbackup.h b/generation/um/ddpbackup/um-ddpbackup.h new file mode 100644 index 0000000000..22fe482d0d --- /dev/null +++ b/generation/um/ddpbackup/um-ddpbackup.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs b/sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs new file mode 100644 index 0000000000..d1c6946055 --- /dev/null +++ b/sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct DDP_FILE_EXTENT + { + [NativeTypeName("long long")] + public long Length; + + [NativeTypeName("long long")] + public long Offset; + } +} diff --git a/sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs b/sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs new file mode 100644 index 0000000000..7e650f6bc4 --- /dev/null +++ b/sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum DEDUP_BACKUP_SUPPORT_PARAM_TYPE + { + DEDUP_RECONSTRUCT_UNOPTIMIZED = 1, + DEDUP_RECONSTRUCT_OPTIMIZED = 2, + } +} diff --git a/sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs b/sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs new file mode 100644 index 0000000000..2ce96658b5 --- /dev/null +++ b/sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct DEDUP_CONTAINER_EXTENT + { + [NativeTypeName("ULONG")] + public uint ContainerIndex; + + [NativeTypeName("long long")] + public long StartOffset; + + [NativeTypeName("long long")] + public long Length; + } +} diff --git a/sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs b/sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs new file mode 100644 index 0000000000..65654b617f --- /dev/null +++ b/sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("73D6B2AD-2984-4715-B2E3-924C149744DD")] + public partial struct DedupBackupSupport + { + } +} diff --git a/sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs b/sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs new file mode 100644 index 0000000000..87e537e059 --- /dev/null +++ b/sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs @@ -0,0 +1,46 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("C719D963-2B2D-415E-ACF7-7EB7CA596FF4")] + [NativeTypeName("struct IDedupBackupSupport : IUnknown")] + public unsafe partial struct IDedupBackupSupport + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IDedupBackupSupport*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IDedupBackupSupport*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IDedupBackupSupport*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int RestoreFiles([NativeTypeName("ULONG")] uint NumberOfFiles, [NativeTypeName("BSTR *")] ushort** FileFullPaths, [NativeTypeName("IDedupReadFileCallback *")] IDedupReadFileCallback* Store, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("HRESULT *")] int* FileResults) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IDedupBackupSupport*)Unsafe.AsPointer(ref this), NumberOfFiles, FileFullPaths, Store, Flags, FileResults); + } + } +} diff --git a/sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs b/sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs new file mode 100644 index 0000000000..92056e5a58 --- /dev/null +++ b/sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs @@ -0,0 +1,60 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("7BACC67A-2F1D-42D0-897E-6FF62DD533BB")] + [NativeTypeName("struct IDedupReadFileCallback : IUnknown")] + public unsafe partial struct IDedupReadFileCallback + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ReadBackupFile([NativeTypeName("BSTR")] ushort* FileFullPath, [NativeTypeName("long long")] long FileOffset, [NativeTypeName("ULONG")] uint SizeToRead, [NativeTypeName("BYTE *")] byte* FileBuffer, [NativeTypeName("ULONG *")] uint* ReturnedSize, [NativeTypeName("DWORD")] uint Flags) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this), FileFullPath, FileOffset, SizeToRead, FileBuffer, ReturnedSize, Flags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int OrderContainersRestore([NativeTypeName("ULONG")] uint NumberOfContainers, [NativeTypeName("BSTR *")] ushort** ContainerPaths, [NativeTypeName("ULONG *")] uint* ReadPlanEntries, [NativeTypeName("DEDUP_CONTAINER_EXTENT **")] DEDUP_CONTAINER_EXTENT** ReadPlan) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this), NumberOfContainers, ContainerPaths, ReadPlanEntries, ReadPlan); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int PreviewContainerRead([NativeTypeName("BSTR")] ushort* FileFullPath, [NativeTypeName("ULONG")] uint NumberOfReads, [NativeTypeName("DDP_FILE_EXTENT *")] DDP_FILE_EXTENT* ReadOffsets) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this), FileFullPath, NumberOfReads, ReadOffsets); + } + } +} diff --git a/sources/Interop/Windows/um/ddpbackup/Windows.cs b/sources/Interop/Windows/um/ddpbackup/Windows.cs new file mode 100644 index 0000000000..61b56390d0 --- /dev/null +++ b/sources/Interop/Windows/um/ddpbackup/Windows.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + public static readonly Guid IID_IDedupReadFileCallback = new Guid(0x7BACC67A, 0x2F1D, 0x42D0, 0x89, 0x7E, 0x6F, 0xF6, 0x2D, 0xD5, 0x33, 0xBB); + + public static readonly Guid IID_IDedupBackupSupport = new Guid(0xC719D963, 0x2B2D, 0x415E, 0xAC, 0xF7, 0x7E, 0xB7, 0xCA, 0x59, 0x6F, 0xF4); + + public static readonly Guid CLSID_DedupBackupSupport = new Guid(0x73D6B2AD, 0x2984, 0x4715, 0xB2, 0xE3, 0x92, 0x4C, 0x14, 0x97, 0x44, 0xDD); + } +} diff --git a/tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs b/tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs new file mode 100644 index 0000000000..c1888cc8d8 --- /dev/null +++ b/tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class DDP_FILE_EXTENTTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DDP_FILE_EXTENT))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DDP_FILE_EXTENT).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(DDP_FILE_EXTENT), Is.EqualTo(16)); + } + } +} diff --git a/tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs b/tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs new file mode 100644 index 0000000000..3b88d7b81e --- /dev/null +++ b/tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class DEDUP_CONTAINER_EXTENTTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DEDUP_CONTAINER_EXTENT))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DEDUP_CONTAINER_EXTENT).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(DEDUP_CONTAINER_EXTENT), Is.EqualTo(24)); + } + } +} diff --git a/tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs b/tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs new file mode 100644 index 0000000000..f1fad7d30b --- /dev/null +++ b/tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class DedupBackupSupportTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(DedupBackupSupport).GUID, Is.EqualTo(CLSID_DedupBackupSupport)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DedupBackupSupport))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DedupBackupSupport).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(DedupBackupSupport), Is.EqualTo(1)); + } + } +} diff --git a/tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs b/tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs new file mode 100644 index 0000000000..d49e19eca8 --- /dev/null +++ b/tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IDedupBackupSupportTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IDedupBackupSupport).GUID, Is.EqualTo(IID_IDedupBackupSupport)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDedupBackupSupport))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IDedupBackupSupport).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IDedupBackupSupport), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IDedupBackupSupport), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs b/tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs new file mode 100644 index 0000000000..2e18934fe7 --- /dev/null +++ b/tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IDedupReadFileCallbackTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IDedupReadFileCallback).GUID, Is.EqualTo(IID_IDedupReadFileCallback)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IDedupReadFileCallback))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IDedupReadFileCallback).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IDedupReadFileCallback), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IDedupReadFileCallback), Is.EqualTo(4)); + } + } + } +} From edc528521fb731d374cadaf084d8f143d9f0bba9 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 18:07:19 -0500 Subject: [PATCH 07/36] Add compressapi.h --- TerraFX.Interop.Windows.sln | 8 ++ generation/remap.rsp | 2 + generation/um/compressapi/generate.rsp | 12 +++ generation/um/compressapi/header.txt | 4 + generation/um/compressapi/um-compressapi.h | 2 + .../COMPRESS_ALLOCATION_ROUTINES.cs | 19 +++++ .../compressapi/COMPRESS_INFORMATION_CLASS.cs | 14 +++ .../Interop/Windows/um/compressapi/Windows.cs | 85 +++++++++++++++++++ .../COMPRESS_ALLOCATION_ROUTINESTests.cs | 43 ++++++++++ 9 files changed, 189 insertions(+) create mode 100644 generation/um/compressapi/generate.rsp create mode 100644 generation/um/compressapi/header.txt create mode 100644 generation/um/compressapi/um-compressapi.h create mode 100644 sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs create mode 100644 sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs create mode 100644 sources/Interop/Windows/um/compressapi/Windows.cs create mode 100644 tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 081abef0a5..dcb10915f2 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1883,6 +1883,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ddpbackup", "ddpbackup", "{ generation\um\ddpbackup\um-ddpbackup.h = generation\um\ddpbackup\um-ddpbackup.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "compressapi", "compressapi", "{4C42B3B6-FED7-465D-9D7A-7565A1033C2F}" + ProjectSection(SolutionItems) = preProject + generation\um\compressapi\generate.rsp = generation\um\compressapi\generate.rsp + generation\um\compressapi\header.txt = generation\um\compressapi\header.txt + generation\um\compressapi\um-compressapi.h = generation\um\compressapi\um-compressapi.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2180,6 +2187,7 @@ Global {AD839D00-8A71-4BC9-A9DF-F931C1241F1E} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {422885A5-CD79-42CF-A6B2-E1156ABFC075} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {B296E300-EC0C-4204-A1EE-2501C75C7B87} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {4C42B3B6-FED7-465D-9D7A-7565A1033C2F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index a67e01bfe7..9a72e326cf 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -9,6 +9,7 @@ APARTMENT_SHUTDOWN_REGISTRATION_COOKIE=IntPtr audiofile_af10waveformat_tag=AUDIOFILE_AF10WAVEFORMAT audiofile_af36waveformat_tag=AUDIOFILE_AF36WAVEFORMAT COMPATIBILITY_CONTEXT_ELEMENT[]=COMPATIBILITY_CONTEXT_ELEMENT* +COMPRESSOR_HANDLE=IntPtr CONFIG_CI_PROV_INFO_=CONFIG_CI_PROV_INFO CONFIG_CI_PROV_INFO_RESULT_=CONFIG_CI_PROV_INFO_RESULT contres_cr10waveformat_tag=CONTRESCR10WAVEFORMAT @@ -1493,6 +1494,7 @@ _COMMPROP=COMMPROP _COMMTIMEOUTS=COMMTIMEOUTS _COMPATIBILITY_CONTEXT_ELEMENT=COMPATIBILITY_CONTEXT_ELEMENT _COMPONENT_FILTER=COMPONENT_FILTER +_COMPRESS_ALLOCATION_ROUTINES=COMPRESS_ALLOCATION_ROUTINES _COMPUTER_NAME_FORMAT=COMPUTER_NAME_FORMAT _COMSTAT=COMSTAT _CONSOLE_CURSOR_INFO=CONSOLE_CURSOR_INFO diff --git a/generation/um/compressapi/generate.rsp b/generation/um/compressapi/generate.rsp new file mode 100644 index 0000000000..767394524e --- /dev/null +++ b/generation/um/compressapi/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-compressapi.h +--output +../../../sources/Interop/Windows/um/compressapi +--test-output +../../../tests/Interop/Windows/um/compressapi +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/compressapi.h +--with-librarypath +*=cabinet diff --git a/generation/um/compressapi/header.txt b/generation/um/compressapi/header.txt new file mode 100644 index 0000000000..61c15d0401 --- /dev/null +++ b/generation/um/compressapi/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/compressapi/um-compressapi.h b/generation/um/compressapi/um-compressapi.h new file mode 100644 index 0000000000..8acaee9e27 --- /dev/null +++ b/generation/um/compressapi/um-compressapi.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs b/sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs new file mode 100644 index 0000000000..7ae09e78d7 --- /dev/null +++ b/sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct COMPRESS_ALLOCATION_ROUTINES + { + [NativeTypeName("PFN_COMPRESS_ALLOCATE")] + public delegate* unmanaged Allocate; + + [NativeTypeName("PFN_COMPRESS_FREE")] + public delegate* unmanaged Free; + + [NativeTypeName("PVOID")] + public void* UserContext; + } +} diff --git a/sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs new file mode 100644 index 0000000000..fbeed51ef4 --- /dev/null +++ b/sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum COMPRESS_INFORMATION_CLASS + { + COMPRESS_INFORMATION_CLASS_INVALID = 0, + COMPRESS_INFORMATION_CLASS_BLOCK_SIZE, + COMPRESS_INFORMATION_CLASS_LEVEL, + } +} diff --git a/sources/Interop/Windows/um/compressapi/Windows.cs b/sources/Interop/Windows/um/compressapi/Windows.cs new file mode 100644 index 0000000000..db0f31d670 --- /dev/null +++ b/sources/Interop/Windows/um/compressapi/Windows.cs @@ -0,0 +1,85 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int CreateCompressor([NativeTypeName("DWORD")] uint Algorithm, [NativeTypeName("PCOMPRESS_ALLOCATION_ROUTINES")] COMPRESS_ALLOCATION_ROUTINES* AllocationRoutines, [NativeTypeName("PCOMPRESSOR_HANDLE")] IntPtr* CompressorHandle); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int SetCompressorInformation([NativeTypeName("COMPRESSOR_HANDLE")] IntPtr CompressorHandle, COMPRESS_INFORMATION_CLASS CompressInformationClass, [NativeTypeName("LPCVOID")] void* CompressInformation, [NativeTypeName("SIZE_T")] nuint CompressInformationSize); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int QueryCompressorInformation([NativeTypeName("COMPRESSOR_HANDLE")] IntPtr CompressorHandle, COMPRESS_INFORMATION_CLASS CompressInformationClass, [NativeTypeName("PVOID")] void* CompressInformation, [NativeTypeName("SIZE_T")] nuint CompressInformationSize); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int Compress([NativeTypeName("COMPRESSOR_HANDLE")] IntPtr CompressorHandle, [NativeTypeName("LPCVOID")] void* UncompressedData, [NativeTypeName("SIZE_T")] nuint UncompressedDataSize, [NativeTypeName("PVOID")] void* CompressedBuffer, [NativeTypeName("SIZE_T")] nuint CompressedBufferSize, [NativeTypeName("PSIZE_T")] nuint* CompressedDataSize); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int ResetCompressor([NativeTypeName("COMPRESSOR_HANDLE")] IntPtr CompressorHandle); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int CloseCompressor([NativeTypeName("COMPRESSOR_HANDLE")] IntPtr CompressorHandle); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int CreateDecompressor([NativeTypeName("DWORD")] uint Algorithm, [NativeTypeName("PCOMPRESS_ALLOCATION_ROUTINES")] COMPRESS_ALLOCATION_ROUTINES* AllocationRoutines, [NativeTypeName("PDECOMPRESSOR_HANDLE")] IntPtr* DecompressorHandle); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int SetDecompressorInformation([NativeTypeName("DECOMPRESSOR_HANDLE")] IntPtr DecompressorHandle, COMPRESS_INFORMATION_CLASS CompressInformationClass, [NativeTypeName("LPCVOID")] void* CompressInformation, [NativeTypeName("SIZE_T")] nuint CompressInformationSize); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int QueryDecompressorInformation([NativeTypeName("DECOMPRESSOR_HANDLE")] IntPtr DecompressorHandle, COMPRESS_INFORMATION_CLASS CompressInformationClass, [NativeTypeName("PVOID")] void* CompressInformation, [NativeTypeName("SIZE_T")] nuint CompressInformationSize); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int Decompress([NativeTypeName("DECOMPRESSOR_HANDLE")] IntPtr DecompressorHandle, [NativeTypeName("LPCVOID")] void* CompressedData, [NativeTypeName("SIZE_T")] nuint CompressedDataSize, [NativeTypeName("PVOID")] void* UncompressedBuffer, [NativeTypeName("SIZE_T")] nuint UncompressedBufferSize, [NativeTypeName("PSIZE_T")] nuint* UncompressedDataSize); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int ResetDecompressor([NativeTypeName("DECOMPRESSOR_HANDLE")] IntPtr DecompressorHandle); + + [DllImport("cabinet", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int CloseDecompressor([NativeTypeName("DECOMPRESSOR_HANDLE")] IntPtr DecompressorHandle); + + [NativeTypeName("#define COMPRESS_ALGORITHM_INVALID 0")] + public const int COMPRESS_ALGORITHM_INVALID = 0; + + [NativeTypeName("#define COMPRESS_ALGORITHM_NULL 1")] + public const int COMPRESS_ALGORITHM_NULL = 1; + + [NativeTypeName("#define COMPRESS_ALGORITHM_MSZIP 2")] + public const int COMPRESS_ALGORITHM_MSZIP = 2; + + [NativeTypeName("#define COMPRESS_ALGORITHM_XPRESS 3")] + public const int COMPRESS_ALGORITHM_XPRESS = 3; + + [NativeTypeName("#define COMPRESS_ALGORITHM_XPRESS_HUFF 4")] + public const int COMPRESS_ALGORITHM_XPRESS_HUFF = 4; + + [NativeTypeName("#define COMPRESS_ALGORITHM_LZMS 5")] + public const int COMPRESS_ALGORITHM_LZMS = 5; + + [NativeTypeName("#define COMPRESS_ALGORITHM_MAX 6")] + public const int COMPRESS_ALGORITHM_MAX = 6; + + [NativeTypeName("#define COMPRESS_RAW (1 << 29)")] + public const int COMPRESS_RAW = (1 << 29); + } +} diff --git a/tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs b/tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs new file mode 100644 index 0000000000..39926a9743 --- /dev/null +++ b/tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class COMPRESS_ALLOCATION_ROUTINESTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(COMPRESS_ALLOCATION_ROUTINES))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(COMPRESS_ALLOCATION_ROUTINES).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(COMPRESS_ALLOCATION_ROUTINES), Is.EqualTo(24)); + } + else + { + Assert.That(sizeof(COMPRESS_ALLOCATION_ROUTINES), Is.EqualTo(12)); + } + } + } +} From 336664941e4809dd37994e52fd117e6ec71c8d40 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 18:34:38 -0500 Subject: [PATCH 08/36] Add RestartManager.h --- TerraFX.Interop.Windows.sln | 8 ++ generation/remap.rsp | 9 +++ generation/um/RestartManager/generate.rsp | 15 ++++ generation/um/RestartManager/header.txt | 4 + .../um/RestartManager/um-RestartManager.h | 2 + .../um/RestartManager/RM_APP_STATUS.cs | 20 +++++ .../Windows/um/RestartManager/RM_APP_TYPE.cs | 21 ++++++ .../um/RestartManager/RM_FILTER_ACTION.cs | 14 ++++ .../um/RestartManager/RM_FILTER_INFO.cs | 71 ++++++++++++++++++ .../um/RestartManager/RM_FILTER_TRIGGER.cs | 15 ++++ .../um/RestartManager/RM_PROCESS_INFO.cs | 29 ++++++++ .../um/RestartManager/RM_REBOOT_REASON.cs | 17 +++++ .../um/RestartManager/RM_SHUTDOWN_TYPE.cs | 16 ++++ .../um/RestartManager/RM_UNIQUE_PROCESS.cs | 15 ++++ .../Windows/um/RestartManager/Windows.cs | 74 +++++++++++++++++++ .../um/RestartManager/RM_FILTER_INFOTests.cs | 43 +++++++++++ .../um/RestartManager/RM_PROCESS_INFOTests.cs | 35 +++++++++ .../RestartManager/RM_UNIQUE_PROCESSTests.cs | 35 +++++++++ 18 files changed, 443 insertions(+) create mode 100644 generation/um/RestartManager/generate.rsp create mode 100644 generation/um/RestartManager/header.txt create mode 100644 generation/um/RestartManager/um-RestartManager.h create mode 100644 sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs create mode 100644 sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs create mode 100644 sources/Interop/Windows/um/RestartManager/Windows.cs create mode 100644 tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs create mode 100644 tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs create mode 100644 tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index dcb10915f2..1666498371 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1890,6 +1890,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "compressapi", "compressapi" generation\um\compressapi\um-compressapi.h = generation\um\compressapi\um-compressapi.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RestartManager", "RestartManager", "{84673C32-22B3-49EC-8CF3-BE5A9FEDA5EB}" + ProjectSection(SolutionItems) = preProject + generation\um\RestartManager\generate.rsp = generation\um\RestartManager\generate.rsp + generation\um\RestartManager\header.txt = generation\um\RestartManager\header.txt + generation\um\RestartManager\um-RestartManager.h = generation\um\RestartManager\um-RestartManager.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2188,6 +2195,7 @@ Global {422885A5-CD79-42CF-A6B2-E1156ABFC075} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {B296E300-EC0C-4204-A1EE-2501C75C7B87} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {4C42B3B6-FED7-465D-9D7A-7565A1033C2F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {84673C32-22B3-49EC-8CF3-BE5A9FEDA5EB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 9a72e326cf..f17b845826 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -2501,6 +2501,15 @@ _RETRIEVAL_POINTER_BASE=RETRIEVAL_POINTER_BASE _RGNDATA=RGNDATA _RGNDATAHEADER=RGNDATAHEADER _RIP_INFO=RIP_INFO +_RM_APP_STATUS=RM_APP_STATUS +_RM_APP_TYPE=RM_APP_TYPE +_RM_FILTER_ACTION=RM_FILTER_ACTION +_RM_FILTER_INFO=RM_FILTER_INFO +_RM_FILTER_TRIGGER=RM_FILTER_TRIGGER +_RM_PROCESS_INFO=RM_PROCESS_INFO +_RM_REBOOT_REASON=RM_REBOOT_REASON +_RM_SHUTDOWN_TYPE=RM_SHUTDOWN_TYPE +_RM_UNIQUE_PROCESS=RM_UNIQUE_PROCESS _ROI_AREA=ROI_AREA _ROOT_INFO_LUID=ROOT_INFO_LUID _RSAPUBKEY=RSAPUBKEY diff --git a/generation/um/RestartManager/generate.rsp b/generation/um/RestartManager/generate.rsp new file mode 100644 index 0000000000..cbad683a13 --- /dev/null +++ b/generation/um/RestartManager/generate.rsp @@ -0,0 +1,15 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-RestartManager.h +--output +../../../sources/Interop/Windows/um/RestartManager +--test-output +../../../tests/Interop/Windows/um/RestartManager +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/RestartManager.h +--with-attribute +RM_APP_TYPE=Flags +RM_SHUTDOWN_TYPE=Flags +--with-librarypath +*=rstrtmgr diff --git a/generation/um/RestartManager/header.txt b/generation/um/RestartManager/header.txt new file mode 100644 index 0000000000..b08de30022 --- /dev/null +++ b/generation/um/RestartManager/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/RestartManager/um-RestartManager.h b/generation/um/RestartManager/um-RestartManager.h new file mode 100644 index 0000000000..50072863c5 --- /dev/null +++ b/generation/um/RestartManager/um-RestartManager.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs b/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs new file mode 100644 index 0000000000..9144f69492 --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs @@ -0,0 +1,20 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum RM_APP_STATUS + { + RmStatusUnknown = 0x0, + RmStatusRunning = 0x1, + RmStatusStopped = 0x2, + RmStatusStoppedOther = 0x4, + RmStatusRestarted = 0x8, + RmStatusErrorOnStop = 0x10, + RmStatusErrorOnRestart = 0x20, + RmStatusShutdownMasked = 0x40, + RmStatusRestartMasked = 0x80, + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs b/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs new file mode 100644 index 0000000000..c4682a27df --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs @@ -0,0 +1,21 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum RM_APP_TYPE + { + RmUnknownApp = 0, + RmMainWindow = 1, + RmOtherWindow = 2, + RmService = 3, + RmExplorer = 4, + RmConsole = 5, + RmCritical = 1000, + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs b/sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs new file mode 100644 index 0000000000..17cb4e9ede --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum RM_FILTER_ACTION + { + RmInvalidFilterAction = 0, + RmNoRestart = 1, + RmNoShutdown = 2, + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs b/sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs new file mode 100644 index 0000000000..02e749ef3e --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs @@ -0,0 +1,71 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public unsafe partial struct RM_FILTER_INFO + { + public RM_FILTER_ACTION FilterAction; + + public RM_FILTER_TRIGGER FilterTrigger; + + [NativeTypeName("DWORD")] + public uint cbNextOffset; + + [NativeTypeName("_RM_FILTER_INFO::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/RestartManager.h:124:5)")] + public _Anonymous_e__Union Anonymous; + + public ref ushort* strFilename + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->strFilename; + } + } + } + + public ref RM_UNIQUE_PROCESS Process + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Process, 1)); + } + } + + public ref ushort* strServiceShortName + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->strServiceShortName; + } + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("LPWSTR")] + public ushort* strFilename; + + [FieldOffset(0)] + public RM_UNIQUE_PROCESS Process; + + [FieldOffset(0)] + [NativeTypeName("LPWSTR")] + public ushort* strServiceShortName; + } + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs b/sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs new file mode 100644 index 0000000000..94091ebac1 --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum RM_FILTER_TRIGGER + { + RmFilterTriggerInvalid = 0, + RmFilterTriggerFile, + RmFilterTriggerProcess, + RmFilterTriggerService, + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs b/sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs new file mode 100644 index 0000000000..d0dac4bce7 --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs @@ -0,0 +1,29 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct RM_PROCESS_INFO + { + public RM_UNIQUE_PROCESS Process; + + [NativeTypeName("WCHAR [256]")] + public fixed ushort strAppName[256]; + + [NativeTypeName("WCHAR [64]")] + public fixed ushort strServiceShortName[64]; + + public RM_APP_TYPE ApplicationType; + + [NativeTypeName("ULONG")] + public uint AppStatus; + + [NativeTypeName("DWORD")] + public uint TSSessionId; + + [NativeTypeName("BOOL")] + public int bRestartable; + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs b/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs new file mode 100644 index 0000000000..6594dba875 --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs @@ -0,0 +1,17 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum RM_REBOOT_REASON + { + RmRebootReasonNone = 0x0, + RmRebootReasonPermissionDenied = 0x1, + RmRebootReasonSessionMismatch = 0x2, + RmRebootReasonCriticalProcess = 0x4, + RmRebootReasonCriticalService = 0x8, + RmRebootReasonDetectedSelf = 0x10, + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs b/sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs new file mode 100644 index 0000000000..b01fc2ac44 --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum RM_SHUTDOWN_TYPE + { + RmForceShutdown = 0x1, + RmShutdownOnlyRegistered = 0x10, + } +} diff --git a/sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs b/sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs new file mode 100644 index 0000000000..2e02a3162e --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct RM_UNIQUE_PROCESS + { + [NativeTypeName("DWORD")] + public uint dwProcessId; + + public FILETIME ProcessStartTime; + } +} diff --git a/sources/Interop/Windows/um/RestartManager/Windows.cs b/sources/Interop/Windows/um/RestartManager/Windows.cs new file mode 100644 index 0000000000..ec3ff67a7c --- /dev/null +++ b/sources/Interop/Windows/um/RestartManager/Windows.cs @@ -0,0 +1,74 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmStartSession([NativeTypeName("DWORD *")] uint* pSessionHandle, [NativeTypeName("DWORD")] uint dwSessionFlags, [NativeTypeName("WCHAR []")] ushort* strSessionKey); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmJoinSession([NativeTypeName("DWORD *")] uint* pSessionHandle, [NativeTypeName("const WCHAR []")] ushort* strSessionKey); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmEndSession([NativeTypeName("DWORD")] uint dwSessionHandle); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmRegisterResources([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("UINT")] uint nFiles, [NativeTypeName("LPCWSTR []")] ushort** rgsFileNames, [NativeTypeName("UINT")] uint nApplications, [NativeTypeName("RM_UNIQUE_PROCESS []")] RM_UNIQUE_PROCESS* rgApplications, [NativeTypeName("UINT")] uint nServices, [NativeTypeName("LPCWSTR []")] ushort** rgsServiceNames); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmGetList([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("UINT *")] uint* pnProcInfoNeeded, [NativeTypeName("UINT *")] uint* pnProcInfo, [NativeTypeName("RM_PROCESS_INFO []")] RM_PROCESS_INFO* rgAffectedApps, [NativeTypeName("LPDWORD")] uint* lpdwRebootReasons); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmShutdown([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("ULONG")] uint lActionFlags, [NativeTypeName("RM_WRITE_STATUS_CALLBACK")] delegate* unmanaged fnStatus); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmRestart([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("DWORD")] uint dwRestartFlags, [NativeTypeName("RM_WRITE_STATUS_CALLBACK")] delegate* unmanaged fnStatus); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmCancelCurrentTask([NativeTypeName("DWORD")] uint dwSessionHandle); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmAddFilter([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("LPCWSTR")] ushort* strModuleName, [NativeTypeName("RM_UNIQUE_PROCESS *")] RM_UNIQUE_PROCESS* pProcess, [NativeTypeName("LPCWSTR")] ushort* strServiceShortName, RM_FILTER_ACTION FilterAction); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmRemoveFilter([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("LPCWSTR")] ushort* strModuleName, [NativeTypeName("RM_UNIQUE_PROCESS *")] RM_UNIQUE_PROCESS* pProcess, [NativeTypeName("LPCWSTR")] ushort* strServiceShortName); + + [DllImport("rstrtmgr", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint RmGetFilterList([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("PBYTE")] byte* pbFilterBuf, [NativeTypeName("DWORD")] uint cbFilterBuf, [NativeTypeName("LPDWORD")] uint* cbFilterBufNeeded); + + [NativeTypeName("#define RM_SESSION_KEY_LEN sizeof(GUID)")] + public const uint RM_SESSION_KEY_LEN = unchecked(16); + + [NativeTypeName("#define CCH_RM_SESSION_KEY RM_SESSION_KEY_LEN*2")] + public const uint CCH_RM_SESSION_KEY = unchecked(16 * 2); + + [NativeTypeName("#define CCH_RM_MAX_APP_NAME 255")] + public const int CCH_RM_MAX_APP_NAME = 255; + + [NativeTypeName("#define CCH_RM_MAX_SVC_NAME 63")] + public const int CCH_RM_MAX_SVC_NAME = 63; + + [NativeTypeName("#define RM_INVALID_TS_SESSION -1")] + public const int RM_INVALID_TS_SESSION = -1; + + [NativeTypeName("#define RM_INVALID_PROCESS -1")] + public const int RM_INVALID_PROCESS = -1; + } +} diff --git a/tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs b/tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs new file mode 100644 index 0000000000..0f682735c4 --- /dev/null +++ b/tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class RM_FILTER_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(RM_FILTER_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(RM_FILTER_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(RM_FILTER_INFO), Is.EqualTo(32)); + } + else + { + Assert.That(sizeof(RM_FILTER_INFO), Is.EqualTo(24)); + } + } + } +} diff --git a/tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs b/tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs new file mode 100644 index 0000000000..c7503774ec --- /dev/null +++ b/tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class RM_PROCESS_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(RM_PROCESS_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(RM_PROCESS_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(RM_PROCESS_INFO), Is.EqualTo(668)); + } + } +} diff --git a/tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs b/tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs new file mode 100644 index 0000000000..fbbd91144e --- /dev/null +++ b/tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class RM_UNIQUE_PROCESSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(RM_UNIQUE_PROCESS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(RM_UNIQUE_PROCESS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(RM_UNIQUE_PROCESS), Is.EqualTo(12)); + } + } +} From e7ea0036c5019d0aa9f57efb36feabe871178009 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 19:20:15 -0500 Subject: [PATCH 09/36] Add oobenotification.h --- TerraFX.Interop.Windows.sln | 8 +++++++ generation/um/oobenotification/generate.rsp | 12 ++++++++++ generation/um/oobenotification/header.txt | 4 ++++ .../um/oobenotification/um-oobenotification.h | 2 ++ .../Windows/um/oobenotification/Windows.cs | 24 +++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 generation/um/oobenotification/generate.rsp create mode 100644 generation/um/oobenotification/header.txt create mode 100644 generation/um/oobenotification/um-oobenotification.h create mode 100644 sources/Interop/Windows/um/oobenotification/Windows.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 1666498371..6b14cabc78 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1897,6 +1897,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RestartManager", "RestartMa generation\um\RestartManager\um-RestartManager.h = generation\um\RestartManager\um-RestartManager.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "oobenotification", "oobenotification", "{C763A292-7CAB-4848-80B0-151D9A58591F}" + ProjectSection(SolutionItems) = preProject + generation\um\oobenotification\generate.rsp = generation\um\oobenotification\generate.rsp + generation\um\oobenotification\header.txt = generation\um\oobenotification\header.txt + generation\um\oobenotification\um-oobenotification.h = generation\um\oobenotification\um-oobenotification.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2196,6 +2203,7 @@ Global {B296E300-EC0C-4204-A1EE-2501C75C7B87} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {4C42B3B6-FED7-465D-9D7A-7565A1033C2F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {84673C32-22B3-49EC-8CF3-BE5A9FEDA5EB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {C763A292-7CAB-4848-80B0-151D9A58591F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/um/oobenotification/generate.rsp b/generation/um/oobenotification/generate.rsp new file mode 100644 index 0000000000..375f8ffe0c --- /dev/null +++ b/generation/um/oobenotification/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-oobenotification.h +--output +../../../sources/Interop/Windows/um/oobenotification +--test-output +../../../tests/Interop/Windows/um/oobenotification +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/oobenotification.h +--with-librarypath +*=kernel32 diff --git a/generation/um/oobenotification/header.txt b/generation/um/oobenotification/header.txt new file mode 100644 index 0000000000..b9a9c4afde --- /dev/null +++ b/generation/um/oobenotification/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/oobenotification.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/oobenotification/um-oobenotification.h b/generation/um/oobenotification/um-oobenotification.h new file mode 100644 index 0000000000..baf09f7844 --- /dev/null +++ b/generation/um/oobenotification/um-oobenotification.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/oobenotification/Windows.cs b/sources/Interop/Windows/um/oobenotification/Windows.cs new file mode 100644 index 0000000000..85ef660fc0 --- /dev/null +++ b/sources/Interop/Windows/um/oobenotification/Windows.cs @@ -0,0 +1,24 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/oobenotification.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int OOBEComplete([NativeTypeName("PBOOL")] int* isOOBEComplete); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int RegisterWaitUntilOOBECompleted([NativeTypeName("OOBE_COMPLETED_CALLBACK")] delegate* unmanaged OOBECompletedCallback, [NativeTypeName("PVOID")] void* CallbackContext, [NativeTypeName("PVOID *")] void** WaitHandle); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int UnregisterWaitUntilOOBECompleted([NativeTypeName("PVOID")] void* WaitHandle); + } +} From 9b8e6bc653a77c5de36788e10b05caf6ce1c75b0 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 20:04:29 -0500 Subject: [PATCH 10/36] Add DocumentSource.h --- TerraFX.Interop.Windows.sln | 8 +++ generation/winrt/DocumentSource/generate.rsp | 10 ++++ generation/winrt/DocumentSource/header.txt | 4 ++ .../DocumentSource/winrt-DocumentSource.h | 2 + .../IPrintDocumentPageSource.cs | 53 +++++++++++++++++++ .../IPrintPreviewPageCollection.cs | 53 +++++++++++++++++++ .../Windows/winrt/DocumentSource/Windows.cs | 19 +++++++ .../IPrintDocumentPageSourceTests.cs | 51 ++++++++++++++++++ .../IPrintPreviewPageCollectionTests.cs | 51 ++++++++++++++++++ 9 files changed, 251 insertions(+) create mode 100644 generation/winrt/DocumentSource/generate.rsp create mode 100644 generation/winrt/DocumentSource/header.txt create mode 100644 generation/winrt/DocumentSource/winrt-DocumentSource.h create mode 100644 sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs create mode 100644 sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs create mode 100644 sources/Interop/Windows/winrt/DocumentSource/Windows.cs create mode 100644 tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs create mode 100644 tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 6b14cabc78..d62be1c36f 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1904,6 +1904,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "oobenotification", "oobenot generation\um\oobenotification\um-oobenotification.h = generation\um\oobenotification\um-oobenotification.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DocumentSource", "DocumentSource", "{173278D7-E38F-4DE6-853E-FF76BC4AAF81}" + ProjectSection(SolutionItems) = preProject + generation\winrt\DocumentSource\generate.rsp = generation\winrt\DocumentSource\generate.rsp + generation\winrt\DocumentSource\header.txt = generation\winrt\DocumentSource\header.txt + generation\winrt\DocumentSource\winrt-DocumentSource.h = generation\winrt\DocumentSource\winrt-DocumentSource.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2204,6 +2211,7 @@ Global {4C42B3B6-FED7-465D-9D7A-7565A1033C2F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {84673C32-22B3-49EC-8CF3-BE5A9FEDA5EB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C763A292-7CAB-4848-80B0-151D9A58591F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {173278D7-E38F-4DE6-853E-FF76BC4AAF81} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/winrt/DocumentSource/generate.rsp b/generation/winrt/DocumentSource/generate.rsp new file mode 100644 index 0000000000..e75dd8426c --- /dev/null +++ b/generation/winrt/DocumentSource/generate.rsp @@ -0,0 +1,10 @@ +@../../settings.rsp +@../../remap.rsp +--file +winrt-DocumentSource.h +--output +../../../sources/Interop/Windows/winrt/DocumentSource +--test-output +../../../tests/Interop/Windows/winrt/DocumentSource +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt/DocumentSource.h diff --git a/generation/winrt/DocumentSource/header.txt b/generation/winrt/DocumentSource/header.txt new file mode 100644 index 0000000000..99f64865ec --- /dev/null +++ b/generation/winrt/DocumentSource/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/winrt/DocumentSource/winrt-DocumentSource.h b/generation/winrt/DocumentSource/winrt-DocumentSource.h new file mode 100644 index 0000000000..bc815a0e5e --- /dev/null +++ b/generation/winrt/DocumentSource/winrt-DocumentSource.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs b/sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs new file mode 100644 index 0000000000..742e988364 --- /dev/null +++ b/sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs @@ -0,0 +1,53 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("A96BB1DB-172E-4667-82B5-AD97A252318F")] + [NativeTypeName("struct IPrintDocumentPageSource : IUnknown")] + public unsafe partial struct IPrintDocumentPageSource + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPreviewPageCollection([NativeTypeName("IPrintDocumentPackageTarget *")] IPrintDocumentPackageTarget* docPackageTarget, [NativeTypeName("IPrintPreviewPageCollection **")] IPrintPreviewPageCollection** docPageCollection) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this), docPackageTarget, docPageCollection); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int MakeDocument([NativeTypeName("IInspectable *")] IInspectable* printTaskOptions, [NativeTypeName("IPrintDocumentPackageTarget *")] IPrintDocumentPackageTarget* docPackageTarget) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this), printTaskOptions, docPackageTarget); + } + } +} diff --git a/sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs b/sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs new file mode 100644 index 0000000000..ace9e0a7e2 --- /dev/null +++ b/sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs @@ -0,0 +1,53 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("0B31CC62-D7EC-4747-9D6E-F2537D870F2B")] + [NativeTypeName("struct IPrintPreviewPageCollection : IUnknown")] + public unsafe partial struct IPrintPreviewPageCollection + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IPrintPreviewPageCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IPrintPreviewPageCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IPrintPreviewPageCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Paginate([NativeTypeName("UINT32")] uint currentJobPage, [NativeTypeName("IInspectable *")] IInspectable* printTaskOptions) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IPrintPreviewPageCollection*)Unsafe.AsPointer(ref this), currentJobPage, printTaskOptions); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int MakePage([NativeTypeName("UINT32")] uint desiredJobPage, [NativeTypeName("FLOAT")] float width, [NativeTypeName("FLOAT")] float height) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IPrintPreviewPageCollection*)Unsafe.AsPointer(ref this), desiredJobPage, width, height); + } + } +} diff --git a/sources/Interop/Windows/winrt/DocumentSource/Windows.cs b/sources/Interop/Windows/winrt/DocumentSource/Windows.cs new file mode 100644 index 0000000000..08e36251a4 --- /dev/null +++ b/sources/Interop/Windows/winrt/DocumentSource/Windows.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + [NativeTypeName("#define JOB_PAGE_APPLICATION_DEFINED ( ( UINT32 )-1 )")] + public const uint JOB_PAGE_APPLICATION_DEFINED = unchecked((uint)(-1)); + + public static readonly Guid IID_IPrintPreviewPageCollection = new Guid(0x0B31CC62, 0xD7EC, 0x4747, 0x9D, 0x6E, 0xF2, 0x53, 0x7D, 0x87, 0x0F, 0x2B); + + public static readonly Guid IID_IPrintDocumentPageSource = new Guid(0xA96BB1DB, 0x172E, 0x4667, 0x82, 0xB5, 0xAD, 0x97, 0xA2, 0x52, 0x31, 0x8F); + } +} diff --git a/tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs b/tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs new file mode 100644 index 0000000000..bded86ea67 --- /dev/null +++ b/tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IPrintDocumentPageSourceTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IPrintDocumentPageSource).GUID, Is.EqualTo(IID_IPrintDocumentPageSource)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPrintDocumentPageSource))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IPrintDocumentPageSource).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IPrintDocumentPageSource), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IPrintDocumentPageSource), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs b/tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs new file mode 100644 index 0000000000..714a331561 --- /dev/null +++ b/tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IPrintPreviewPageCollectionTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IPrintPreviewPageCollection).GUID, Is.EqualTo(IID_IPrintPreviewPageCollection)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IPrintPreviewPageCollection))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IPrintPreviewPageCollection).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IPrintPreviewPageCollection), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IPrintPreviewPageCollection), Is.EqualTo(4)); + } + } + } +} From 8c0b62016b69652c717f7f17d2da502551fc4f2e Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 20:17:35 -0500 Subject: [PATCH 11/36] Add shtypes.h --- TerraFX.Interop.Windows.sln | 8 +++ generation/remap.rsp | 8 +++ generation/um/shtypes/generate.rsp | 14 ++++ generation/um/shtypes/header.txt | 4 ++ generation/um/shtypes/um-shtypes.h | 2 + .../Windows/um/shtypes/COMDLG_FILTERSPEC.cs | 16 +++++ .../Windows/um/shtypes/DEVICE_SCALE_FACTOR.cs | 28 ++++++++ .../Interop/Windows/um/shtypes/ITEMIDLIST.cs | 12 ++++ .../Interop/Windows/um/shtypes/PERCEIVED.cs | 27 ++++++++ .../Interop/Windows/um/shtypes/SHCOLSTATE.cs | 34 ++++++++++ .../Windows/um/shtypes/SHELLDETAILS.cs | 19 ++++++ .../Interop/Windows/um/shtypes/SHITEMID.cs | 19 ++++++ sources/Interop/Windows/um/shtypes/STRRET.cs | 66 +++++++++++++++++++ .../Interop/Windows/um/shtypes/STRRET_TYPE.cs | 14 ++++ sources/Interop/Windows/um/shtypes/Windows.cs | 31 +++++++++ .../um/shtypes/COMDLG_FILTERSPECTests.cs | 43 ++++++++++++ .../Windows/um/shtypes/ITEMIDLISTTests.cs | 35 ++++++++++ .../Windows/um/shtypes/SHELLDETAILSTests.cs | 43 ++++++++++++ .../Windows/um/shtypes/SHITEMIDTests.cs | 35 ++++++++++ .../Interop/Windows/um/shtypes/STRRETTests.cs | 43 ++++++++++++ 20 files changed, 501 insertions(+) create mode 100644 generation/um/shtypes/generate.rsp create mode 100644 generation/um/shtypes/header.txt create mode 100644 generation/um/shtypes/um-shtypes.h create mode 100644 sources/Interop/Windows/um/shtypes/COMDLG_FILTERSPEC.cs create mode 100644 sources/Interop/Windows/um/shtypes/DEVICE_SCALE_FACTOR.cs create mode 100644 sources/Interop/Windows/um/shtypes/ITEMIDLIST.cs create mode 100644 sources/Interop/Windows/um/shtypes/PERCEIVED.cs create mode 100644 sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs create mode 100644 sources/Interop/Windows/um/shtypes/SHELLDETAILS.cs create mode 100644 sources/Interop/Windows/um/shtypes/SHITEMID.cs create mode 100644 sources/Interop/Windows/um/shtypes/STRRET.cs create mode 100644 sources/Interop/Windows/um/shtypes/STRRET_TYPE.cs create mode 100644 sources/Interop/Windows/um/shtypes/Windows.cs create mode 100644 tests/Interop/Windows/um/shtypes/COMDLG_FILTERSPECTests.cs create mode 100644 tests/Interop/Windows/um/shtypes/ITEMIDLISTTests.cs create mode 100644 tests/Interop/Windows/um/shtypes/SHELLDETAILSTests.cs create mode 100644 tests/Interop/Windows/um/shtypes/SHITEMIDTests.cs create mode 100644 tests/Interop/Windows/um/shtypes/STRRETTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index d62be1c36f..dc24b2effc 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1911,6 +1911,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DocumentSource", "DocumentS generation\winrt\DocumentSource\winrt-DocumentSource.h = generation\winrt\DocumentSource\winrt-DocumentSource.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shtypes", "shtypes", "{8FE8531C-3DE6-4015-904C-853AF211050C}" + ProjectSection(SolutionItems) = preProject + generation\um\shtypes\generate.rsp = generation\um\shtypes\generate.rsp + generation\um\shtypes\header.txt = generation\um\shtypes\header.txt + generation\um\shtypes\um-shtypes.h = generation\um\shtypes\um-shtypes.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2212,6 +2219,7 @@ Global {84673C32-22B3-49EC-8CF3-BE5A9FEDA5EB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C763A292-7CAB-4848-80B0-151D9A58591F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {173278D7-E38F-4DE6-853E-FF76BC4AAF81} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {8FE8531C-3DE6-4015-904C-853AF211050C} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index f17b845826..611c3cd219 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -1022,6 +1022,7 @@ tagPARAMDESCEX=PARAMDESCEX tagPELARRAY=PELARRAY tagPENDINGMSG=PENDINGMSG tagPENDINGTYPE=PENDINGTYPE +tagPERCEIVED=PERCEIVED tagPhysicalConnectorType=PhysicalConnectorType tagPictureAttributes=PICTUREATTRIBUTES tagPIXELFORMATDESCRIPTOR=PIXELFORMATDESCRIPTOR @@ -1095,6 +1096,7 @@ tagSERIALKEYSW=SERIALKEYSW tagSERVERCALL=SERVERCALL tagServerInformation=ServerInformation tagSF_TYPE=SF_TYPE +tagSHCOLSTATE=SHCOLSTATE tagShutdownType=ShutdownType tagSIZE=SIZE tagSOLE_AUTHENTICATION_INFO=SOLE_AUTHENTICATION_INFO @@ -1117,6 +1119,7 @@ tagSTGTY=STGTY tagSTICKYKEYS=STICKYKEYS tagStorageLayout=StorageLayout tagSTREAM_SEEK=STREAM_SEEK +tagSTRRET_TYPE=STRRET_TYPE tagSTYLESTRUCT=STYLESTRUCT tagSYSKIND=SYSKIND tagTEXTMETRICA=TEXTMETRICA @@ -1489,6 +1492,7 @@ _CM_SERVICE_NODE_TYPE=CM_SERVICE_NODE_TYPE _COAUTHIDENTITY=COAUTHIDENTITY _COAUTHINFO=COAUTHINFO _COINSTALLER_CONTEXT_DATA=COINSTALLER_CONTEXT_DATA +_COMDLG_FILTERSPEC=COMDLG_FILTERSPEC _COMMCONFIG=COMMCONFIG _COMMPROP=COMMPROP _COMMTIMEOUTS=COMMTIMEOUTS @@ -2134,6 +2138,7 @@ _INTLIST=INTLIST _IO_COUNTERS=IO_COUNTERS _IO_IRP_EXT_TRACK_OFFSET_HEADER=IO_IRP_EXT_TRACK_OFFSET_HEADER _IsolatedAppLauncherTelemetryParameters=IsolatedAppLauncherTelemetryParameters +_ITEMIDLIST=ITEMIDLIST _JIT_DEBUG_INFO=JIT_DEBUG_INFO _JOBOBJECTINFOCLASS=JOBOBJECTINFOCLASS _JOBOBJECT_ASSOCIATE_COMPLETION_PORT=JOBOBJECT_ASSOCIATE_COMPLETION_PORT @@ -2661,6 +2666,8 @@ _SE_TOKEN_USER=SE_TOKEN_USER _SharedVirtualDiskHandleState=SharedVirtualDiskHandleState _SharedVirtualDiskSupportType=SharedVirtualDiskSupportType _SHARED_VIRTUAL_DISK_SUPPORT=SHARED_VIRTUAL_DISK_SUPPORT +_SHELLDETAILS=SHELLDETAILS +_SHITEMID=SHITEMID _SHORT_SIZEDARR=WORD_SIZEDARR _SHRINK_VOLUME_INFORMATION=SHRINK_VOLUME_INFORMATION _SHRINK_VOLUME_REQUEST_TYPES=SHRINK_VOLUME_REQUEST_TYPES @@ -2891,6 +2898,7 @@ _STREAM_INFORMATION_ENTRY=STREAM_INFORMATION_ENTRY _STREAM_INFO_LEVELS=STREAM_INFO_LEVELS _STREAM_LAYOUT_ENTRY=STREAM_LAYOUT_ENTRY _STREAM_MEDIUM=STREAM_MEDIUM +_STRRET=STRRET _SUBSCRIBE_GENERIC_TLS_EXTENSION=SUBSCRIBE_GENERIC_TLS_EXTENSION _SUPPORTED_OS_INFO=SUPPORTED_OS_INFO _SW_DEVICE_CAPABILITIES=SW_DEVICE_CAPABILITIES diff --git a/generation/um/shtypes/generate.rsp b/generation/um/shtypes/generate.rsp new file mode 100644 index 0000000000..e1c1fa9db3 --- /dev/null +++ b/generation/um/shtypes/generate.rsp @@ -0,0 +1,14 @@ +@../../settings.rsp +@../../remap.rsp +--exclude +__unaligned +--file +um-shtypes.h +--output +../../../sources/Interop/Windows/um/shtypes +--test-output +../../../tests/Interop/Windows/um/shtypes +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/shtypes.h +--with-attribute +SHCOLSTATE=Flags diff --git a/generation/um/shtypes/header.txt b/generation/um/shtypes/header.txt new file mode 100644 index 0000000000..12a47b416c --- /dev/null +++ b/generation/um/shtypes/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/shtypes/um-shtypes.h b/generation/um/shtypes/um-shtypes.h new file mode 100644 index 0000000000..7475a556ec --- /dev/null +++ b/generation/um/shtypes/um-shtypes.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/shtypes/COMDLG_FILTERSPEC.cs b/sources/Interop/Windows/um/shtypes/COMDLG_FILTERSPEC.cs new file mode 100644 index 0000000000..649ead26e9 --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/COMDLG_FILTERSPEC.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct COMDLG_FILTERSPEC + { + [NativeTypeName("LPCWSTR")] + public ushort* pszName; + + [NativeTypeName("LPCWSTR")] + public ushort* pszSpec; + } +} diff --git a/sources/Interop/Windows/um/shtypes/DEVICE_SCALE_FACTOR.cs b/sources/Interop/Windows/um/shtypes/DEVICE_SCALE_FACTOR.cs new file mode 100644 index 0000000000..322d075e2c --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/DEVICE_SCALE_FACTOR.cs @@ -0,0 +1,28 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum DEVICE_SCALE_FACTOR + { + DEVICE_SCALE_FACTOR_INVALID = 0, + SCALE_100_PERCENT = 100, + SCALE_120_PERCENT = 120, + SCALE_125_PERCENT = 125, + SCALE_140_PERCENT = 140, + SCALE_150_PERCENT = 150, + SCALE_160_PERCENT = 160, + SCALE_175_PERCENT = 175, + SCALE_180_PERCENT = 180, + SCALE_200_PERCENT = 200, + SCALE_225_PERCENT = 225, + SCALE_250_PERCENT = 250, + SCALE_300_PERCENT = 300, + SCALE_350_PERCENT = 350, + SCALE_400_PERCENT = 400, + SCALE_450_PERCENT = 450, + SCALE_500_PERCENT = 500, + } +} diff --git a/sources/Interop/Windows/um/shtypes/ITEMIDLIST.cs b/sources/Interop/Windows/um/shtypes/ITEMIDLIST.cs new file mode 100644 index 0000000000..784de457be --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/ITEMIDLIST.cs @@ -0,0 +1,12 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct ITEMIDLIST + { + public SHITEMID mkid; + } +} diff --git a/sources/Interop/Windows/um/shtypes/PERCEIVED.cs b/sources/Interop/Windows/um/shtypes/PERCEIVED.cs new file mode 100644 index 0000000000..3c1072eca4 --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/PERCEIVED.cs @@ -0,0 +1,27 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum PERCEIVED + { + PERCEIVED_TYPE_FIRST = -3, + PERCEIVED_TYPE_CUSTOM = -3, + PERCEIVED_TYPE_UNSPECIFIED = -2, + PERCEIVED_TYPE_FOLDER = -1, + PERCEIVED_TYPE_UNKNOWN = 0, + PERCEIVED_TYPE_TEXT = 1, + PERCEIVED_TYPE_IMAGE = 2, + PERCEIVED_TYPE_AUDIO = 3, + PERCEIVED_TYPE_VIDEO = 4, + PERCEIVED_TYPE_COMPRESSED = 5, + PERCEIVED_TYPE_DOCUMENT = 6, + PERCEIVED_TYPE_SYSTEM = 7, + PERCEIVED_TYPE_APPLICATION = 8, + PERCEIVED_TYPE_GAMEMEDIA = 9, + PERCEIVED_TYPE_CONTACTS = 10, + PERCEIVED_TYPE_LAST = 10, + } +} diff --git a/sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs b/sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs new file mode 100644 index 0000000000..6e04aa4f98 --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum SHCOLSTATE + { + SHCOLSTATE_DEFAULT = 0, + SHCOLSTATE_TYPE_STR = 0x1, + SHCOLSTATE_TYPE_INT = 0x2, + SHCOLSTATE_TYPE_DATE = 0x3, + SHCOLSTATE_TYPEMASK = 0xf, + SHCOLSTATE_ONBYDEFAULT = 0x10, + SHCOLSTATE_SLOW = 0x20, + SHCOLSTATE_EXTENDED = 0x40, + SHCOLSTATE_SECONDARYUI = 0x80, + SHCOLSTATE_HIDDEN = 0x100, + SHCOLSTATE_PREFER_VARCMP = 0x200, + SHCOLSTATE_PREFER_FMTCMP = 0x400, + SHCOLSTATE_NOSORTBYFOLDERNESS = 0x800, + SHCOLSTATE_VIEWONLY = 0x10000, + SHCOLSTATE_BATCHREAD = 0x20000, + SHCOLSTATE_NO_GROUPBY = 0x40000, + SHCOLSTATE_FIXED_WIDTH = 0x1000, + SHCOLSTATE_NODPISCALE = 0x2000, + SHCOLSTATE_FIXED_RATIO = 0x4000, + SHCOLSTATE_DISPLAYMASK = 0xf000, + } +} diff --git a/sources/Interop/Windows/um/shtypes/SHELLDETAILS.cs b/sources/Interop/Windows/um/shtypes/SHELLDETAILS.cs new file mode 100644 index 0000000000..9166eea576 --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/SHELLDETAILS.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public partial struct SHELLDETAILS + { + public int fmt; + + public int cxChar; + + public STRRET str; + } +} diff --git a/sources/Interop/Windows/um/shtypes/SHITEMID.cs b/sources/Interop/Windows/um/shtypes/SHITEMID.cs new file mode 100644 index 0000000000..5455e01333 --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/SHITEMID.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public unsafe partial struct SHITEMID + { + [NativeTypeName("USHORT")] + public ushort cb; + + [NativeTypeName("BYTE [1]")] + public fixed byte abID[1]; + } +} diff --git a/sources/Interop/Windows/um/shtypes/STRRET.cs b/sources/Interop/Windows/um/shtypes/STRRET.cs new file mode 100644 index 0000000000..61f666d60a --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/STRRET.cs @@ -0,0 +1,66 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public unsafe partial struct STRRET + { + [NativeTypeName("UINT")] + public uint uType; + + [NativeTypeName("_STRRET::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/shtypes.h:277:36)")] + public _Anonymous_e__Union Anonymous; + + public ref ushort* pOleStr + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->pOleStr; + } + } + } + + public ref uint uOffset + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.uOffset, 1)); + } + } + + public Span cStr + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return MemoryMarshal.CreateSpan(ref Anonymous.cStr[0], 260); + } + } + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("LPWSTR")] + public ushort* pOleStr; + + [FieldOffset(0)] + [NativeTypeName("UINT")] + public uint uOffset; + + [FieldOffset(0)] + [NativeTypeName("char [260]")] + public fixed sbyte cStr[260]; + } + } +} diff --git a/sources/Interop/Windows/um/shtypes/STRRET_TYPE.cs b/sources/Interop/Windows/um/shtypes/STRRET_TYPE.cs new file mode 100644 index 0000000000..af1bf39f87 --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/STRRET_TYPE.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum STRRET_TYPE + { + STRRET_WSTR = 0, + STRRET_OFFSET = 0x1, + STRRET_CSTR = 0x2, + } +} diff --git a/sources/Interop/Windows/um/shtypes/Windows.cs b/sources/Interop/Windows/um/shtypes/Windows.cs new file mode 100644 index 0000000000..9185b3a356 --- /dev/null +++ b/sources/Interop/Windows/um/shtypes/Windows.cs @@ -0,0 +1,31 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public static partial class Windows + { + [NativeTypeName("#define PERCEIVEDFLAG_UNDEFINED 0x0000")] + public const int PERCEIVEDFLAG_UNDEFINED = 0x0000; + + [NativeTypeName("#define PERCEIVEDFLAG_SOFTCODED 0x0001")] + public const int PERCEIVEDFLAG_SOFTCODED = 0x0001; + + [NativeTypeName("#define PERCEIVEDFLAG_HARDCODED 0x0002")] + public const int PERCEIVEDFLAG_HARDCODED = 0x0002; + + [NativeTypeName("#define PERCEIVEDFLAG_NATIVESUPPORT 0x0004")] + public const int PERCEIVEDFLAG_NATIVESUPPORT = 0x0004; + + [NativeTypeName("#define PERCEIVEDFLAG_GDIPLUS 0x0010")] + public const int PERCEIVEDFLAG_GDIPLUS = 0x0010; + + [NativeTypeName("#define PERCEIVEDFLAG_WMSDK 0x0020")] + public const int PERCEIVEDFLAG_WMSDK = 0x0020; + + [NativeTypeName("#define PERCEIVEDFLAG_ZIPFOLDER 0x0040")] + public const int PERCEIVEDFLAG_ZIPFOLDER = 0x0040; + } +} diff --git a/tests/Interop/Windows/um/shtypes/COMDLG_FILTERSPECTests.cs b/tests/Interop/Windows/um/shtypes/COMDLG_FILTERSPECTests.cs new file mode 100644 index 0000000000..7cb9880f37 --- /dev/null +++ b/tests/Interop/Windows/um/shtypes/COMDLG_FILTERSPECTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class COMDLG_FILTERSPECTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(COMDLG_FILTERSPEC))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(COMDLG_FILTERSPEC).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(COMDLG_FILTERSPEC), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(COMDLG_FILTERSPEC), Is.EqualTo(8)); + } + } + } +} diff --git a/tests/Interop/Windows/um/shtypes/ITEMIDLISTTests.cs b/tests/Interop/Windows/um/shtypes/ITEMIDLISTTests.cs new file mode 100644 index 0000000000..1da98b6d65 --- /dev/null +++ b/tests/Interop/Windows/um/shtypes/ITEMIDLISTTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class ITEMIDLISTTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ITEMIDLIST))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(ITEMIDLIST).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(ITEMIDLIST), Is.EqualTo(3)); + } + } +} diff --git a/tests/Interop/Windows/um/shtypes/SHELLDETAILSTests.cs b/tests/Interop/Windows/um/shtypes/SHELLDETAILSTests.cs new file mode 100644 index 0000000000..69ed34da4b --- /dev/null +++ b/tests/Interop/Windows/um/shtypes/SHELLDETAILSTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class SHELLDETAILSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(SHELLDETAILS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(SHELLDETAILS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(SHELLDETAILS), Is.EqualTo(280)); + } + else + { + Assert.That(sizeof(SHELLDETAILS), Is.EqualTo(272)); + } + } + } +} diff --git a/tests/Interop/Windows/um/shtypes/SHITEMIDTests.cs b/tests/Interop/Windows/um/shtypes/SHITEMIDTests.cs new file mode 100644 index 0000000000..c0a90f9812 --- /dev/null +++ b/tests/Interop/Windows/um/shtypes/SHITEMIDTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class SHITEMIDTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(SHITEMID))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(SHITEMID).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(SHITEMID), Is.EqualTo(3)); + } + } +} diff --git a/tests/Interop/Windows/um/shtypes/STRRETTests.cs b/tests/Interop/Windows/um/shtypes/STRRETTests.cs new file mode 100644 index 0000000000..2466a7d06c --- /dev/null +++ b/tests/Interop/Windows/um/shtypes/STRRETTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class STRRETTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(STRRET))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(STRRET).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(STRRET), Is.EqualTo(272)); + } + else + { + Assert.That(sizeof(STRRET), Is.EqualTo(264)); + } + } + } +} From 2773592c0031fa4268202f2fc5d242b917d87b4d Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 20:21:05 -0500 Subject: [PATCH 12/36] Add IMessageDispatcher.h --- TerraFX.Interop.Windows.sln | 8 +++ generation/um/IMessageDispatcher/generate.rsp | 10 +++ generation/um/IMessageDispatcher/header.txt | 4 ++ .../um-IMessageDispatcher.h | 2 + .../IMessageDispatcher/IMessageDispatcher.cs | 67 +++++++++++++++++++ .../Windows/um/IMessageDispatcher/Windows.cs | 14 ++++ .../IMessageDispatcherTests.cs | 51 ++++++++++++++ 7 files changed, 156 insertions(+) create mode 100644 generation/um/IMessageDispatcher/generate.rsp create mode 100644 generation/um/IMessageDispatcher/header.txt create mode 100644 generation/um/IMessageDispatcher/um-IMessageDispatcher.h create mode 100644 sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs create mode 100644 sources/Interop/Windows/um/IMessageDispatcher/Windows.cs create mode 100644 tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index dc24b2effc..5cc591dd00 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1918,6 +1918,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shtypes", "shtypes", "{8FE8 generation\um\shtypes\um-shtypes.h = generation\um\shtypes\um-shtypes.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IMessageDispatcher", "IMessageDispatcher", "{2DACC2E6-8B04-448D-9780-1CB4C9BDD7EF}" + ProjectSection(SolutionItems) = preProject + generation\um\IMessageDispatcher\generate.rsp = generation\um\IMessageDispatcher\generate.rsp + generation\um\IMessageDispatcher\header.txt = generation\um\IMessageDispatcher\header.txt + generation\um\IMessageDispatcher\um-IMessageDispatcher.h = generation\um\IMessageDispatcher\um-IMessageDispatcher.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2220,6 +2227,7 @@ Global {C763A292-7CAB-4848-80B0-151D9A58591F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {173278D7-E38F-4DE6-853E-FF76BC4AAF81} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {8FE8531C-3DE6-4015-904C-853AF211050C} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {2DACC2E6-8B04-448D-9780-1CB4C9BDD7EF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/um/IMessageDispatcher/generate.rsp b/generation/um/IMessageDispatcher/generate.rsp new file mode 100644 index 0000000000..ebcff7e50a --- /dev/null +++ b/generation/um/IMessageDispatcher/generate.rsp @@ -0,0 +1,10 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-IMessageDispatcher.h +--output +../../../sources/Interop/Windows/um/IMessageDispatcher +--test-output +../../../tests/Interop/Windows/um/IMessageDispatcher +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/IMessageDispatcher.h diff --git a/generation/um/IMessageDispatcher/header.txt b/generation/um/IMessageDispatcher/header.txt new file mode 100644 index 0000000000..3d2ea34f7a --- /dev/null +++ b/generation/um/IMessageDispatcher/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/IMessageDispatcher/um-IMessageDispatcher.h b/generation/um/IMessageDispatcher/um-IMessageDispatcher.h new file mode 100644 index 0000000000..698cc9be9b --- /dev/null +++ b/generation/um/IMessageDispatcher/um-IMessageDispatcher.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs b/sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs new file mode 100644 index 0000000000..05620222f6 --- /dev/null +++ b/sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs @@ -0,0 +1,67 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("F5F84C8F-CFD0-4CD6-B66B-C5D26FF1689D")] + [NativeTypeName("struct IMessageDispatcher : IInspectable")] + public unsafe partial struct IMessageDispatcher + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IMessageDispatcher*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IMessageDispatcher*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IMessageDispatcher*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IMessageDispatcher*)Unsafe.AsPointer(ref this), iidCount, iids); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetRuntimeClassName([NativeTypeName("HSTRING *")] IntPtr* className) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IMessageDispatcher*)Unsafe.AsPointer(ref this), className); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetTrustLevel([NativeTypeName("TrustLevel *")] TrustLevel* trustLevel) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IMessageDispatcher*)Unsafe.AsPointer(ref this), trustLevel); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int PumpMessages() + { + return ((delegate* unmanaged)(lpVtbl[6]))((IMessageDispatcher*)Unsafe.AsPointer(ref this)); + } + } +} diff --git a/sources/Interop/Windows/um/IMessageDispatcher/Windows.cs b/sources/Interop/Windows/um/IMessageDispatcher/Windows.cs new file mode 100644 index 0000000000..2bb99be795 --- /dev/null +++ b/sources/Interop/Windows/um/IMessageDispatcher/Windows.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + public static readonly Guid IID_IMessageDispatcher = new Guid(0xF5F84C8F, 0xCFD0, 0x4CD6, 0xB6, 0x6B, 0xC5, 0xD2, 0x6F, 0xF1, 0x68, 0x9D); + } +} diff --git a/tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs b/tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs new file mode 100644 index 0000000000..08ff358e0e --- /dev/null +++ b/tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IMessageDispatcherTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IMessageDispatcher).GUID, Is.EqualTo(IID_IMessageDispatcher)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IMessageDispatcher))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IMessageDispatcher).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IMessageDispatcher), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IMessageDispatcher), Is.EqualTo(4)); + } + } + } +} From 609442510e1c0bdb5f05987bfedc20640acba0db Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 20:26:02 -0500 Subject: [PATCH 13/36] Add MessageDispatcherApi.h --- TerraFX.Interop.Windows.sln | 8 ++++++++ .../winrt/MessageDispatcherApi/generate.rsp | 12 ++++++++++++ .../winrt/MessageDispatcherApi/header.txt | 4 ++++ .../winrt-MessageDispatcherApi.h | 2 ++ .../winrt/MessageDispatcherApi/Windows.cs | 18 ++++++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 generation/winrt/MessageDispatcherApi/generate.rsp create mode 100644 generation/winrt/MessageDispatcherApi/header.txt create mode 100644 generation/winrt/MessageDispatcherApi/winrt-MessageDispatcherApi.h create mode 100644 sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 5cc591dd00..203d7b7515 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1925,6 +1925,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IMessageDispatcher", "IMess generation\um\IMessageDispatcher\um-IMessageDispatcher.h = generation\um\IMessageDispatcher\um-IMessageDispatcher.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MessageDispatcherApi", "MessageDispatcherApi", "{A68F348B-DDA4-4B37-85E2-F0936FB0ACAA}" + ProjectSection(SolutionItems) = preProject + generation\winrt\MessageDispatcherApi\generate.rsp = generation\winrt\MessageDispatcherApi\generate.rsp + generation\winrt\MessageDispatcherApi\header.txt = generation\winrt\MessageDispatcherApi\header.txt + generation\winrt\MessageDispatcherApi\winrt-MessageDispatcherApi.h = generation\winrt\MessageDispatcherApi\winrt-MessageDispatcherApi.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2228,6 +2235,7 @@ Global {173278D7-E38F-4DE6-853E-FF76BC4AAF81} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {8FE8531C-3DE6-4015-904C-853AF211050C} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2DACC2E6-8B04-448D-9780-1CB4C9BDD7EF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {A68F348B-DDA4-4B37-85E2-F0936FB0ACAA} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/winrt/MessageDispatcherApi/generate.rsp b/generation/winrt/MessageDispatcherApi/generate.rsp new file mode 100644 index 0000000000..f0fa2a8318 --- /dev/null +++ b/generation/winrt/MessageDispatcherApi/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +winrt-MessageDispatcherApi.h +--output +../../../sources/Interop/Windows/winrt/MessageDispatcherApi +--test-output +../../../tests/Interop/Windows/winrt/MessageDispatcherApi +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt/MessageDispatcherApi.h +--with-librarypath +*=ole32 diff --git a/generation/winrt/MessageDispatcherApi/header.txt b/generation/winrt/MessageDispatcherApi/header.txt new file mode 100644 index 0000000000..6d02b2b4a5 --- /dev/null +++ b/generation/winrt/MessageDispatcherApi/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/MessageDispatcherApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/winrt/MessageDispatcherApi/winrt-MessageDispatcherApi.h b/generation/winrt/MessageDispatcherApi/winrt-MessageDispatcherApi.h new file mode 100644 index 0000000000..396050bf90 --- /dev/null +++ b/generation/winrt/MessageDispatcherApi/winrt-MessageDispatcherApi.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs b/sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs new file mode 100644 index 0000000000..0bc2ecd59b --- /dev/null +++ b/sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/MessageDispatcherApi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("ole32", ExactSpelling = true)] + public static extern void CoSetMessageDispatcher([NativeTypeName("PMessageDispatcher")] IMessageDispatcher* pMessageDispatcher); + + [DllImport("ole32", ExactSpelling = true)] + public static extern void CoHandlePriorityEventsFromMessagePump(); + } +} From d54f16e83914f180149270f3251b21eb0e7c84f1 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 20:32:04 -0500 Subject: [PATCH 14/36] Add Wsdevlicensing.h --- TerraFX.Interop.Windows.sln | 8 ++++++ generation/winrt/Wsdevlicensing/generate.rsp | 12 +++++++++ generation/winrt/Wsdevlicensing/header.txt | 4 +++ .../Wsdevlicensing/winrt-Wsdevlicensing.h | 2 ++ .../Windows/winrt/Wsdevlicensing/Windows.cs | 25 +++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 generation/winrt/Wsdevlicensing/generate.rsp create mode 100644 generation/winrt/Wsdevlicensing/header.txt create mode 100644 generation/winrt/Wsdevlicensing/winrt-Wsdevlicensing.h create mode 100644 sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 203d7b7515..cf5057a833 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1932,6 +1932,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MessageDispatcherApi", "Mes generation\winrt\MessageDispatcherApi\winrt-MessageDispatcherApi.h = generation\winrt\MessageDispatcherApi\winrt-MessageDispatcherApi.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wsdevlicensing", "Wsdevlicensing", "{611800BA-4A44-4D89-8A5F-89B3926AA7DF}" + ProjectSection(SolutionItems) = preProject + generation\winrt\Wsdevlicensing\generate.rsp = generation\winrt\Wsdevlicensing\generate.rsp + generation\winrt\Wsdevlicensing\header.txt = generation\winrt\Wsdevlicensing\header.txt + generation\winrt\Wsdevlicensing\winrt-Wsdevlicensing.h = generation\winrt\Wsdevlicensing\winrt-Wsdevlicensing.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2236,6 +2243,7 @@ Global {8FE8531C-3DE6-4015-904C-853AF211050C} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2DACC2E6-8B04-448D-9780-1CB4C9BDD7EF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {A68F348B-DDA4-4B37-85E2-F0936FB0ACAA} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {611800BA-4A44-4D89-8A5F-89B3926AA7DF} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/winrt/Wsdevlicensing/generate.rsp b/generation/winrt/Wsdevlicensing/generate.rsp new file mode 100644 index 0000000000..f5866ec9b9 --- /dev/null +++ b/generation/winrt/Wsdevlicensing/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +winrt-Wsdevlicensing.h +--output +../../../sources/Interop/Windows/winrt/Wsdevlicensing +--test-output +../../../tests/Interop/Windows/winrt/Wsdevlicensing +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt/Wsdevlicensing.h +--with-librarypath +*=wsclient diff --git a/generation/winrt/Wsdevlicensing/header.txt b/generation/winrt/Wsdevlicensing/header.txt new file mode 100644 index 0000000000..608b4cba4f --- /dev/null +++ b/generation/winrt/Wsdevlicensing/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/Wsdevlicensing.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/winrt/Wsdevlicensing/winrt-Wsdevlicensing.h b/generation/winrt/Wsdevlicensing/winrt-Wsdevlicensing.h new file mode 100644 index 0000000000..63b378c281 --- /dev/null +++ b/generation/winrt/Wsdevlicensing/winrt-Wsdevlicensing.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs b/sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs new file mode 100644 index 0000000000..1f20dab545 --- /dev/null +++ b/sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs @@ -0,0 +1,25 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from winrt/Wsdevlicensing.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("wsclient", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int CheckDeveloperLicense([NativeTypeName("FILETIME *")] FILETIME* pExpiration); + + [DllImport("wsclient", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int AcquireDeveloperLicense([NativeTypeName("HWND")] IntPtr hwndParent, [NativeTypeName("FILETIME *")] FILETIME* pExpiration); + + [DllImport("wsclient", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int RemoveDeveloperLicense([NativeTypeName("HWND")] IntPtr hwndParent); + } +} From 5dd4f50f90b2ff2c35762346c942bc6c782a3131 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 21:01:02 -0500 Subject: [PATCH 15/36] Add MSChapp.h --- TerraFX.Interop.Windows.sln | 8 +++++ generation/remap.rsp | 4 +++ generation/um/MSChapp/generate.rsp | 12 +++++++ generation/um/MSChapp/header.txt | 4 +++ generation/um/MSChapp/um-MSChapp.h | 2 ++ .../Windows/um/MSChapp/CYPHER_BLOCK.cs | 13 +++++++ .../um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs | 35 +++++++++++++++++++ .../Windows/um/MSChapp/LM_OWF_PASSWORD.cs | 35 +++++++++++++++++++ .../MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs | 13 +++++++ sources/Interop/Windows/um/MSChapp/Windows.cs | 23 ++++++++++++ .../Windows/um/MSChapp/CYPHER_BLOCKTests.cs | 35 +++++++++++++++++++ .../MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs | 35 +++++++++++++++++++ .../um/MSChapp/LM_OWF_PASSWORDTests.cs | 35 +++++++++++++++++++ .../SAMPR_ENCRYPTED_USER_PASSWORDTests.cs | 35 +++++++++++++++++++ 14 files changed, 289 insertions(+) create mode 100644 generation/um/MSChapp/generate.rsp create mode 100644 generation/um/MSChapp/header.txt create mode 100644 generation/um/MSChapp/um-MSChapp.h create mode 100644 sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs create mode 100644 sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs create mode 100644 sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs create mode 100644 sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs create mode 100644 sources/Interop/Windows/um/MSChapp/Windows.cs create mode 100644 tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs create mode 100644 tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs create mode 100644 tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs create mode 100644 tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index cf5057a833..99913361a3 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1939,6 +1939,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wsdevlicensing", "Wsdevlice generation\winrt\Wsdevlicensing\winrt-Wsdevlicensing.h = generation\winrt\Wsdevlicensing\winrt-Wsdevlicensing.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MSChapp", "MSChapp", "{DC0615E4-CFF8-47B5-AD41-80FEE842CE39}" + ProjectSection(SolutionItems) = preProject + generation\um\MSChapp\generate.rsp = generation\um\MSChapp\generate.rsp + generation\um\MSChapp\header.txt = generation\um\MSChapp\header.txt + generation\um\MSChapp\um-MSChapp.h = generation\um\MSChapp\um-MSChapp.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2244,6 +2251,7 @@ Global {2DACC2E6-8B04-448D-9780-1CB4C9BDD7EF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {A68F348B-DDA4-4B37-85E2-F0936FB0ACAA} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {611800BA-4A44-4D89-8A5F-89B3926AA7DF} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {DC0615E4-CFF8-47B5-AD41-80FEE842CE39} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 611c3cd219..4cb7b198fd 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -1652,6 +1652,7 @@ _CTL_USAGE_MATCH=CTL_USAGE_MATCH _CTL_VERIFY_USAGE_PARA=CTL_VERIFY_USAGE_PARA _CTL_VERIFY_USAGE_STATUS=CTL_VERIFY_USAGE_STATUS _CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG=CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG +_CYPHER_BLOCK=CYPHER_BLOCK _D3D10_SHADER_BUFFER_DESC=D3D10_SHADER_BUFFER_DESC _D3D10_SHADER_DESC=D3D10_SHADER_DESC _D3D10_SHADER_INPUT_BIND_DESC=D3D10_SHADER_INPUT_BIND_DESC @@ -1873,6 +1874,7 @@ _ENCLAVE_INIT_INFO_VBS=ENCLAVE_INIT_INFO_VBS _ENCLAVE_INIT_INFO_VBS_BASIC=ENCLAVE_INIT_INFO_VBS_BASIC _ENCLAVE_LOAD_DATA_VBS_BASIC=ENCLAVE_LOAD_DATA_VBS_BASIC _ENCRYPTED_DATA_INFO=ENCRYPTED_DATA_INFO +_ENCRYPTED_LM_OWF_PASSWORD=ENCRYPTED_LM_OWF_PASSWORD _ENCRYPTION_BUFFER=ENCRYPTION_BUFFER _ENCRYPTION_KEY_CTRL_INPUT=ENCRYPTION_KEY_CTRL_INPUT _ENLISTMENT_BASIC_INFORMATION=ENLISTMENT_BASIC_INFORMATION @@ -2169,6 +2171,7 @@ _KTMOBJECT_TYPE=KTMOBJECT_TYPE _LARGE_INTEGER=LARGE_INTEGER _LDT_ENTRY=LDT_ENTRY _LIST_ENTRY=LIST_ENTRY +_LM_OWF_PASSWORD=LM_OWF_PASSWORD _LOAD_DLL_DEBUG_INFO=LOAD_DLL_DEBUG_INFO _LOGICAL_PROCESSOR_RELATIONSHIP=LOGICAL_PROCESSOR_RELATIONSHIP _LONG_SIZEDARR=DWORD_SIZEDARR @@ -2527,6 +2530,7 @@ _RTL_SRWLOCK=RTL_SRWLOCK _RTL_SYSTEM_GLOBAL_DATA_ID=RTL_SYSTEM_GLOBAL_DATA_ID _RTL_UMS_SCHEDULER_REASON=RTL_UMS_SCHEDULER_REASON _RTL_UMS_THREAD_INFO_CLASS=RTL_UMS_THREAD_INFO_CLASS +_SAMPR_ENCRYPTED_USER_PASSWORD=SAMPR_ENCRYPTED_USER_PASSWORD _SCHANNEL_ALERT_TOKEN=SCHANNEL_ALERT_TOKEN _SCHANNEL_ALG=SCHANNEL_ALG _SCHANNEL_CERT_HASH=SCHANNEL_CERT_HASH diff --git a/generation/um/MSChapp/generate.rsp b/generation/um/MSChapp/generate.rsp new file mode 100644 index 0000000000..7ecaa4fabf --- /dev/null +++ b/generation/um/MSChapp/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-MSChapp.h +--output +../../../sources/Interop/Windows/um/MSChapp +--test-output +../../../tests/Interop/Windows/um/MSChapp +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/MSChapp.h +--with-librarypath +*=advapi32 diff --git a/generation/um/MSChapp/header.txt b/generation/um/MSChapp/header.txt new file mode 100644 index 0000000000..10fdd0004c --- /dev/null +++ b/generation/um/MSChapp/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/MSChapp/um-MSChapp.h b/generation/um/MSChapp/um-MSChapp.h new file mode 100644 index 0000000000..e99f3dc193 --- /dev/null +++ b/generation/um/MSChapp/um-MSChapp.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs b/sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs new file mode 100644 index 0000000000..bfec7a31af --- /dev/null +++ b/sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct CYPHER_BLOCK + { + [NativeTypeName("CHAR [8]")] + public fixed sbyte data[8]; + } +} diff --git a/sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs b/sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs new file mode 100644 index 0000000000..7222d024e1 --- /dev/null +++ b/sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public partial struct ENCRYPTED_LM_OWF_PASSWORD + { + [NativeTypeName("CYPHER_BLOCK [2]")] + public _data_e__FixedBuffer data; + + public partial struct _data_e__FixedBuffer + { + public CYPHER_BLOCK e0; + public CYPHER_BLOCK e1; + + public ref CYPHER_BLOCK this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref AsSpan()[index]; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2); + } + } +} diff --git a/sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs b/sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs new file mode 100644 index 0000000000..e2291ffb06 --- /dev/null +++ b/sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public partial struct LM_OWF_PASSWORD + { + [NativeTypeName("CYPHER_BLOCK [2]")] + public _data_e__FixedBuffer data; + + public partial struct _data_e__FixedBuffer + { + public CYPHER_BLOCK e0; + public CYPHER_BLOCK e1; + + public ref CYPHER_BLOCK this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref AsSpan()[index]; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan() => MemoryMarshal.CreateSpan(ref e0, 2); + } + } +} diff --git a/sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs b/sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs new file mode 100644 index 0000000000..b19bd1499f --- /dev/null +++ b/sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct SAMPR_ENCRYPTED_USER_PASSWORD + { + [NativeTypeName("UCHAR [516]")] + public fixed byte Buffer[516]; + } +} diff --git a/sources/Interop/Windows/um/MSChapp/Windows.cs b/sources/Interop/Windows/um/MSChapp/Windows.cs new file mode 100644 index 0000000000..5d135af136 --- /dev/null +++ b/sources/Interop/Windows/um/MSChapp/Windows.cs @@ -0,0 +1,23 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("advapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint MSChapSrvChangePassword([NativeTypeName("PWSTR")] ushort* ServerName, [NativeTypeName("PWSTR")] ushort* UserName, [NativeTypeName("BOOLEAN")] byte LmOldPresent, [NativeTypeName("PLM_OWF_PASSWORD")] LM_OWF_PASSWORD* LmOldOwfPassword, [NativeTypeName("PLM_OWF_PASSWORD")] LM_OWF_PASSWORD* LmNewOwfPassword, [NativeTypeName("PNT_OWF_PASSWORD")] LM_OWF_PASSWORD* NtOldOwfPassword, [NativeTypeName("PNT_OWF_PASSWORD")] LM_OWF_PASSWORD* NtNewOwfPassword); + + [DllImport("advapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint MSChapSrvChangePassword2([NativeTypeName("PWSTR")] ushort* ServerName, [NativeTypeName("PWSTR")] ushort* UserName, [NativeTypeName("PSAMPR_ENCRYPTED_USER_PASSWORD")] SAMPR_ENCRYPTED_USER_PASSWORD* NewPasswordEncryptedWithOldNt, [NativeTypeName("PENCRYPTED_NT_OWF_PASSWORD")] ENCRYPTED_LM_OWF_PASSWORD* OldNtOwfPasswordEncryptedWithNewNt, [NativeTypeName("BOOLEAN")] byte LmPresent, [NativeTypeName("PSAMPR_ENCRYPTED_USER_PASSWORD")] SAMPR_ENCRYPTED_USER_PASSWORD* NewPasswordEncryptedWithOldLm, [NativeTypeName("PENCRYPTED_LM_OWF_PASSWORD")] ENCRYPTED_LM_OWF_PASSWORD* OldLmOwfPasswordEncryptedWithNewLmOrNt); + + [NativeTypeName("#define CYPHER_BLOCK_LENGTH 8")] + public const int CYPHER_BLOCK_LENGTH = 8; + } +} diff --git a/tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs b/tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs new file mode 100644 index 0000000000..2dfd73f7f2 --- /dev/null +++ b/tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class CYPHER_BLOCKTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(CYPHER_BLOCK))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(CYPHER_BLOCK).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(CYPHER_BLOCK), Is.EqualTo(8)); + } + } +} diff --git a/tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs b/tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs new file mode 100644 index 0000000000..54b1efd138 --- /dev/null +++ b/tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class ENCRYPTED_LM_OWF_PASSWORDTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ENCRYPTED_LM_OWF_PASSWORD))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(ENCRYPTED_LM_OWF_PASSWORD).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(ENCRYPTED_LM_OWF_PASSWORD), Is.EqualTo(16)); + } + } +} diff --git a/tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs b/tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs new file mode 100644 index 0000000000..03b5814f4d --- /dev/null +++ b/tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class LM_OWF_PASSWORDTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(LM_OWF_PASSWORD))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(LM_OWF_PASSWORD).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(LM_OWF_PASSWORD), Is.EqualTo(16)); + } + } +} diff --git a/tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs b/tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs new file mode 100644 index 0000000000..e3747c3812 --- /dev/null +++ b/tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class SAMPR_ENCRYPTED_USER_PASSWORDTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(SAMPR_ENCRYPTED_USER_PASSWORD))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(SAMPR_ENCRYPTED_USER_PASSWORD).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(SAMPR_ENCRYPTED_USER_PASSWORD), Is.EqualTo(516)); + } + } +} From d400e17f8533b8657c5f5e29ac89e6d54a1ab1b6 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 21:13:56 -0500 Subject: [PATCH 16/36] Add ProcessSnapshot.h --- TerraFX.Interop.Windows.sln | 8 + generation/remap.rsp | 2 + generation/um/ProcessSnapshot/generate.rsp | 18 ++ generation/um/ProcessSnapshot/header.txt | 4 + .../um/ProcessSnapshot/um-ProcessSnapshot.h | 2 + .../um/ProcessSnapshot/PSS_ALLOCATOR.cs | 19 ++ .../PSS_AUXILIARY_PAGES_INFORMATION.cs | 13 ++ .../PSS_AUXILIARY_PAGE_ENTRY.cs | 23 +++ .../um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs | 36 ++++ .../um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs | 16 ++ .../um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs | 178 ++++++++++++++++++ .../um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs | 19 ++ .../ProcessSnapshot/PSS_HANDLE_INFORMATION.cs | 13 ++ .../PSS_HANDLE_TRACE_INFORMATION.cs | 18 ++ .../um/ProcessSnapshot/PSS_OBJECT_TYPE.cs | 18 ++ .../PSS_PERFORMANCE_COUNTERS.cs | 46 +++++ .../um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs | 20 ++ .../PSS_PROCESS_INFORMATION.cs | 83 ++++++++ .../PSS_QUERY_INFORMATION_CLASS.cs | 19 ++ .../um/ProcessSnapshot/PSS_THREAD_ENTRY.cs | 59 ++++++ .../um/ProcessSnapshot/PSS_THREAD_FLAGS.cs | 16 ++ .../ProcessSnapshot/PSS_THREAD_INFORMATION.cs | 16 ++ .../PSS_VA_CLONE_INFORMATION.cs | 15 ++ .../um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs | 49 +++++ .../PSS_VA_SPACE_INFORMATION.cs | 13 ++ .../PSS_WALK_INFORMATION_CLASS.cs | 15 ++ .../Windows/um/ProcessSnapshot/Windows.cs | 56 ++++++ .../um/ProcessSnapshot/PSS_ALLOCATORTests.cs | 43 +++++ .../PSS_AUXILIARY_PAGES_INFORMATIONTests.cs | 35 ++++ .../PSS_AUXILIARY_PAGE_ENTRYTests.cs | 43 +++++ .../ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs | 43 +++++ .../PSS_HANDLE_INFORMATIONTests.cs | 35 ++++ .../PSS_HANDLE_TRACE_INFORMATIONTests.cs | 43 +++++ .../PSS_PERFORMANCE_COUNTERSTests.cs | 35 ++++ .../PSS_PROCESS_INFORMATIONTests.cs | 43 +++++ .../ProcessSnapshot/PSS_THREAD_ENTRYTests.cs | 43 +++++ .../PSS_THREAD_INFORMATIONTests.cs | 35 ++++ .../PSS_VA_CLONE_INFORMATIONTests.cs | 43 +++++ .../PSS_VA_SPACE_ENTRYTests.cs | 43 +++++ .../PSS_VA_SPACE_INFORMATIONTests.cs | 35 ++++ 40 files changed, 1313 insertions(+) create mode 100644 generation/um/ProcessSnapshot/generate.rsp create mode 100644 generation/um/ProcessSnapshot/header.txt create mode 100644 generation/um/ProcessSnapshot/um-ProcessSnapshot.h create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs create mode 100644 sources/Interop/Windows/um/ProcessSnapshot/Windows.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs create mode 100644 tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 99913361a3..1bd008833f 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1946,6 +1946,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MSChapp", "MSChapp", "{DC06 generation\um\MSChapp\um-MSChapp.h = generation\um\MSChapp\um-MSChapp.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProcessSnapshot", "ProcessSnapshot", "{D1C8B976-2C97-4A0C-B22A-C3B47FBB8FF8}" + ProjectSection(SolutionItems) = preProject + generation\um\ProcessSnapshot\generate.rsp = generation\um\ProcessSnapshot\generate.rsp + generation\um\ProcessSnapshot\header.txt = generation\um\ProcessSnapshot\header.txt + generation\um\ProcessSnapshot\um-ProcessSnapshot.h = generation\um\ProcessSnapshot\um-ProcessSnapshot.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2252,6 +2259,7 @@ Global {A68F348B-DDA4-4B37-85E2-F0936FB0ACAA} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {611800BA-4A44-4D89-8A5F-89B3926AA7DF} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {DC0615E4-CFF8-47B5-AD41-80FEE842CE39} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {D1C8B976-2C97-4A0C-B22A-C3B47FBB8FF8} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 4cb7b198fd..eca4b0d491 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -79,6 +79,8 @@ HMONITOR=IntPtr HPALETTE=IntPtr HPEN=IntPtr HPROPSHEETPAGE=IntPtr +HPSS=IntPtr +HPSSWALK=IntPtr HRAWINPUT=IntPtr HRGN=IntPtr HRSRC=IntPtr diff --git a/generation/um/ProcessSnapshot/generate.rsp b/generation/um/ProcessSnapshot/generate.rsp new file mode 100644 index 0000000000..3f38e945cd --- /dev/null +++ b/generation/um/ProcessSnapshot/generate.rsp @@ -0,0 +1,18 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-ProcessSnapshot.h +--output +../../../sources/Interop/Windows/um/ProcessSnapshot +--test-output +../../../tests/Interop/Windows/um/ProcessSnapshot +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h +--with-attribute +PSS_CAPTURE_FLAGS=Flags +PSS_DUPLICATE_FLAGS=Flags +PSS_HANDLE_FLAGS=Flags +PSS_PROCESS_FLAGS=Flags +PSS_THREAD_FLAGS=Flags +--with-librarypath +*=kernel32 diff --git a/generation/um/ProcessSnapshot/header.txt b/generation/um/ProcessSnapshot/header.txt new file mode 100644 index 0000000000..fa03b96f06 --- /dev/null +++ b/generation/um/ProcessSnapshot/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/ProcessSnapshot/um-ProcessSnapshot.h b/generation/um/ProcessSnapshot/um-ProcessSnapshot.h new file mode 100644 index 0000000000..3d5a9ddede --- /dev/null +++ b/generation/um/ProcessSnapshot/um-ProcessSnapshot.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs new file mode 100644 index 0000000000..4fc7e88106 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct PSS_ALLOCATOR + { + [NativeTypeName("void *")] + public void* Context; + + [NativeTypeName("void *(*)(void *, DWORD) __attribute__((stdcall))")] + public delegate* unmanaged AllocRoutine; + + [NativeTypeName("void (*)(void *, void *) __attribute__((stdcall))")] + public delegate* unmanaged FreeRoutine; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs new file mode 100644 index 0000000000..b97e2b8a9b --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PSS_AUXILIARY_PAGES_INFORMATION + { + [NativeTypeName("DWORD")] + public uint AuxPagesCaptured; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs new file mode 100644 index 0000000000..664a2d5835 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs @@ -0,0 +1,23 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct PSS_AUXILIARY_PAGE_ENTRY + { + [NativeTypeName("void *")] + public void* Address; + + public MEMORY_BASIC_INFORMATION BasicInformation; + + public FILETIME CaptureTime; + + [NativeTypeName("void *")] + public void* PageContents; + + [NativeTypeName("DWORD")] + public uint PageSize; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs new file mode 100644 index 0000000000..8f57e8dc94 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs @@ -0,0 +1,36 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum PSS_CAPTURE_FLAGS + { + PSS_CAPTURE_NONE = 0x00000000, + PSS_CAPTURE_VA_CLONE = 0x00000001, + PSS_CAPTURE_RESERVED_00000002 = 0x00000002, + PSS_CAPTURE_HANDLES = 0x00000004, + PSS_CAPTURE_HANDLE_NAME_INFORMATION = 0x00000008, + PSS_CAPTURE_HANDLE_BASIC_INFORMATION = 0x00000010, + PSS_CAPTURE_HANDLE_TYPE_SPECIFIC_INFORMATION = 0x00000020, + PSS_CAPTURE_HANDLE_TRACE = 0x00000040, + PSS_CAPTURE_THREADS = 0x00000080, + PSS_CAPTURE_THREAD_CONTEXT = 0x00000100, + PSS_CAPTURE_THREAD_CONTEXT_EXTENDED = 0x00000200, + PSS_CAPTURE_RESERVED_00000400 = 0x00000400, + PSS_CAPTURE_VA_SPACE = 0x00000800, + PSS_CAPTURE_VA_SPACE_SECTION_INFORMATION = 0x00001000, + PSS_CAPTURE_IPT_TRACE = 0x00002000, + PSS_CAPTURE_RESERVED_00004000 = 0x00004000, + PSS_CREATE_BREAKAWAY_OPTIONAL = 0x04000000, + PSS_CREATE_BREAKAWAY = 0x08000000, + PSS_CREATE_FORCE_BREAKAWAY = 0x10000000, + PSS_CREATE_USE_VM_ALLOCATIONS = 0x20000000, + PSS_CREATE_MEASURE_PERFORMANCE = 0x40000000, + PSS_CREATE_RELEASE_SECTION = unchecked((int)(0x80000000)), + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs new file mode 100644 index 0000000000..bcfa521323 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum PSS_DUPLICATE_FLAGS + { + PSS_DUPLICATE_NONE = 0x00, + PSS_DUPLICATE_CLOSE_SOURCE = 0x01, + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs new file mode 100644 index 0000000000..d4ebef75f8 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs @@ -0,0 +1,178 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public unsafe partial struct PSS_HANDLE_ENTRY + { + [NativeTypeName("HANDLE")] + public IntPtr Handle; + + public PSS_HANDLE_FLAGS Flags; + + public PSS_OBJECT_TYPE ObjectType; + + public FILETIME CaptureTime; + + [NativeTypeName("DWORD")] + public uint Attributes; + + [NativeTypeName("DWORD")] + public uint GrantedAccess; + + [NativeTypeName("DWORD")] + public uint HandleCount; + + [NativeTypeName("DWORD")] + public uint PointerCount; + + [NativeTypeName("DWORD")] + public uint PagedPoolCharge; + + [NativeTypeName("DWORD")] + public uint NonPagedPoolCharge; + + public FILETIME CreationTime; + + [NativeTypeName("WORD")] + public ushort TypeNameLength; + + [NativeTypeName("const wchar_t *")] + public ushort* TypeName; + + [NativeTypeName("WORD")] + public ushort ObjectNameLength; + + [NativeTypeName("const wchar_t *")] + public ushort* ObjectName; + + [NativeTypeName("union (anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:258:5)")] + public _TypeSpecificInformation_e__Union TypeSpecificInformation; + + [StructLayout(LayoutKind.Explicit)] + public partial struct _TypeSpecificInformation_e__Union + { + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:261:9)")] + public _Process_e__Struct Process; + + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:272:9)")] + public _Thread_e__Struct Thread; + + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:284:9)")] + public _Mutant_e__Struct Mutant; + + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:292:9)")] + public _Event_e__Struct Event; + + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:298:9)")] + public _Section_e__Struct Section; + + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:306:9)")] + public _Semaphore_e__Struct Semaphore; + + public unsafe partial struct _Process_e__Struct + { + [NativeTypeName("DWORD")] + public uint ExitStatus; + + [NativeTypeName("void *")] + public void* PebBaseAddress; + + [NativeTypeName("ULONG_PTR")] + public nuint AffinityMask; + + [NativeTypeName("LONG")] + public int BasePriority; + + [NativeTypeName("DWORD")] + public uint ProcessId; + + [NativeTypeName("DWORD")] + public uint ParentProcessId; + + [NativeTypeName("DWORD")] + public uint Flags; + } + + public unsafe partial struct _Thread_e__Struct + { + [NativeTypeName("DWORD")] + public uint ExitStatus; + + [NativeTypeName("void *")] + public void* TebBaseAddress; + + [NativeTypeName("DWORD")] + public uint ProcessId; + + [NativeTypeName("DWORD")] + public uint ThreadId; + + [NativeTypeName("ULONG_PTR")] + public nuint AffinityMask; + + public int Priority; + + public int BasePriority; + + [NativeTypeName("void *")] + public void* Win32StartAddress; + } + + public partial struct _Mutant_e__Struct + { + [NativeTypeName("LONG")] + public int CurrentCount; + + [NativeTypeName("BOOL")] + public int Abandoned; + + [NativeTypeName("DWORD")] + public uint OwnerProcessId; + + [NativeTypeName("DWORD")] + public uint OwnerThreadId; + } + + public partial struct _Event_e__Struct + { + [NativeTypeName("BOOL")] + public int ManualReset; + + [NativeTypeName("BOOL")] + public int Signaled; + } + + public unsafe partial struct _Section_e__Struct + { + [NativeTypeName("void *")] + public void* BaseAddress; + + [NativeTypeName("DWORD")] + public uint AllocationAttributes; + + public LARGE_INTEGER MaximumSize; + } + + public partial struct _Semaphore_e__Struct + { + [NativeTypeName("LONG")] + public int CurrentCount; + + [NativeTypeName("LONG")] + public int MaximumCount; + } + } + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs new file mode 100644 index 0000000000..03650e489e --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum PSS_HANDLE_FLAGS + { + PSS_HANDLE_NONE = 0x00, + PSS_HANDLE_HAVE_TYPE = 0x01, + PSS_HANDLE_HAVE_NAME = 0x02, + PSS_HANDLE_HAVE_BASIC_INFORMATION = 0x04, + PSS_HANDLE_HAVE_TYPE_SPECIFIC_INFORMATION = 0x08, + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs new file mode 100644 index 0000000000..537f33cc4e --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PSS_HANDLE_INFORMATION + { + [NativeTypeName("DWORD")] + public uint HandlesCaptured; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs new file mode 100644 index 0000000000..aae1da8e85 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public partial struct PSS_HANDLE_TRACE_INFORMATION + { + [NativeTypeName("HANDLE")] + public IntPtr SectionHandle; + + [NativeTypeName("DWORD")] + public uint Size; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs new file mode 100644 index 0000000000..dc31442c9c --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum PSS_OBJECT_TYPE + { + PSS_OBJECT_TYPE_UNKNOWN = 0, + PSS_OBJECT_TYPE_PROCESS = 1, + PSS_OBJECT_TYPE_THREAD = 2, + PSS_OBJECT_TYPE_MUTANT = 3, + PSS_OBJECT_TYPE_EVENT = 4, + PSS_OBJECT_TYPE_SECTION = 5, + PSS_OBJECT_TYPE_SEMAPHORE = 6, + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs new file mode 100644 index 0000000000..06b15b0e42 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs @@ -0,0 +1,46 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PSS_PERFORMANCE_COUNTERS + { + [NativeTypeName("UINT64")] + public ulong TotalCycleCount; + + [NativeTypeName("UINT64")] + public ulong TotalWallClockPeriod; + + [NativeTypeName("UINT64")] + public ulong VaCloneCycleCount; + + [NativeTypeName("UINT64")] + public ulong VaCloneWallClockPeriod; + + [NativeTypeName("UINT64")] + public ulong VaSpaceCycleCount; + + [NativeTypeName("UINT64")] + public ulong VaSpaceWallClockPeriod; + + [NativeTypeName("UINT64")] + public ulong AuxPagesCycleCount; + + [NativeTypeName("UINT64")] + public ulong AuxPagesWallClockPeriod; + + [NativeTypeName("UINT64")] + public ulong HandlesCycleCount; + + [NativeTypeName("UINT64")] + public ulong HandlesWallClockPeriod; + + [NativeTypeName("UINT64")] + public ulong ThreadsCycleCount; + + [NativeTypeName("UINT64")] + public ulong ThreadsWallClockPeriod; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs new file mode 100644 index 0000000000..e81240d5f0 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs @@ -0,0 +1,20 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum PSS_PROCESS_FLAGS + { + PSS_PROCESS_FLAGS_NONE = 0x00000000, + PSS_PROCESS_FLAGS_PROTECTED = 0x00000001, + PSS_PROCESS_FLAGS_WOW64 = 0x00000002, + PSS_PROCESS_FLAGS_RESERVED_03 = 0x00000004, + PSS_PROCESS_FLAGS_RESERVED_04 = 0x00000008, + PSS_PROCESS_FLAGS_FROZEN = 0x00000010, + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs new file mode 100644 index 0000000000..6d461ae9a4 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs @@ -0,0 +1,83 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct PSS_PROCESS_INFORMATION + { + [NativeTypeName("DWORD")] + public uint ExitStatus; + + [NativeTypeName("void *")] + public void* PebBaseAddress; + + [NativeTypeName("ULONG_PTR")] + public nuint AffinityMask; + + [NativeTypeName("LONG")] + public int BasePriority; + + [NativeTypeName("DWORD")] + public uint ProcessId; + + [NativeTypeName("DWORD")] + public uint ParentProcessId; + + public PSS_PROCESS_FLAGS Flags; + + public FILETIME CreateTime; + + public FILETIME ExitTime; + + public FILETIME KernelTime; + + public FILETIME UserTime; + + [NativeTypeName("DWORD")] + public uint PriorityClass; + + [NativeTypeName("ULONG_PTR")] + public nuint PeakVirtualSize; + + [NativeTypeName("ULONG_PTR")] + public nuint VirtualSize; + + [NativeTypeName("DWORD")] + public uint PageFaultCount; + + [NativeTypeName("ULONG_PTR")] + public nuint PeakWorkingSetSize; + + [NativeTypeName("ULONG_PTR")] + public nuint WorkingSetSize; + + [NativeTypeName("ULONG_PTR")] + public nuint QuotaPeakPagedPoolUsage; + + [NativeTypeName("ULONG_PTR")] + public nuint QuotaPagedPoolUsage; + + [NativeTypeName("ULONG_PTR")] + public nuint QuotaPeakNonPagedPoolUsage; + + [NativeTypeName("ULONG_PTR")] + public nuint QuotaNonPagedPoolUsage; + + [NativeTypeName("ULONG_PTR")] + public nuint PagefileUsage; + + [NativeTypeName("ULONG_PTR")] + public nuint PeakPagefileUsage; + + [NativeTypeName("ULONG_PTR")] + public nuint PrivateUsage; + + [NativeTypeName("DWORD")] + public uint ExecuteFlags; + + [NativeTypeName("wchar_t [260]")] + public fixed ushort ImageFileName[260]; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs new file mode 100644 index 0000000000..c2a418fd1c --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum PSS_QUERY_INFORMATION_CLASS + { + PSS_QUERY_PROCESS_INFORMATION = 0, + PSS_QUERY_VA_CLONE_INFORMATION = 1, + PSS_QUERY_AUXILIARY_PAGES_INFORMATION = 2, + PSS_QUERY_VA_SPACE_INFORMATION = 3, + PSS_QUERY_HANDLE_INFORMATION = 4, + PSS_QUERY_THREAD_INFORMATION = 5, + PSS_QUERY_HANDLE_TRACE_INFORMATION = 6, + PSS_QUERY_PERFORMANCE_COUNTERS = 7, + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs new file mode 100644 index 0000000000..5bf47377dc --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs @@ -0,0 +1,59 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct PSS_THREAD_ENTRY + { + [NativeTypeName("DWORD")] + public uint ExitStatus; + + [NativeTypeName("void *")] + public void* TebBaseAddress; + + [NativeTypeName("DWORD")] + public uint ProcessId; + + [NativeTypeName("DWORD")] + public uint ThreadId; + + [NativeTypeName("ULONG_PTR")] + public nuint AffinityMask; + + public int Priority; + + public int BasePriority; + + [NativeTypeName("void *")] + public void* LastSyscallFirstArgument; + + [NativeTypeName("WORD")] + public ushort LastSyscallNumber; + + public FILETIME CreateTime; + + public FILETIME ExitTime; + + public FILETIME KernelTime; + + public FILETIME UserTime; + + [NativeTypeName("void *")] + public void* Win32StartAddress; + + public FILETIME CaptureTime; + + public PSS_THREAD_FLAGS Flags; + + [NativeTypeName("WORD")] + public ushort SuspendCount; + + [NativeTypeName("WORD")] + public ushort SizeOfContextRecord; + + [NativeTypeName("PCONTEXT")] + public CONTEXT* ContextRecord; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs new file mode 100644 index 0000000000..212dcdaea7 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum PSS_THREAD_FLAGS + { + PSS_THREAD_FLAGS_NONE = 0x0000, + PSS_THREAD_FLAGS_TERMINATED = 0x0001, + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs new file mode 100644 index 0000000000..881f23a89c --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PSS_THREAD_INFORMATION + { + [NativeTypeName("DWORD")] + public uint ThreadsCaptured; + + [NativeTypeName("DWORD")] + public uint ContextLength; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs new file mode 100644 index 0000000000..7596993a8c --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public partial struct PSS_VA_CLONE_INFORMATION + { + [NativeTypeName("HANDLE")] + public IntPtr VaCloneHandle; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs new file mode 100644 index 0000000000..8667c72656 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs @@ -0,0 +1,49 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct PSS_VA_SPACE_ENTRY + { + [NativeTypeName("void *")] + public void* BaseAddress; + + [NativeTypeName("void *")] + public void* AllocationBase; + + [NativeTypeName("DWORD")] + public uint AllocationProtect; + + [NativeTypeName("ULONG_PTR")] + public nuint RegionSize; + + [NativeTypeName("DWORD")] + public uint State; + + [NativeTypeName("DWORD")] + public uint Protect; + + [NativeTypeName("DWORD")] + public uint Type; + + [NativeTypeName("DWORD")] + public uint TimeDateStamp; + + [NativeTypeName("DWORD")] + public uint SizeOfImage; + + [NativeTypeName("void *")] + public void* ImageBase; + + [NativeTypeName("DWORD")] + public uint CheckSum; + + [NativeTypeName("WORD")] + public ushort MappedFileNameLength; + + [NativeTypeName("const wchar_t *")] + public ushort* MappedFileName; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs new file mode 100644 index 0000000000..f8335cd3d0 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PSS_VA_SPACE_INFORMATION + { + [NativeTypeName("DWORD")] + public uint RegionCount; + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs new file mode 100644 index 0000000000..2947a8cba0 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum PSS_WALK_INFORMATION_CLASS + { + PSS_WALK_AUXILIARY_PAGES = 0, + PSS_WALK_VA_SPACE = 1, + PSS_WALK_HANDLES = 2, + PSS_WALK_THREADS = 3, + } +} diff --git a/sources/Interop/Windows/um/ProcessSnapshot/Windows.cs b/sources/Interop/Windows/um/ProcessSnapshot/Windows.cs new file mode 100644 index 0000000000..ea61c9bda1 --- /dev/null +++ b/sources/Interop/Windows/um/ProcessSnapshot/Windows.cs @@ -0,0 +1,56 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssCaptureSnapshot([NativeTypeName("HANDLE")] IntPtr ProcessHandle, PSS_CAPTURE_FLAGS CaptureFlags, [NativeTypeName("DWORD")] uint ThreadContextFlags, [NativeTypeName("HPSS *")] IntPtr* SnapshotHandle); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssFreeSnapshot([NativeTypeName("HANDLE")] IntPtr ProcessHandle, [NativeTypeName("HPSS")] IntPtr SnapshotHandle); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssQuerySnapshot([NativeTypeName("HPSS")] IntPtr SnapshotHandle, PSS_QUERY_INFORMATION_CLASS InformationClass, [NativeTypeName("void *")] void* Buffer, [NativeTypeName("DWORD")] uint BufferLength); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssWalkSnapshot([NativeTypeName("HPSS")] IntPtr SnapshotHandle, PSS_WALK_INFORMATION_CLASS InformationClass, [NativeTypeName("HPSSWALK")] IntPtr WalkMarkerHandle, [NativeTypeName("void *")] void* Buffer, [NativeTypeName("DWORD")] uint BufferLength); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssDuplicateSnapshot([NativeTypeName("HANDLE")] IntPtr SourceProcessHandle, [NativeTypeName("HPSS")] IntPtr SnapshotHandle, [NativeTypeName("HANDLE")] IntPtr TargetProcessHandle, [NativeTypeName("HPSS *")] IntPtr* TargetSnapshotHandle, PSS_DUPLICATE_FLAGS Flags); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssWalkMarkerCreate([NativeTypeName("const PSS_ALLOCATOR *")] PSS_ALLOCATOR* Allocator, [NativeTypeName("HPSSWALK *")] IntPtr* WalkMarkerHandle); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssWalkMarkerFree([NativeTypeName("HPSSWALK")] IntPtr WalkMarkerHandle); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssWalkMarkerGetPosition([NativeTypeName("HPSSWALK")] IntPtr WalkMarkerHandle, [NativeTypeName("ULONG_PTR *")] nuint* Position); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssWalkMarkerSetPosition([NativeTypeName("HPSSWALK")] IntPtr WalkMarkerHandle, [NativeTypeName("ULONG_PTR")] nuint Position); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint PssWalkMarkerSeekToBeginning([NativeTypeName("HPSSWALK")] IntPtr WalkMarkerHandle); + + [NativeTypeName("#define PSS_PERF_RESOLUTION 1000000")] + public const int PSS_PERF_RESOLUTION = 1000000; + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs new file mode 100644 index 0000000000..a02b65a83e --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_ALLOCATORTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_ALLOCATOR))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_ALLOCATOR).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_ALLOCATOR), Is.EqualTo(24)); + } + else + { + Assert.That(sizeof(PSS_ALLOCATOR), Is.EqualTo(12)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs new file mode 100644 index 0000000000..f4614629f0 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_AUXILIARY_PAGES_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_AUXILIARY_PAGES_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_AUXILIARY_PAGES_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(PSS_AUXILIARY_PAGES_INFORMATION), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs new file mode 100644 index 0000000000..93f10f904b --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_AUXILIARY_PAGE_ENTRYTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_AUXILIARY_PAGE_ENTRY))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_AUXILIARY_PAGE_ENTRY).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_AUXILIARY_PAGE_ENTRY), Is.EqualTo(80)); + } + else + { + Assert.That(sizeof(PSS_AUXILIARY_PAGE_ENTRY), Is.EqualTo(48)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs new file mode 100644 index 0000000000..7e96bdac9a --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_HANDLE_ENTRYTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_HANDLE_ENTRY))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_HANDLE_ENTRY).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_HANDLE_ENTRY), Is.EqualTo(136)); + } + else + { + Assert.That(sizeof(PSS_HANDLE_ENTRY), Is.EqualTo(104)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs new file mode 100644 index 0000000000..9846f5c358 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_HANDLE_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_HANDLE_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_HANDLE_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(PSS_HANDLE_INFORMATION), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs new file mode 100644 index 0000000000..15497439cf --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_HANDLE_TRACE_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_HANDLE_TRACE_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_HANDLE_TRACE_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_HANDLE_TRACE_INFORMATION), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(PSS_HANDLE_TRACE_INFORMATION), Is.EqualTo(8)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs new file mode 100644 index 0000000000..2268d71cd2 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_PERFORMANCE_COUNTERSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_PERFORMANCE_COUNTERS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_PERFORMANCE_COUNTERS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(PSS_PERFORMANCE_COUNTERS), Is.EqualTo(96)); + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs new file mode 100644 index 0000000000..b4d7f10e50 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_PROCESS_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_PROCESS_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_PROCESS_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_PROCESS_INFORMATION), Is.EqualTo(704)); + } + else + { + Assert.That(sizeof(PSS_PROCESS_INFORMATION), Is.EqualTo(636)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs new file mode 100644 index 0000000000..fbb440b1ca --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_THREAD_ENTRYTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_THREAD_ENTRY))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_THREAD_ENTRY).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_THREAD_ENTRY), Is.EqualTo(120)); + } + else + { + Assert.That(sizeof(PSS_THREAD_ENTRY), Is.EqualTo(92)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs new file mode 100644 index 0000000000..dce67aff05 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_THREAD_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_THREAD_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_THREAD_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(PSS_THREAD_INFORMATION), Is.EqualTo(8)); + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs new file mode 100644 index 0000000000..021a0f8546 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_VA_CLONE_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_VA_CLONE_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_VA_CLONE_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_VA_CLONE_INFORMATION), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(PSS_VA_CLONE_INFORMATION), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs new file mode 100644 index 0000000000..8077f48f35 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_VA_SPACE_ENTRYTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_VA_SPACE_ENTRY))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_VA_SPACE_ENTRY).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSS_VA_SPACE_ENTRY), Is.EqualTo(80)); + } + else + { + Assert.That(sizeof(PSS_VA_SPACE_ENTRY), Is.EqualTo(52)); + } + } + } +} diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs new file mode 100644 index 0000000000..38dc9a2248 --- /dev/null +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSS_VA_SPACE_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSS_VA_SPACE_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSS_VA_SPACE_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(PSS_VA_SPACE_INFORMATION), Is.EqualTo(4)); + } + } +} From db1ddd8bab2fafc39ca1abcfafdc65256937d68d Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 21:26:50 -0500 Subject: [PATCH 17/36] Add Psapi.h --- TerraFX.Interop.Windows.sln | 8 + generation/remap.rsp | 11 + generation/um/Psapi/generate.rsp | 28 ++ generation/um/Psapi/header.txt | 4 + generation/um/Psapi/um-Psapi.h | 2 + .../um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs | 25 ++ .../Interop/Windows/um/Psapi/MODULEINFO.cs | 19 + .../um/Psapi/PERFORMANCE_INFORMATION.cs | 52 +++ .../um/Psapi/PROCESS_MEMORY_COUNTERS.cs | 40 ++ .../um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs | 43 ++ .../um/Psapi/PSAPI_WORKING_SET_BLOCK.cs | 182 ++++++++ .../um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs | 412 ++++++++++++++++++ .../Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs | 15 + .../um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs | 37 ++ .../um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs | 16 + .../um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs | 18 + sources/Interop/Windows/um/Psapi/Windows.cs | 238 ++++++++++ .../Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs | 43 ++ .../Windows/um/Psapi/MODULEINFOTests.cs | 43 ++ .../um/Psapi/PERFORMANCE_INFORMATIONTests.cs | 43 ++ .../um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs | 43 ++ .../Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs | 43 ++ .../um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs | 43 ++ .../Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs | 43 ++ .../PSAPI_WORKING_SET_EX_INFORMATIONTests.cs | 43 ++ .../PSAPI_WORKING_SET_INFORMATIONTests.cs | 43 ++ .../Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs | 43 ++ .../PSAPI_WS_WATCH_INFORMATION_EXTests.cs | 43 ++ 28 files changed, 1623 insertions(+) create mode 100644 generation/um/Psapi/generate.rsp create mode 100644 generation/um/Psapi/header.txt create mode 100644 generation/um/Psapi/um-Psapi.h create mode 100644 sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/Psapi/MODULEINFO.cs create mode 100644 sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs create mode 100644 sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs create mode 100644 sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs create mode 100644 sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs create mode 100644 sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs create mode 100644 sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs create mode 100644 sources/Interop/Windows/um/Psapi/Windows.cs create mode 100644 tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs create mode 100644 tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 1bd008833f..6a3f263553 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1953,6 +1953,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProcessSnapshot", "ProcessS generation\um\ProcessSnapshot\um-ProcessSnapshot.h = generation\um\ProcessSnapshot\um-ProcessSnapshot.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Psapi", "Psapi", "{81CCE1E0-C734-40B8-B0BC-521F3668A8FD}" + ProjectSection(SolutionItems) = preProject + generation\um\Psapi\generate.rsp = generation\um\Psapi\generate.rsp + generation\um\Psapi\header.txt = generation\um\Psapi\header.txt + generation\um\Psapi\um-Psapi.h = generation\um\Psapi\um-Psapi.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2260,6 +2267,7 @@ Global {611800BA-4A44-4D89-8A5F-89B3926AA7DF} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {DC0615E4-CFF8-47B5-AD41-80FEE842CE39} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {D1C8B976-2C97-4A0C-B22A-C3B47FBB8FF8} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {81CCE1E0-C734-40B8-B0BC-521F3668A8FD} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index eca4b0d491..00cca914ac 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -1882,6 +1882,7 @@ _ENCRYPTION_KEY_CTRL_INPUT=ENCRYPTION_KEY_CTRL_INPUT _ENLISTMENT_BASIC_INFORMATION=ENLISTMENT_BASIC_INFORMATION _ENLISTMENT_CRM_INFORMATION=ENLISTMENT_CRM_INFORMATION _ENLISTMENT_INFORMATION_CLASS=ENLISTMENT_INFORMATION_CLASS +_ENUM_PAGE_FILE_INFORMATION=ENUM_PAGE_FILE_INFORMATION _eTlsHashAlgorithm=eTlsHashAlgorithm _eTlsSignatureAlgorithm=eTlsSignatureAlgorithm _EVENTLOGRECORD=EVENTLOGRECORD @@ -2330,6 +2331,7 @@ _MF_VIDEO_PROCESSOR_MIRROR=MF_VIDEO_PROCESSOR_MIRROR _MF_VIDEO_PROCESSOR_ROTATION=MF_VIDEO_PROCESSOR_ROTATION _MF_VIDEO_SPHERICAL_VIEWDIRECTION=MF_VIDEO_SPHERICAL_VIEWDIRECTION _MilMatrix3x2D=MilMatrix3x2D +_MODULEINFO=MODULEINFO _MONITOR_DISPLAY_STATE=MONITOR_DISPLAY_STATE _MOVEREGION_INFO=MOVEREGION_INFO _MOUSE_EVENT_RECORD=MOUSE_EVENT_RECORD @@ -2380,6 +2382,7 @@ _PARTITION_STYLE=PARTITION_STYLE _PATHNAME_BUFFER=PATHNAME_BUFFER _PctPublicKey=PctPublicKey _PERFORMANCE_DATA=PERFORMANCE_DATA +_PERFORMANCE_INFORMATION=PERFORMANCE_INFORMATION _PERF_BIN=PERF_BIN _PERSISTENT_RESERVE_COMMAND=PERSISTENT_RESERVE_COMMAND _PERSIST_SPROPSTORE_FLAGS=PERSIST_SPROPSTORE_FLAGS @@ -2422,6 +2425,8 @@ _PROCESS_HEAP_ENTRY=PROCESS_HEAP_ENTRY _PROCESS_INFORMATION=PROCESS_INFORMATION _PROCESS_INFORMATION_CLASS=PROCESS_INFORMATION_CLASS _PROCESS_LEAP_SECOND_INFO=PROCESS_LEAP_SECOND_INFO +_PROCESS_MEMORY_COUNTERS=PROCESS_MEMORY_COUNTERS +_PROCESS_MEMORY_COUNTERS_EX=PROCESS_MEMORY_COUNTERS_EX _PROCESS_MEMORY_EXHAUSTION_INFO=PROCESS_MEMORY_EXHAUSTION_INFO _PROCESS_MEMORY_EXHAUSTION_TYPE=PROCESS_MEMORY_EXHAUSTION_TYPE _PROCESS_MITIGATION_ASLR_POLICY=PROCESS_MITIGATION_ASLR_POLICY @@ -2458,6 +2463,12 @@ _PROPSHEETPAGEW_V3=PROPSHEETPAGEW_V3 _PROVDATA_SIP=PROVDATA_SIP _PROV_ENUMALGS=PROV_ENUMALGS _PROV_ENUMALGS_EX=PROV_ENUMALGS_EX +_PSAPI_WORKING_SET_BLOCK=PSAPI_WORKING_SET_BLOCK +_PSAPI_WORKING_SET_EX_BLOCK=PSAPI_WORKING_SET_EX_BLOCK +_PSAPI_WORKING_SET_EX_INFORMATION=PSAPI_WORKING_SET_EX_INFORMATION +_PSAPI_WORKING_SET_INFORMATION=PSAPI_WORKING_SET_INFORMATION +_PSAPI_WS_WATCH_INFORMATION=PSAPI_WS_WATCH_INFORMATION +_PSAPI_WS_WATCH_INFORMATION_EX=PSAPI_WS_WATCH_INFORMATION_EX _PSFEATURE_CUSTPAPER=PSFEATURE_CUSTPAPER _PSFEATURE_OUTPUT=PSFEATURE_OUTPUT _PSHNOTIFY=PSHNOTIFY diff --git a/generation/um/Psapi/generate.rsp b/generation/um/Psapi/generate.rsp new file mode 100644 index 0000000000..1b9de78416 --- /dev/null +++ b/generation/um/Psapi/generate.rsp @@ -0,0 +1,28 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-Psapi.h +--output +../../../sources/Interop/Windows/um/Psapi +--test-output +../../../tests/Interop/Windows/um/Psapi +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h +--with-getlasterror +K32EmptyWorkingSet +K32EnumDeviceDrivers +K32EnumPageFilesA +K32EnumPageFilesW +K32EnumProcesses +K32EnumProcessModules +K32EnumProcessModulesEx +K32GetModuleInformation +K32GetPerformanceInfo +K32GetProcessMemoryInfo +K32GetWsChanges +K32GetWsChangesEx +K32InitializeProcessForWsWatch +K32QueryWorkingSet +K32QueryWorkingSetEx +--with-librarypath +*=kernel32 diff --git a/generation/um/Psapi/header.txt b/generation/um/Psapi/header.txt new file mode 100644 index 0000000000..f9a0dc13b2 --- /dev/null +++ b/generation/um/Psapi/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/Psapi/um-Psapi.h b/generation/um/Psapi/um-Psapi.h new file mode 100644 index 0000000000..288c30f891 --- /dev/null +++ b/generation/um/Psapi/um-Psapi.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs new file mode 100644 index 0000000000..c32238928e --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs @@ -0,0 +1,25 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct ENUM_PAGE_FILE_INFORMATION + { + [NativeTypeName("DWORD")] + public uint cb; + + [NativeTypeName("DWORD")] + public uint Reserved; + + [NativeTypeName("SIZE_T")] + public nuint TotalSize; + + [NativeTypeName("SIZE_T")] + public nuint TotalInUse; + + [NativeTypeName("SIZE_T")] + public nuint PeakUsage; + } +} diff --git a/sources/Interop/Windows/um/Psapi/MODULEINFO.cs b/sources/Interop/Windows/um/Psapi/MODULEINFO.cs new file mode 100644 index 0000000000..667b5470c5 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/MODULEINFO.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct MODULEINFO + { + [NativeTypeName("LPVOID")] + public void* lpBaseOfDll; + + [NativeTypeName("DWORD")] + public uint SizeOfImage; + + [NativeTypeName("LPVOID")] + public void* EntryPoint; + } +} diff --git a/sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs new file mode 100644 index 0000000000..0af715896d --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs @@ -0,0 +1,52 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PERFORMANCE_INFORMATION + { + [NativeTypeName("DWORD")] + public uint cb; + + [NativeTypeName("SIZE_T")] + public nuint CommitTotal; + + [NativeTypeName("SIZE_T")] + public nuint CommitLimit; + + [NativeTypeName("SIZE_T")] + public nuint CommitPeak; + + [NativeTypeName("SIZE_T")] + public nuint PhysicalTotal; + + [NativeTypeName("SIZE_T")] + public nuint PhysicalAvailable; + + [NativeTypeName("SIZE_T")] + public nuint SystemCache; + + [NativeTypeName("SIZE_T")] + public nuint KernelTotal; + + [NativeTypeName("SIZE_T")] + public nuint KernelPaged; + + [NativeTypeName("SIZE_T")] + public nuint KernelNonpaged; + + [NativeTypeName("SIZE_T")] + public nuint PageSize; + + [NativeTypeName("DWORD")] + public uint HandleCount; + + [NativeTypeName("DWORD")] + public uint ProcessCount; + + [NativeTypeName("DWORD")] + public uint ThreadCount; + } +} diff --git a/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs new file mode 100644 index 0000000000..8129e79b6b --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs @@ -0,0 +1,40 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PROCESS_MEMORY_COUNTERS + { + [NativeTypeName("DWORD")] + public uint cb; + + [NativeTypeName("DWORD")] + public uint PageFaultCount; + + [NativeTypeName("SIZE_T")] + public nuint PeakWorkingSetSize; + + [NativeTypeName("SIZE_T")] + public nuint WorkingSetSize; + + [NativeTypeName("SIZE_T")] + public nuint QuotaPeakPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint QuotaPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint QuotaPeakNonPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint QuotaNonPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint PagefileUsage; + + [NativeTypeName("SIZE_T")] + public nuint PeakPagefileUsage; + } +} diff --git a/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs new file mode 100644 index 0000000000..1fbfe5e2d3 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PROCESS_MEMORY_COUNTERS_EX + { + [NativeTypeName("DWORD")] + public uint cb; + + [NativeTypeName("DWORD")] + public uint PageFaultCount; + + [NativeTypeName("SIZE_T")] + public nuint PeakWorkingSetSize; + + [NativeTypeName("SIZE_T")] + public nuint WorkingSetSize; + + [NativeTypeName("SIZE_T")] + public nuint QuotaPeakPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint QuotaPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint QuotaPeakNonPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint QuotaNonPagedPoolUsage; + + [NativeTypeName("SIZE_T")] + public nuint PagefileUsage; + + [NativeTypeName("SIZE_T")] + public nuint PeakPagefileUsage; + + [NativeTypeName("SIZE_T")] + public nuint PrivateUsage; + } +} diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs new file mode 100644 index 0000000000..cd93cecc66 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs @@ -0,0 +1,182 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct PSAPI_WORKING_SET_BLOCK + { + [FieldOffset(0)] + [NativeTypeName("ULONG_PTR")] + public nuint Flags; + + [FieldOffset(0)] + [NativeTypeName("_PSAPI_WORKING_SET_BLOCK::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:276:5)")] + public _Anonymous_e__Struct Anonymous; + + public nuint Protection + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Protection; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Protection = value; + } + } + + public nuint ShareCount + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.ShareCount; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.ShareCount = value; + } + } + + public nuint Shared + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Shared; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Shared = value; + } + } + + public nuint Reserved + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Reserved; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Reserved = value; + } + } + + public nuint VirtualPage + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.VirtualPage; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.VirtualPage = value; + } + } + + public partial struct _Anonymous_e__Struct + { + public nuint _bitfield; + + [NativeTypeName("ULONG_PTR : 5")] + public nuint Protection + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return _bitfield & 0x1Fu; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~0x1Fu) | (value & 0x1Fu); + } + } + + [NativeTypeName("ULONG_PTR : 3")] + public nuint ShareCount + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 5) & 0x7u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x7u << 5)) | ((value & 0x7u) << 5); + } + } + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Shared + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 8) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 8)) | ((value & 0x1u) << 8); + } + } + + [NativeTypeName("ULONG_PTR : 3")] + public nuint Reserved + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 9) & 0x7u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x7u << 9)) | ((value & 0x7u) << 9); + } + } + + [NativeTypeName("ULONG_PTR : 20")] + public nuint VirtualPage + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 12) & 0xFFFFFu; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0xFFFFFu << 12)) | ((value & 0xFFFFFu) << 12); + } + } + } + } +} diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs new file mode 100644 index 0000000000..c129f31407 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs @@ -0,0 +1,412 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [StructLayout(LayoutKind.Explicit)] + public partial struct PSAPI_WORKING_SET_EX_BLOCK + { + [FieldOffset(0)] + [NativeTypeName("ULONG_PTR")] + public nuint Flags; + + [FieldOffset(0)] + [NativeTypeName("_PSAPI_WORKING_SET_EX_BLOCK::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:296:5)")] + public _Anonymous_e__Union Anonymous; + + public nuint Valid + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.Valid; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.Valid = value; + } + } + + public nuint ShareCount + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.ShareCount; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.ShareCount = value; + } + } + + public nuint Win32Protection + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.Win32Protection; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.Win32Protection = value; + } + } + + public nuint Shared + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.Shared; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.Shared = value; + } + } + + public nuint Node + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.Node; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.Node = value; + } + } + + public nuint Locked + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.Locked; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.Locked = value; + } + } + + public nuint LargePage + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.LargePage; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.LargePage = value; + } + } + + public nuint Reserved + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.Reserved; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.Reserved = value; + } + } + + public nuint Bad + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.Bad; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.Bad = value; + } + } + + public ref _Anonymous_e__Union._Invalid_e__Struct Invalid + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.Invalid, 1)); + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("_PSAPI_WORKING_SET_EX_BLOCK::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:297:9)")] + public _Anonymous_e__Struct Anonymous; + + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:312:9)")] + public _Invalid_e__Struct Invalid; + + public partial struct _Anonymous_e__Struct + { + public nuint _bitfield; + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Valid + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return _bitfield & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~0x1u) | (value & 0x1u); + } + } + + [NativeTypeName("ULONG_PTR : 3")] + public nuint ShareCount + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 1) & 0x7u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x7u << 1)) | ((value & 0x7u) << 1); + } + } + + [NativeTypeName("ULONG_PTR : 11")] + public nuint Win32Protection + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 4) & 0x7FFu; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x7FFu << 4)) | ((value & 0x7FFu) << 4); + } + } + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Shared + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 15) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 15)) | ((value & 0x1u) << 15); + } + } + + [NativeTypeName("ULONG_PTR : 6")] + public nuint Node + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 16) & 0x3Fu; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x3Fu << 16)) | ((value & 0x3Fu) << 16); + } + } + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Locked + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 22) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 22)) | ((value & 0x1u) << 22); + } + } + + [NativeTypeName("ULONG_PTR : 1")] + public nuint LargePage + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 23) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 23)) | ((value & 0x1u) << 23); + } + } + + [NativeTypeName("ULONG_PTR : 7")] + public nuint Reserved + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 24) & 0x7Fu; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x7Fu << 24)) | ((value & 0x7Fu) << 24); + } + } + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Bad + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 31) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 31)) | ((value & 0x1u) << 31); + } + } + } + + public partial struct _Invalid_e__Struct + { + public nuint _bitfield; + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Valid + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return _bitfield & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~0x1u) | (value & 0x1u); + } + } + + [NativeTypeName("ULONG_PTR : 14")] + public nuint Reserved0 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 1) & 0x3FFFu; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x3FFFu << 1)) | ((value & 0x3FFFu) << 1); + } + } + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Shared + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 15) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 15)) | ((value & 0x1u) << 15); + } + } + + [NativeTypeName("ULONG_PTR : 15")] + public nuint Reserved1 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 16) & 0x7FFFu; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x7FFFu << 16)) | ((value & 0x7FFFu) << 16); + } + } + + [NativeTypeName("ULONG_PTR : 1")] + public nuint Bad + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 31) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 31)) | ((value & 0x1u) << 31); + } + } + } + } + } +} diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs new file mode 100644 index 0000000000..538ae7e085 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct PSAPI_WORKING_SET_EX_INFORMATION + { + [NativeTypeName("PVOID")] + public void* VirtualAddress; + + public PSAPI_WORKING_SET_EX_BLOCK VirtualAttributes; + } +} diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs new file mode 100644 index 0000000000..8f6b6037e6 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs @@ -0,0 +1,37 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public partial struct PSAPI_WORKING_SET_INFORMATION + { + [NativeTypeName("ULONG_PTR")] + public nuint NumberOfEntries; + + [NativeTypeName("PSAPI_WORKING_SET_BLOCK [1]")] + public _WorkingSetInfo_e__FixedBuffer WorkingSetInfo; + + public partial struct _WorkingSetInfo_e__FixedBuffer + { + public PSAPI_WORKING_SET_BLOCK e0; + + public ref PSAPI_WORKING_SET_BLOCK this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref AsSpan(int.MaxValue)[index]; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); + } + } +} diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs new file mode 100644 index 0000000000..2939cc822d --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct PSAPI_WS_WATCH_INFORMATION + { + [NativeTypeName("LPVOID")] + public void* FaultingPc; + + [NativeTypeName("LPVOID")] + public void* FaultingVa; + } +} diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs new file mode 100644 index 0000000000..9d62f7d7b3 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct PSAPI_WS_WATCH_INFORMATION_EX + { + public PSAPI_WS_WATCH_INFORMATION BasicInfo; + + [NativeTypeName("ULONG_PTR")] + public nuint FaultingThreadId; + + [NativeTypeName("ULONG_PTR")] + public nuint Flags; + } +} diff --git a/sources/Interop/Windows/um/Psapi/Windows.cs b/sources/Interop/Windows/um/Psapi/Windows.cs new file mode 100644 index 0000000000..154b6480d1 --- /dev/null +++ b/sources/Interop/Windows/um/Psapi/Windows.cs @@ -0,0 +1,238 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32EnumProcesses([NativeTypeName("DWORD *")] uint* lpidProcess, [NativeTypeName("DWORD")] uint cb, [NativeTypeName("LPDWORD")] uint* lpcbNeeded); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32EnumProcessModules([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("HMODULE *")] IntPtr* lphModule, [NativeTypeName("DWORD")] uint cb, [NativeTypeName("LPDWORD")] uint* lpcbNeeded); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32EnumProcessModulesEx([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("HMODULE *")] IntPtr* lphModule, [NativeTypeName("DWORD")] uint cb, [NativeTypeName("LPDWORD")] uint* lpcbNeeded, [NativeTypeName("DWORD")] uint dwFilterFlag); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetModuleBaseNameA([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("HMODULE")] IntPtr hModule, [NativeTypeName("LPSTR")] sbyte* lpBaseName, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetModuleBaseNameW([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("HMODULE")] IntPtr hModule, [NativeTypeName("LPWSTR")] ushort* lpBaseName, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetModuleFileNameExA([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("HMODULE")] IntPtr hModule, [NativeTypeName("LPSTR")] sbyte* lpFilename, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetModuleFileNameExW([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("HMODULE")] IntPtr hModule, [NativeTypeName("LPWSTR")] ushort* lpFilename, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32GetModuleInformation([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("HMODULE")] IntPtr hModule, [NativeTypeName("LPMODULEINFO")] MODULEINFO* lpmodinfo, [NativeTypeName("DWORD")] uint cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32EmptyWorkingSet([NativeTypeName("HANDLE")] IntPtr hProcess); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32QueryWorkingSet([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PVOID")] void* pv, [NativeTypeName("DWORD")] uint cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32QueryWorkingSetEx([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PVOID")] void* pv, [NativeTypeName("DWORD")] uint cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32InitializeProcessForWsWatch([NativeTypeName("HANDLE")] IntPtr hProcess); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32GetWsChanges([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PPSAPI_WS_WATCH_INFORMATION")] PSAPI_WS_WATCH_INFORMATION* lpWatchInfo, [NativeTypeName("DWORD")] uint cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32GetWsChangesEx([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PPSAPI_WS_WATCH_INFORMATION_EX")] PSAPI_WS_WATCH_INFORMATION_EX* lpWatchInfoEx, [NativeTypeName("PDWORD")] uint* cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetMappedFileNameW([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("LPVOID")] void* lpv, [NativeTypeName("LPWSTR")] ushort* lpFilename, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetMappedFileNameA([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("LPVOID")] void* lpv, [NativeTypeName("LPSTR")] sbyte* lpFilename, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32EnumDeviceDrivers([NativeTypeName("LPVOID *")] void** lpImageBase, [NativeTypeName("DWORD")] uint cb, [NativeTypeName("LPDWORD")] uint* lpcbNeeded); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetDeviceDriverBaseNameA([NativeTypeName("LPVOID")] void* ImageBase, [NativeTypeName("LPSTR")] sbyte* lpFilename, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetDeviceDriverBaseNameW([NativeTypeName("LPVOID")] void* ImageBase, [NativeTypeName("LPWSTR")] ushort* lpBaseName, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetDeviceDriverFileNameA([NativeTypeName("LPVOID")] void* ImageBase, [NativeTypeName("LPSTR")] sbyte* lpFilename, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetDeviceDriverFileNameW([NativeTypeName("LPVOID")] void* ImageBase, [NativeTypeName("LPWSTR")] ushort* lpFilename, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32GetProcessMemoryInfo([NativeTypeName("HANDLE")] IntPtr Process, [NativeTypeName("PPROCESS_MEMORY_COUNTERS")] PROCESS_MEMORY_COUNTERS* ppsmemCounters, [NativeTypeName("DWORD")] uint cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32GetPerformanceInfo([NativeTypeName("PPERFORMANCE_INFORMATION")] PERFORMANCE_INFORMATION* pPerformanceInformation, [NativeTypeName("DWORD")] uint cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32EnumPageFilesW([NativeTypeName("PENUM_PAGE_FILE_CALLBACKW")] delegate* unmanaged pCallBackRoutine, [NativeTypeName("LPVOID")] void* pContext); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32EnumPageFilesA([NativeTypeName("PENUM_PAGE_FILE_CALLBACKA")] delegate* unmanaged pCallBackRoutine, [NativeTypeName("LPVOID")] void* pContext); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetProcessImageFileNameA([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("LPSTR")] sbyte* lpImageFileName, [NativeTypeName("DWORD")] uint nSize); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint K32GetProcessImageFileNameW([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("LPWSTR")] ushort* lpImageFileName, [NativeTypeName("DWORD")] uint nSize); + + [NativeTypeName("#define LIST_MODULES_DEFAULT 0x0")] + public const int LIST_MODULES_DEFAULT = 0x0; + + [NativeTypeName("#define LIST_MODULES_32BIT 0x01")] + public const int LIST_MODULES_32BIT = 0x01; + + [NativeTypeName("#define LIST_MODULES_64BIT 0x02")] + public const int LIST_MODULES_64BIT = 0x02; + + [NativeTypeName("#define LIST_MODULES_ALL (LIST_MODULES_32BIT | LIST_MODULES_64BIT)")] + public const int LIST_MODULES_ALL = (0x01 | 0x02); + + [NativeTypeName("#define PSAPI_VERSION 2")] + public const int PSAPI_VERSION = 2; + + [NativeTypeName("#define EnumProcessModules K32EnumProcessModules")] + public static readonly delegate* EnumProcessModules = &K32EnumProcessModules; + + [NativeTypeName("#define EnumProcessModulesEx K32EnumProcessModulesEx")] + public static readonly delegate* EnumProcessModulesEx = &K32EnumProcessModulesEx; + + [NativeTypeName("#define QueryWorkingSet K32QueryWorkingSet")] + public static readonly delegate* QueryWorkingSet = &K32QueryWorkingSet; + + [NativeTypeName("#define QueryWorkingSetEx K32QueryWorkingSetEx")] + public static readonly delegate* QueryWorkingSetEx = &K32QueryWorkingSetEx; + + [NativeTypeName("#define InitializeProcessForWsWatch K32InitializeProcessForWsWatch")] + public static readonly delegate* InitializeProcessForWsWatch = &K32InitializeProcessForWsWatch; + + [NativeTypeName("#define GetWsChanges K32GetWsChanges")] + public static readonly delegate* GetWsChanges = &K32GetWsChanges; + + [NativeTypeName("#define GetWsChangesEx K32GetWsChangesEx")] + public static readonly delegate* GetWsChangesEx = &K32GetWsChangesEx; + + [NativeTypeName("#define GetMappedFileNameW K32GetMappedFileNameW")] + public static readonly delegate* GetMappedFileNameW = &K32GetMappedFileNameW; + + [NativeTypeName("#define GetMappedFileNameA K32GetMappedFileNameA")] + public static readonly delegate* GetMappedFileNameA = &K32GetMappedFileNameA; + + [NativeTypeName("#define EnumDeviceDrivers K32EnumDeviceDrivers")] + public static readonly delegate* EnumDeviceDrivers = &K32EnumDeviceDrivers; + + [NativeTypeName("#define GetDeviceDriverBaseNameA K32GetDeviceDriverBaseNameA")] + public static readonly delegate* GetDeviceDriverBaseNameA = &K32GetDeviceDriverBaseNameA; + + [NativeTypeName("#define GetDeviceDriverBaseNameW K32GetDeviceDriverBaseNameW")] + public static readonly delegate* GetDeviceDriverBaseNameW = &K32GetDeviceDriverBaseNameW; + + [NativeTypeName("#define GetDeviceDriverFileNameA K32GetDeviceDriverFileNameA")] + public static readonly delegate* GetDeviceDriverFileNameA = &K32GetDeviceDriverFileNameA; + + [NativeTypeName("#define GetDeviceDriverFileNameW K32GetDeviceDriverFileNameW")] + public static readonly delegate* GetDeviceDriverFileNameW = &K32GetDeviceDriverFileNameW; + + [NativeTypeName("#define GetPerformanceInfo K32GetPerformanceInfo")] + public static readonly delegate* GetPerformanceInfo = &K32GetPerformanceInfo; + + [NativeTypeName("#define GetProcessImageFileNameA K32GetProcessImageFileNameA")] + public static readonly delegate* GetProcessImageFileNameA = &K32GetProcessImageFileNameA; + + [NativeTypeName("#define GetProcessImageFileNameW K32GetProcessImageFileNameW")] + public static readonly delegate* GetProcessImageFileNameW = &K32GetProcessImageFileNameW; + + [NativeTypeName("#define GetModuleBaseNameA K32GetModuleBaseNameA")] + public static readonly delegate* GetModuleBaseNameA = &K32GetModuleBaseNameA; + + [NativeTypeName("#define GetModuleBaseNameW K32GetModuleBaseNameW")] + public static readonly delegate* GetModuleBaseNameW = &K32GetModuleBaseNameW; + + [NativeTypeName("#define GetModuleFileNameExA K32GetModuleFileNameExA")] + public static readonly delegate* GetModuleFileNameExA = &K32GetModuleFileNameExA; + + [NativeTypeName("#define GetModuleFileNameExW K32GetModuleFileNameExW")] + public static readonly delegate* GetModuleFileNameExW = &K32GetModuleFileNameExW; + + [NativeTypeName("#define EmptyWorkingSet K32EmptyWorkingSet")] + public static readonly delegate* EmptyWorkingSet = &K32EmptyWorkingSet; + + [NativeTypeName("#define EnumPageFilesW K32EnumPageFilesW")] + public static readonly delegate*, void*, int> EnumPageFilesW = &K32EnumPageFilesW; + + [NativeTypeName("#define EnumPageFilesA K32EnumPageFilesA")] + public static readonly delegate*, void*, int> EnumPageFilesA = &K32EnumPageFilesA; + + [NativeTypeName("#define EnumProcesses K32EnumProcesses")] + public static readonly delegate* EnumProcesses = &K32EnumProcesses; + + [NativeTypeName("#define GetProcessMemoryInfo K32GetProcessMemoryInfo")] + public static readonly delegate* GetProcessMemoryInfo = &K32GetProcessMemoryInfo; + + [NativeTypeName("#define GetModuleInformation K32GetModuleInformation")] + public static readonly delegate* GetModuleInformation = &K32GetModuleInformation; + + [NativeTypeName("#define GetModuleBaseName GetModuleBaseNameW")] + public static readonly delegate* GetModuleBaseName = &K32GetModuleBaseNameW; + + [NativeTypeName("#define GetModuleFileNameEx GetModuleFileNameExW")] + public static readonly delegate* GetModuleFileNameEx = &K32GetModuleFileNameExW; + + [NativeTypeName("#define GetMappedFileName GetMappedFileNameW")] + public static readonly delegate* GetMappedFileName = &K32GetMappedFileNameW; + + [NativeTypeName("#define GetDeviceDriverBaseName GetDeviceDriverBaseNameW")] + public static readonly delegate* GetDeviceDriverBaseName = &K32GetDeviceDriverBaseNameW; + + [NativeTypeName("#define GetDeviceDriverFileName GetDeviceDriverFileNameW")] + public static readonly delegate* GetDeviceDriverFileName = &K32GetDeviceDriverFileNameW; + + [NativeTypeName("#define EnumPageFiles EnumPageFilesW")] + public static readonly delegate*, void*, int> EnumPageFiles = &K32EnumPageFilesW; + + [NativeTypeName("#define GetProcessImageFileName GetProcessImageFileNameW")] + public static readonly delegate* GetProcessImageFileName = &K32GetProcessImageFileNameW; + } +} diff --git a/tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs new file mode 100644 index 0000000000..a09fb09e66 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class ENUM_PAGE_FILE_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ENUM_PAGE_FILE_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(ENUM_PAGE_FILE_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(ENUM_PAGE_FILE_INFORMATION), Is.EqualTo(32)); + } + else + { + Assert.That(sizeof(ENUM_PAGE_FILE_INFORMATION), Is.EqualTo(20)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs b/tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs new file mode 100644 index 0000000000..5c5847f07f --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class MODULEINFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(MODULEINFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(MODULEINFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(MODULEINFO), Is.EqualTo(24)); + } + else + { + Assert.That(sizeof(MODULEINFO), Is.EqualTo(12)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs new file mode 100644 index 0000000000..984a645bc9 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PERFORMANCE_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PERFORMANCE_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PERFORMANCE_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PERFORMANCE_INFORMATION), Is.EqualTo(104)); + } + else + { + Assert.That(sizeof(PERFORMANCE_INFORMATION), Is.EqualTo(56)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs new file mode 100644 index 0000000000..0f1d3dcfd4 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PROCESS_MEMORY_COUNTERSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PROCESS_MEMORY_COUNTERS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PROCESS_MEMORY_COUNTERS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PROCESS_MEMORY_COUNTERS), Is.EqualTo(72)); + } + else + { + Assert.That(sizeof(PROCESS_MEMORY_COUNTERS), Is.EqualTo(40)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs new file mode 100644 index 0000000000..7fcd10126c --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PROCESS_MEMORY_COUNTERS_EXTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PROCESS_MEMORY_COUNTERS_EX))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PROCESS_MEMORY_COUNTERS_EX).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PROCESS_MEMORY_COUNTERS_EX), Is.EqualTo(80)); + } + else + { + Assert.That(sizeof(PROCESS_MEMORY_COUNTERS_EX), Is.EqualTo(44)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs new file mode 100644 index 0000000000..7c042137d6 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSAPI_WORKING_SET_BLOCKTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSAPI_WORKING_SET_BLOCK))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutExplicitTest() + { + Assert.That(typeof(PSAPI_WORKING_SET_BLOCK).IsExplicitLayout, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSAPI_WORKING_SET_BLOCK), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(PSAPI_WORKING_SET_BLOCK), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs new file mode 100644 index 0000000000..dd7830c529 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSAPI_WORKING_SET_EX_BLOCKTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSAPI_WORKING_SET_EX_BLOCK))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutExplicitTest() + { + Assert.That(typeof(PSAPI_WORKING_SET_EX_BLOCK).IsExplicitLayout, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSAPI_WORKING_SET_EX_BLOCK), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(PSAPI_WORKING_SET_EX_BLOCK), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs new file mode 100644 index 0000000000..36718f3c44 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSAPI_WORKING_SET_EX_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSAPI_WORKING_SET_EX_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSAPI_WORKING_SET_EX_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSAPI_WORKING_SET_EX_INFORMATION), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(PSAPI_WORKING_SET_EX_INFORMATION), Is.EqualTo(8)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs new file mode 100644 index 0000000000..cd746fefd8 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSAPI_WORKING_SET_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSAPI_WORKING_SET_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSAPI_WORKING_SET_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSAPI_WORKING_SET_INFORMATION), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(PSAPI_WORKING_SET_INFORMATION), Is.EqualTo(8)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs new file mode 100644 index 0000000000..1f778d9224 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSAPI_WS_WATCH_INFORMATIONTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSAPI_WS_WATCH_INFORMATION))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSAPI_WS_WATCH_INFORMATION).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSAPI_WS_WATCH_INFORMATION), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(PSAPI_WS_WATCH_INFORMATION), Is.EqualTo(8)); + } + } + } +} diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs new file mode 100644 index 0000000000..cebf679fa2 --- /dev/null +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class PSAPI_WS_WATCH_INFORMATION_EXTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(PSAPI_WS_WATCH_INFORMATION_EX))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(PSAPI_WS_WATCH_INFORMATION_EX).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(PSAPI_WS_WATCH_INFORMATION_EX), Is.EqualTo(32)); + } + else + { + Assert.That(sizeof(PSAPI_WS_WATCH_INFORMATION_EX), Is.EqualTo(16)); + } + } + } +} From 5dae035361213c7be8f89c31ada6f9cd1ee5dd1f Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 21:39:33 -0500 Subject: [PATCH 18/36] Add rendezvoussession.h and rendezvoussession_i.c --- TerraFX.Interop.Windows.sln | 8 ++ generation/remap.rsp | 4 + generation/um/rendezvoussession/generate.rsp | 13 ++++ generation/um/rendezvoussession/header.txt | 4 + .../rendezvoussession/um-rendezvoussession.h | 3 + .../DRendezvousSessionEvents.cs | 67 +++++++++++++++++ .../IRendezvousApplication.cs | 46 ++++++++++++ .../rendezvoussession/IRendezvousSession.cs | 74 +++++++++++++++++++ .../RENDEZVOUS_SESSION_FLAGS.cs | 20 +++++ .../RENDEZVOUS_SESSION_STATE.cs | 19 +++++ .../RendezvousApplication.cs | 14 ++++ .../Windows/um/rendezvoussession/Windows.cs | 39 ++++++++++ .../DRendezvousSessionEventsTests.cs | 51 +++++++++++++ .../IRendezvousApplicationTests.cs | 51 +++++++++++++ .../IRendezvousSessionTests.cs | 51 +++++++++++++ .../RendezvousApplicationTests.cs | 44 +++++++++++ 16 files changed, 508 insertions(+) create mode 100644 generation/um/rendezvoussession/generate.rsp create mode 100644 generation/um/rendezvoussession/header.txt create mode 100644 generation/um/rendezvoussession/um-rendezvoussession.h create mode 100644 sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs create mode 100644 sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs create mode 100644 sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs create mode 100644 sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs create mode 100644 sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs create mode 100644 sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs create mode 100644 sources/Interop/Windows/um/rendezvoussession/Windows.cs create mode 100644 tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs create mode 100644 tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs create mode 100644 tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs create mode 100644 tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 6a3f263553..acfe79d7ad 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1960,6 +1960,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Psapi", "Psapi", "{81CCE1E0 generation\um\Psapi\um-Psapi.h = generation\um\Psapi\um-Psapi.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rendezvoussession", "rendezvoussession", "{C6167203-23F9-46E4-856A-C2DC40DFBB7A}" + ProjectSection(SolutionItems) = preProject + generation\um\rendezvoussession\generate.rsp = generation\um\rendezvoussession\generate.rsp + generation\um\rendezvoussession\header.txt = generation\um\rendezvoussession\header.txt + generation\um\rendezvoussession\um-rendezvoussession.h = generation\um\rendezvoussession\um-rendezvoussession.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2268,6 +2275,7 @@ Global {DC0615E4-CFF8-47B5-AD41-80FEE842CE39} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {D1C8B976-2C97-4A0C-B22A-C3B47FBB8FF8} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {81CCE1E0-C734-40B8-B0BC-521F3668A8FD} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {C6167203-23F9-46E4-856A-C2DC40DFBB7A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 00cca914ac..9ac7344163 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -439,6 +439,7 @@ IID_DirectManipulationUpdateManager=CLSID_DirectManipulationUpdateManager IID_DirectManipulationViewport=CLSID_DirectManipulationViewport IID_DOMDocument=CLSID_DOMDocument IID_DOMFreeThreadedDocument=CLSID_DOMFreeThreadedDocument +IID_DRendezvousSessionEvents=DIID_DRendezvousSessionEvents IID_EnumFsiItems=CLSID_EnumFsiItems IID_EnumProgressItems=CLSID_EnumProgressItems IID_FileSystemImageResult=CLSID_FileSystemImageResult @@ -482,6 +483,7 @@ IID_PrintDocumentPackageTargetFactory=CLSID_PrintDocumentPackageTargetFactory IID_ProgressItem=CLSID_ProgressItem IID_ProgressItems=CLSID_ProgressItems IID_PropertySystem=CLSID_PropertySystem +IID_RendezvousApplication=CLSID_RendezvousApplication IID_SpAudioFormat=CLSID_SpAudioFormat IID_SpCompressedLexicon=CLSID_SpCompressedLexicon IID_SpCustomStream=CLSID_SpCustomStream @@ -3492,6 +3494,8 @@ __MIDL___MIDL_itf_msctf_0000_0000_0001=TfAnchor __MIDL___MIDL_itf_msctf_0000_0070_0001=TF_DA_LINESTYLE __MIDL___MIDL_itf_msctf_0000_0070_0002=TF_DA_COLORTYPE __MIDL___MIDL_itf_msctf_0000_0070_0004=TF_DA_ATTR_INFO +__MIDL___MIDL_itf_rendezvoussession_0000_0000_0001=RENDEZVOUS_SESSION_STATE +__MIDL___MIDL_itf_rendezvoussession_0000_0000_0002=RENDEZVOUS_SESSION_FLAGS __MIDL___MIDL_itf_strmif_0000_0026_0002=Windows __MIDL___MIDL_itf_strmif_0000_0132_0001=VALID_UOP_FLAG __MIDL___MIDL_itf_strmif_0000_0132_0002=DVD_CMD_FLAGS diff --git a/generation/um/rendezvoussession/generate.rsp b/generation/um/rendezvoussession/generate.rsp new file mode 100644 index 0000000000..e0158c4bf7 --- /dev/null +++ b/generation/um/rendezvoussession/generate.rsp @@ -0,0 +1,13 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-rendezvoussession.h +--output +../../../sources/Interop/Windows/um/rendezvoussession +--test-output +../../../tests/Interop/Windows/um/rendezvoussession +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/rendezvoussession.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/rendezvoussession_i.c +--with-attribute +RENDEZVOUS_SESSION_FLAGS=Flags diff --git a/generation/um/rendezvoussession/header.txt b/generation/um/rendezvoussession/header.txt new file mode 100644 index 0000000000..43e29d18fc --- /dev/null +++ b/generation/um/rendezvoussession/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/rendezvoussession/um-rendezvoussession.h b/generation/um/rendezvoussession/um-rendezvoussession.h new file mode 100644 index 0000000000..10db3c0b4b --- /dev/null +++ b/generation/um/rendezvoussession/um-rendezvoussession.h @@ -0,0 +1,3 @@ +#include +#include +#include diff --git a/sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs b/sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs new file mode 100644 index 0000000000..dcbab29af2 --- /dev/null +++ b/sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs @@ -0,0 +1,67 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("3FA19CF8-64C4-4F53-AE60-635B3806ECA6")] + [NativeTypeName("struct DRendezvousSessionEvents : IDispatch")] + public unsafe partial struct DRendezvousSessionEvents + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetTypeInfoCount([NativeTypeName("UINT *")] uint* pctinfo) + { + return ((delegate* unmanaged)(lpVtbl[3]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), pctinfo); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetTypeInfo([NativeTypeName("UINT")] uint iTInfo, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("ITypeInfo **")] ITypeInfo** ppTInfo) + { + return ((delegate* unmanaged)(lpVtbl[4]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), iTInfo, lcid, ppTInfo); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetIDsOfNames([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPOLESTR *")] ushort** rgszNames, [NativeTypeName("UINT")] uint cNames, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("DISPID *")] int* rgDispId) + { + return ((delegate* unmanaged)(lpVtbl[5]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), riid, rgszNames, cNames, lcid, rgDispId); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Invoke([NativeTypeName("DISPID")] int dispIdMember, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("WORD")] ushort wFlags, [NativeTypeName("DISPPARAMS *")] DISPPARAMS* pDispParams, [NativeTypeName("VARIANT *")] VARIANT* pVarResult, [NativeTypeName("EXCEPINFO *")] EXCEPINFO* pExcepInfo, [NativeTypeName("UINT *")] uint* puArgErr) + { + return ((delegate* unmanaged)(lpVtbl[6]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + } + } +} diff --git a/sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs b/sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs new file mode 100644 index 0000000000..9a4215b6cb --- /dev/null +++ b/sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs @@ -0,0 +1,46 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("4F4D070B-A275-49FB-B10D-8EC26387B50D")] + [NativeTypeName("struct IRendezvousApplication : IUnknown")] + public unsafe partial struct IRendezvousApplication + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IRendezvousApplication*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IRendezvousApplication*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IRendezvousApplication*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetRendezvousSession([NativeTypeName("IUnknown *")] IUnknown* pRendezvousSession) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IRendezvousApplication*)Unsafe.AsPointer(ref this), pRendezvousSession); + } + } +} diff --git a/sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs b/sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs new file mode 100644 index 0000000000..f9e27b0ec9 --- /dev/null +++ b/sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs @@ -0,0 +1,74 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("9BA4B1DD-8B0C-48B7-9E7C-2F25857C8DF5")] + [NativeTypeName("struct IRendezvousSession : IUnknown")] + public unsafe partial struct IRendezvousSession + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IRendezvousSession*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IRendezvousSession*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IRendezvousSession*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_State([NativeTypeName("RENDEZVOUS_SESSION_STATE *")] RENDEZVOUS_SESSION_STATE* pSessionState) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IRendezvousSession*)Unsafe.AsPointer(ref this), pSessionState); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_RemoteUser([NativeTypeName("BSTR *")] ushort** bstrUserName) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IRendezvousSession*)Unsafe.AsPointer(ref this), bstrUserName); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_Flags([NativeTypeName("LONG *")] int* pFlags) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IRendezvousSession*)Unsafe.AsPointer(ref this), pFlags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SendContextData([NativeTypeName("BSTR")] ushort* bstrData) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IRendezvousSession*)Unsafe.AsPointer(ref this), bstrData); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Terminate([NativeTypeName("HRESULT")] int hr, [NativeTypeName("BSTR")] ushort* bstrAppData) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IRendezvousSession*)Unsafe.AsPointer(ref this), hr, bstrAppData); + } + } +} diff --git a/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs new file mode 100644 index 0000000000..a7b8dbb7f2 --- /dev/null +++ b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs @@ -0,0 +1,20 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum RENDEZVOUS_SESSION_FLAGS + { + RSF_NONE = 0, + RSF_INVITER = 0x1, + RSF_INVITEE = 0x2, + RSF_ORIGINAL_INVITER = 0x4, + RSF_REMOTE_LEGACYSESSION = 0x8, + RSF_REMOTE_WIN7SESSION = 0x10, + } +} diff --git a/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs new file mode 100644 index 0000000000..3b1c5ad2f0 --- /dev/null +++ b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum RENDEZVOUS_SESSION_STATE + { + RSS_UNKNOWN = 0, + RSS_READY = (RSS_UNKNOWN + 1), + RSS_INVITATION = (RSS_READY + 1), + RSS_ACCEPTED = (RSS_INVITATION + 1), + RSS_CONNECTED = (RSS_ACCEPTED + 1), + RSS_CANCELLED = (RSS_CONNECTED + 1), + RSS_DECLINED = (RSS_CANCELLED + 1), + RSS_TERMINATED = (RSS_DECLINED + 1), + } +} diff --git a/sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs b/sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs new file mode 100644 index 0000000000..9aa176ef7e --- /dev/null +++ b/sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("0B7E019A-B5DE-47FA-8966-9082F82FB192")] + public partial struct RendezvousApplication + { + } +} diff --git a/sources/Interop/Windows/um/rendezvoussession/Windows.cs b/sources/Interop/Windows/um/rendezvoussession/Windows.cs new file mode 100644 index 0000000000..7f47504c52 --- /dev/null +++ b/sources/Interop/Windows/um/rendezvoussession/Windows.cs @@ -0,0 +1,39 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + [NativeTypeName("const IID")] + public static readonly Guid LIBID_RendezvousSessionLib = new Guid(0xEFD856A4, 0x5A85, 0x4A1B, 0xAD, 0xD5, 0x2E, 0xAD, 0xAC, 0xE6, 0xF6, 0xA2); + + [NativeTypeName("const IID")] + public static readonly Guid IID_IRendezvousSession = new Guid(0x9BA4B1DD, 0x8B0C, 0x48B7, 0x9E, 0x7C, 0x2F, 0x25, 0x85, 0x7C, 0x8D, 0xF5); + + [NativeTypeName("const IID")] + public static readonly Guid DIID_DRendezvousSessionEvents = new Guid(0x3FA19CF8, 0x64C4, 0x4F53, 0xAE, 0x60, 0x63, 0x5B, 0x38, 0x06, 0xEC, 0xA6); + + [NativeTypeName("const IID")] + public static readonly Guid IID_IRendezvousApplication = new Guid(0x4F4D070B, 0xA275, 0x49FB, 0xB1, 0x0D, 0x8E, 0xC2, 0x63, 0x87, 0xB5, 0x0D); + + [NativeTypeName("const CLSID")] + public static readonly Guid CLSID_RendezvousApplication = new Guid(0x0B7E019A, 0xB5DE, 0x47fa, 0x89, 0x66, 0x90, 0x82, 0xF8, 0x2F, 0xB1, 0x92); + + [NativeTypeName("#define DISPID_EVENT_ON_STATE_CHANGED ( 5 )")] + public const int DISPID_EVENT_ON_STATE_CHANGED = (5); + + [NativeTypeName("#define DISPID_EVENT_ON_TERMINATION ( 6 )")] + public const int DISPID_EVENT_ON_TERMINATION = (6); + + [NativeTypeName("#define DISPID_EVENT_ON_CONTEXT_DATA ( 7 )")] + public const int DISPID_EVENT_ON_CONTEXT_DATA = (7); + + [NativeTypeName("#define DISPID_EVENT_ON_SEND_ERROR ( 8 )")] + public const int DISPID_EVENT_ON_SEND_ERROR = (8); + } +} diff --git a/tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs b/tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs new file mode 100644 index 0000000000..a7020ff682 --- /dev/null +++ b/tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class DRendezvousSessionEventsTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(DRendezvousSessionEvents).GUID, Is.EqualTo(DIID_DRendezvousSessionEvents)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DRendezvousSessionEvents))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DRendezvousSessionEvents).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(DRendezvousSessionEvents), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(DRendezvousSessionEvents), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs b/tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs new file mode 100644 index 0000000000..1234128b20 --- /dev/null +++ b/tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IRendezvousApplicationTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IRendezvousApplication).GUID, Is.EqualTo(IID_IRendezvousApplication)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IRendezvousApplication))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IRendezvousApplication).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IRendezvousApplication), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IRendezvousApplication), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs b/tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs new file mode 100644 index 0000000000..2a9130e993 --- /dev/null +++ b/tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IRendezvousSessionTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IRendezvousSession).GUID, Is.EqualTo(IID_IRendezvousSession)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IRendezvousSession))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IRendezvousSession).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IRendezvousSession), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IRendezvousSession), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs b/tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs new file mode 100644 index 0000000000..734960b76f --- /dev/null +++ b/tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class RendezvousApplicationTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(RendezvousApplication).GUID, Is.EqualTo(CLSID_RendezvousApplication)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(RendezvousApplication))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(RendezvousApplication).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(RendezvousApplication), Is.EqualTo(1)); + } + } +} From c64c444103d2be5b1ea1b952ab3dbac34b0a3ada Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 21:43:57 -0500 Subject: [PATCH 19/36] Adjust inkrenderer.h --- generation/um/inkrenderer/generate.rsp | 2 ++ generation/um/inkrenderer/header.txt | 2 +- generation/um/inkrenderer/um-inkrenderer.h | 1 + .../Windows/um/inkrenderer/IInkD2DRenderer.cs | 2 +- .../Windows/um/inkrenderer/IInkD2DRenderer2.cs | 2 +- .../um/inkrenderer/INK_HIGH_CONTRAST_ADJUSTMENT.cs | 2 +- .../Windows/um/inkrenderer/InkD2DRenderer.cs | 2 +- sources/Interop/Windows/um/inkrenderer/Windows.cs | 14 ++++++++++---- .../um/inkrenderer/IInkD2DRenderer2Tests.cs | 2 +- .../Windows/um/inkrenderer/IInkD2DRendererTests.cs | 2 +- .../Windows/um/inkrenderer/InkD2DRendererTests.cs | 2 +- 11 files changed, 21 insertions(+), 12 deletions(-) diff --git a/generation/um/inkrenderer/generate.rsp b/generation/um/inkrenderer/generate.rsp index 90ab3bb210..ee08f93f99 100644 --- a/generation/um/inkrenderer/generate.rsp +++ b/generation/um/inkrenderer/generate.rsp @@ -8,3 +8,5 @@ um-inkrenderer.h ../../../tests/Interop/Windows/um/inkrenderer --traverse C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/inkrenderer.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/inkrenderer_i.c + diff --git a/generation/um/inkrenderer/header.txt b/generation/um/inkrenderer/header.txt index e4d0b3e734..a62388c94d 100644 --- a/generation/um/inkrenderer/header.txt +++ b/generation/um/inkrenderer/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/inkrenderer/um-inkrenderer.h b/generation/um/inkrenderer/um-inkrenderer.h index 251d70687a..cc5611102c 100644 --- a/generation/um/inkrenderer/um-inkrenderer.h +++ b/generation/um/inkrenderer/um-inkrenderer.h @@ -1,2 +1,3 @@ #include #include +#include \ No newline at end of file diff --git a/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer.cs b/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer.cs index 6f5415226b..0a6a48069b 100644 --- a/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer.cs +++ b/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer2.cs b/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer2.cs index 2e929fd6f9..e334190bad 100644 --- a/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer2.cs +++ b/sources/Interop/Windows/um/inkrenderer/IInkD2DRenderer2.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/inkrenderer/INK_HIGH_CONTRAST_ADJUSTMENT.cs b/sources/Interop/Windows/um/inkrenderer/INK_HIGH_CONTRAST_ADJUSTMENT.cs index 3d81dc0db5..c0e07de455 100644 --- a/sources/Interop/Windows/um/inkrenderer/INK_HIGH_CONTRAST_ADJUSTMENT.cs +++ b/sources/Interop/Windows/um/inkrenderer/INK_HIGH_CONTRAST_ADJUSTMENT.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/inkrenderer/InkD2DRenderer.cs b/sources/Interop/Windows/um/inkrenderer/InkD2DRenderer.cs index 7a56fcf42a..af9dc2e5bb 100644 --- a/sources/Interop/Windows/um/inkrenderer/InkD2DRenderer.cs +++ b/sources/Interop/Windows/um/inkrenderer/InkD2DRenderer.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/inkrenderer/Windows.cs b/sources/Interop/Windows/um/inkrenderer/Windows.cs index 1bf323fdf1..6681091715 100644 --- a/sources/Interop/Windows/um/inkrenderer/Windows.cs +++ b/sources/Interop/Windows/um/inkrenderer/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -9,10 +9,16 @@ namespace TerraFX.Interop { public static partial class Windows { - public static readonly Guid IID_IInkD2DRenderer = new Guid(0x407FB1DE, 0xF85A, 0x4150, 0x97, 0xCF, 0xB7, 0xFB, 0x27, 0x4F, 0xB4, 0xF8); + [NativeTypeName("const IID")] + public static readonly Guid IID_IInkD2DRenderer = new Guid(0x407fb1de, 0xf85a, 0x4150, 0x97, 0xcf, 0xb7, 0xfb, 0x27, 0x4f, 0xb4, 0xf8); - public static readonly Guid IID_IInkD2DRenderer2 = new Guid(0x0A95DCD9, 0x4578, 0x4B71, 0xB2, 0x0B, 0xBF, 0x66, 0x4D, 0x4B, 0xFE, 0xEE); + [NativeTypeName("const IID")] + public static readonly Guid IID_IInkD2DRenderer2 = new Guid(0x0a95dcd9, 0x4578, 0x4b71, 0xb2, 0x0b, 0xbf, 0x66, 0x4d, 0x4b, 0xfe, 0xee); - public static readonly Guid CLSID_InkD2DRenderer = new Guid(0x4044E60C, 0x7B01, 0x4671, 0xA9, 0x7C, 0x04, 0xE0, 0x21, 0x0A, 0x07, 0xA5); + [NativeTypeName("const IID")] + public static readonly Guid LIBID_InkD2DRendererLib = new Guid(0x390d0ab0, 0x19e2, 0x46bb, 0x86, 0x2e, 0xb0, 0x9f, 0x3c, 0xdc, 0xf8, 0xb9); + + [NativeTypeName("const CLSID")] + public static readonly Guid CLSID_InkD2DRenderer = new Guid(0x4044e60c, 0x7b01, 0x4671, 0xa9, 0x7c, 0x04, 0xe0, 0x21, 0x0a, 0x07, 0xa5); } } diff --git a/tests/Interop/Windows/um/inkrenderer/IInkD2DRenderer2Tests.cs b/tests/Interop/Windows/um/inkrenderer/IInkD2DRenderer2Tests.cs index 997d0e2bfb..c6d564a16f 100644 --- a/tests/Interop/Windows/um/inkrenderer/IInkD2DRenderer2Tests.cs +++ b/tests/Interop/Windows/um/inkrenderer/IInkD2DRenderer2Tests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/inkrenderer/IInkD2DRendererTests.cs b/tests/Interop/Windows/um/inkrenderer/IInkD2DRendererTests.cs index 9645d83eaa..f147ef87d1 100644 --- a/tests/Interop/Windows/um/inkrenderer/IInkD2DRendererTests.cs +++ b/tests/Interop/Windows/um/inkrenderer/IInkD2DRendererTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/inkrenderer/InkD2DRendererTests.cs b/tests/Interop/Windows/um/inkrenderer/InkD2DRendererTests.cs index d7e744c526..ef80d5f7f1 100644 --- a/tests/Interop/Windows/um/inkrenderer/InkD2DRendererTests.cs +++ b/tests/Interop/Windows/um/inkrenderer/InkD2DRendererTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; From d30b47821a183e8c402df4fcbecd05ecf9bfe9d3 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 22:03:29 -0500 Subject: [PATCH 20/36] Add msports.h --- TerraFX.Interop.Windows.sln | 8 +++ generation/remap.rsp | 1 + generation/um/msports/generate.rsp | 14 +++++ generation/um/msports/header.txt | 4 ++ generation/um/msports/um-msports.h | 3 + sources/Interop/Windows/um/msports/Windows.cs | 60 +++++++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 generation/um/msports/generate.rsp create mode 100644 generation/um/msports/header.txt create mode 100644 generation/um/msports/um-msports.h create mode 100644 sources/Interop/Windows/um/msports/Windows.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index acfe79d7ad..b4f1c4af26 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1967,6 +1967,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rendezvoussession", "rendez generation\um\rendezvoussession\um-rendezvoussession.h = generation\um\rendezvoussession\um-rendezvoussession.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "msports", "msports", "{0D590928-AA03-4324-BB11-424047D41EC3}" + ProjectSection(SolutionItems) = preProject + generation\um\msports\generate.rsp = generation\um\msports\generate.rsp + generation\um\msports\header.txt = generation\um\msports\header.txt + generation\um\msports\um-msports.h = generation\um\msports\um-msports.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2276,6 +2283,7 @@ Global {D1C8B976-2C97-4A0C-B22A-C3B47FBB8FF8} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {81CCE1E0-C734-40B8-B0BC-521F3668A8FD} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C6167203-23F9-46E4-856A-C2DC40DFBB7A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {0D590928-AA03-4324-BB11-424047D41EC3} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 9ac7344163..56e29e0cfc 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -49,6 +49,7 @@ HANDLE_PTR=nuint HBITMAP=IntPtr HBRUSH=IntPtr HCOLORSPACE=IntPtr +HCOMDB=IntPtr HDC=IntPtr HDESK=IntPtr HDRVR=IntPtr diff --git a/generation/um/msports/generate.rsp b/generation/um/msports/generate.rsp new file mode 100644 index 0000000000..caa3fd93ce --- /dev/null +++ b/generation/um/msports/generate.rsp @@ -0,0 +1,14 @@ +@../../settings.rsp +@../../remap.rsp +--define-macro +SERIAL_ADVANCED_SETTINGS +--file +um-msports.h +--output +../../../sources/Interop/Windows/um/msports +--test-output +../../../tests/Interop/Windows/um/msports +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/msports.h +--with-librarypath +*=msports diff --git a/generation/um/msports/header.txt b/generation/um/msports/header.txt new file mode 100644 index 0000000000..01e28fe023 --- /dev/null +++ b/generation/um/msports/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/msports.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/msports/um-msports.h b/generation/um/msports/um-msports.h new file mode 100644 index 0000000000..6ff346d587 --- /dev/null +++ b/generation/um/msports/um-msports.h @@ -0,0 +1,3 @@ +#include +#include +#include diff --git a/sources/Interop/Windows/um/msports/Windows.cs b/sources/Interop/Windows/um/msports/Windows.cs new file mode 100644 index 0000000000..d7f4ea9f0e --- /dev/null +++ b/sources/Interop/Windows/um/msports/Windows.cs @@ -0,0 +1,60 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/msports.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int SerialDisplayAdvancedSettings([NativeTypeName("HWND")] IntPtr ParentHwnd, [NativeTypeName("HDEVINFO")] void* DeviceInfoSet, [NativeTypeName("PSP_DEVINFO_DATA")] SP_DEVINFO_DATA* DeviceInfoData); + + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int ComDBOpen([NativeTypeName("PHCOMDB")] IntPtr* PHComDB); + + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int ComDBClose([NativeTypeName("HCOMDB")] IntPtr HComDB); + + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int ComDBGetCurrentPortUsage([NativeTypeName("HCOMDB")] IntPtr HComDB, [NativeTypeName("PBYTE")] byte* Buffer, [NativeTypeName("DWORD")] uint BufferSize, [NativeTypeName("ULONG")] uint ReportType, [NativeTypeName("LPDWORD")] uint* MaxPortsReported); + + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int ComDBClaimNextFreePort([NativeTypeName("HCOMDB")] IntPtr HComDB, [NativeTypeName("LPDWORD")] uint* ComNumber); + + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int ComDBClaimPort([NativeTypeName("HCOMDB")] IntPtr HComDB, [NativeTypeName("DWORD")] uint ComNumber, [NativeTypeName("BOOL")] int ForceClaim, [NativeTypeName("PBOOL")] int* Forced); + + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int ComDBReleasePort([NativeTypeName("HCOMDB")] IntPtr HComDB, [NativeTypeName("DWORD")] uint ComNumber); + + [DllImport("msports", ExactSpelling = true)] + [return: NativeTypeName("LONG")] + public static extern int ComDBResizeDatabase([NativeTypeName("HCOMDB")] IntPtr HComDB, [NativeTypeName("DWORD")] uint NewSize); + + [NativeTypeName("#define HCOMDB_INVALID_HANDLE_VALUE ((HCOMDB) INVALID_HANDLE_VALUE)")] + public static readonly IntPtr HCOMDB_INVALID_HANDLE_VALUE = ((IntPtr)((IntPtr)((nint)(-1)))); + + [NativeTypeName("#define COMDB_MIN_PORTS_ARBITRATED 256")] + public const int COMDB_MIN_PORTS_ARBITRATED = 256; + + [NativeTypeName("#define COMDB_MAX_PORTS_ARBITRATED 4096")] + public const int COMDB_MAX_PORTS_ARBITRATED = 4096; + + [NativeTypeName("#define CDB_REPORT_BITS 0x0")] + public const int CDB_REPORT_BITS = 0x0; + + [NativeTypeName("#define CDB_REPORT_BYTES 0x1")] + public const int CDB_REPORT_BYTES = 0x1; + } +} From b6796f2a3b564f0ff9bf80704a0bc7e42d1ff5c0 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 23:13:17 -0500 Subject: [PATCH 21/36] Add NotificationActivationCallback.h --- TerraFX.Interop.Windows.sln | 8 +++ .../generate.rsp | 10 ++++ .../NotificationActivationCallback/header.txt | 4 ++ .../um-NotificationActivationCallback.h | 2 + .../INotificationActivationCallback.cs | 46 +++++++++++++++++ .../NOTIFICATION_USER_INPUT_DATA.cs | 16 ++++++ .../NotificationActivationCallback/Windows.cs | 14 +++++ .../INotificationActivationCallbackTests.cs | 51 +++++++++++++++++++ .../NOTIFICATION_USER_INPUT_DATATests.cs | 43 ++++++++++++++++ 9 files changed, 194 insertions(+) create mode 100644 generation/um/NotificationActivationCallback/generate.rsp create mode 100644 generation/um/NotificationActivationCallback/header.txt create mode 100644 generation/um/NotificationActivationCallback/um-NotificationActivationCallback.h create mode 100644 sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs create mode 100644 sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs create mode 100644 sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs create mode 100644 tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs create mode 100644 tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index b4f1c4af26..6e7508eef5 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1974,6 +1974,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "msports", "msports", "{0D59 generation\um\msports\um-msports.h = generation\um\msports\um-msports.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NotificationActivationCallback", "NotificationActivationCallback", "{2207882C-191C-40CB-86DE-6CC96860EDD5}" + ProjectSection(SolutionItems) = preProject + generation\um\NotificationActivationCallback\generate.rsp = generation\um\NotificationActivationCallback\generate.rsp + generation\um\NotificationActivationCallback\header.txt = generation\um\NotificationActivationCallback\header.txt + generation\um\NotificationActivationCallback\um-NotificationActivationCallback.h = generation\um\NotificationActivationCallback\um-NotificationActivationCallback.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2284,6 +2291,7 @@ Global {81CCE1E0-C734-40B8-B0BC-521F3668A8FD} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C6167203-23F9-46E4-856A-C2DC40DFBB7A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {0D590928-AA03-4324-BB11-424047D41EC3} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {2207882C-191C-40CB-86DE-6CC96860EDD5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/um/NotificationActivationCallback/generate.rsp b/generation/um/NotificationActivationCallback/generate.rsp new file mode 100644 index 0000000000..1c7e42bd55 --- /dev/null +++ b/generation/um/NotificationActivationCallback/generate.rsp @@ -0,0 +1,10 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-NotificationActivationCallback.h +--output +../../../sources/Interop/Windows/um/NotificationActivationCallback +--test-output +../../../tests/Interop/Windows/um/NotificationActivationCallback +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/NotificationActivationCallback.h diff --git a/generation/um/NotificationActivationCallback/header.txt b/generation/um/NotificationActivationCallback/header.txt new file mode 100644 index 0000000000..16df687a7d --- /dev/null +++ b/generation/um/NotificationActivationCallback/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/NotificationActivationCallback/um-NotificationActivationCallback.h b/generation/um/NotificationActivationCallback/um-NotificationActivationCallback.h new file mode 100644 index 0000000000..0b6aa002d6 --- /dev/null +++ b/generation/um/NotificationActivationCallback/um-NotificationActivationCallback.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs b/sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs new file mode 100644 index 0000000000..efb71a291f --- /dev/null +++ b/sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs @@ -0,0 +1,46 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("53E31837-6600-4A81-9395-75CFFE746F94")] + [NativeTypeName("struct INotificationActivationCallback : IUnknown")] + public unsafe partial struct INotificationActivationCallback + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((INotificationActivationCallback*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((INotificationActivationCallback*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((INotificationActivationCallback*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Activate([NativeTypeName("LPCWSTR")] ushort* appUserModelId, [NativeTypeName("LPCWSTR")] ushort* invokedArgs, [NativeTypeName("const NOTIFICATION_USER_INPUT_DATA *")] NOTIFICATION_USER_INPUT_DATA* data, [NativeTypeName("ULONG")] uint count) + { + return ((delegate* unmanaged)(lpVtbl[3]))((INotificationActivationCallback*)Unsafe.AsPointer(ref this), appUserModelId, invokedArgs, data, count); + } + } +} diff --git a/sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs b/sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs new file mode 100644 index 0000000000..e5def313a1 --- /dev/null +++ b/sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct NOTIFICATION_USER_INPUT_DATA + { + [NativeTypeName("LPCWSTR")] + public ushort* Key; + + [NativeTypeName("LPCWSTR")] + public ushort* Value; + } +} diff --git a/sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs b/sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs new file mode 100644 index 0000000000..cabcfa47e9 --- /dev/null +++ b/sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + public static readonly Guid IID_INotificationActivationCallback = new Guid(0x53E31837, 0x6600, 0x4A81, 0x93, 0x95, 0x75, 0xCF, 0xFE, 0x74, 0x6F, 0x94); + } +} diff --git a/tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs b/tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs new file mode 100644 index 0000000000..9d18f74ad7 --- /dev/null +++ b/tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class INotificationActivationCallbackTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(INotificationActivationCallback).GUID, Is.EqualTo(IID_INotificationActivationCallback)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(INotificationActivationCallback))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(INotificationActivationCallback).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(INotificationActivationCallback), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(INotificationActivationCallback), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs b/tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs new file mode 100644 index 0000000000..02b6676fad --- /dev/null +++ b/tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class NOTIFICATION_USER_INPUT_DATATests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(NOTIFICATION_USER_INPUT_DATA))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(NOTIFICATION_USER_INPUT_DATA).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(NOTIFICATION_USER_INPUT_DATA), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(NOTIFICATION_USER_INPUT_DATA), Is.EqualTo(8)); + } + } + } +} From f1ae72bf3eedbae6ba2e54f6ad775f688d4a110f Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 23:19:46 -0500 Subject: [PATCH 22/36] Add gamingtcui.h --- TerraFX.Interop.Windows.sln | 8 ++ generation/um/gamingtcui/generate.rsp | 12 ++ generation/um/gamingtcui/header.txt | 4 + generation/um/gamingtcui/um-gamingtcui.h | 3 + .../um/gamingtcui/KnownGamingPrivileges.cs | 33 +++++ .../Interop/Windows/um/gamingtcui/Windows.cs | 117 ++++++++++++++++++ 6 files changed, 177 insertions(+) create mode 100644 generation/um/gamingtcui/generate.rsp create mode 100644 generation/um/gamingtcui/header.txt create mode 100644 generation/um/gamingtcui/um-gamingtcui.h create mode 100644 sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs create mode 100644 sources/Interop/Windows/um/gamingtcui/Windows.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 6e7508eef5..cf990babe1 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1981,6 +1981,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NotificationActivationCallb generation\um\NotificationActivationCallback\um-NotificationActivationCallback.h = generation\um\NotificationActivationCallback\um-NotificationActivationCallback.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gamingtcui", "gamingtcui", "{55B74712-EDD0-49F8-B6E2-0B3FD355CEEF}" + ProjectSection(SolutionItems) = preProject + generation\um\gamingtcui\generate.rsp = generation\um\gamingtcui\generate.rsp + generation\um\gamingtcui\header.txt = generation\um\gamingtcui\header.txt + generation\um\gamingtcui\um-gamingtcui.h = generation\um\gamingtcui\um-gamingtcui.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2292,6 +2299,7 @@ Global {C6167203-23F9-46E4-856A-C2DC40DFBB7A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {0D590928-AA03-4324-BB11-424047D41EC3} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2207882C-191C-40CB-86DE-6CC96860EDD5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {55B74712-EDD0-49F8-B6E2-0B3FD355CEEF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/um/gamingtcui/generate.rsp b/generation/um/gamingtcui/generate.rsp new file mode 100644 index 0000000000..d901f49571 --- /dev/null +++ b/generation/um/gamingtcui/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-gamingtcui.h +--output +../../../sources/Interop/Windows/um/gamingtcui +--test-output +../../../tests/Interop/Windows/um/gamingtcui +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/gamingtcui.h +--with-librarypath +*=gamingtcui diff --git a/generation/um/gamingtcui/header.txt b/generation/um/gamingtcui/header.txt new file mode 100644 index 0000000000..b1a9d68733 --- /dev/null +++ b/generation/um/gamingtcui/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/gamingtcui/um-gamingtcui.h b/generation/um/gamingtcui/um-gamingtcui.h new file mode 100644 index 0000000000..0a0e09de8a --- /dev/null +++ b/generation/um/gamingtcui/um-gamingtcui.h @@ -0,0 +1,3 @@ +#include +#include +#include diff --git a/sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs b/sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs new file mode 100644 index 0000000000..2547749c8c --- /dev/null +++ b/sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs @@ -0,0 +1,33 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum KnownGamingPrivileges + { + XPRIVILEGE_BROADCAST = 190, + XPRIVILEGE_VIEW_FRIENDS_LIST = 197, + XPRIVILEGE_GAME_DVR = 198, + XPRIVILEGE_SHARE_KINECT_CONTENT = 199, + XPRIVILEGE_MULTIPLAYER_PARTIES = 203, + XPRIVILEGE_COMMUNICATION_VOICE_INGAME = 205, + XPRIVILEGE_COMMUNICATION_VOICE_SKYPE = 206, + XPRIVILEGE_CLOUD_GAMING_MANAGE_SESSION = 207, + XPRIVILEGE_CLOUD_GAMING_JOIN_SESSION = 208, + XPRIVILEGE_CLOUD_SAVED_GAMES = 209, + XPRIVILEGE_SHARE_CONTENT = 211, + XPRIVILEGE_PREMIUM_CONTENT = 214, + XPRIVILEGE_SUBSCRIPTION_CONTENT = 219, + XPRIVILEGE_SOCIAL_NETWORK_SHARING = 220, + XPRIVILEGE_PREMIUM_VIDEO = 224, + XPRIVILEGE_VIDEO_COMMUNICATIONS = 235, + XPRIVILEGE_PURCHASE_CONTENT = 245, + XPRIVILEGE_USER_CREATED_CONTENT = 247, + XPRIVILEGE_PROFILE_VIEWING = 249, + XPRIVILEGE_COMMUNICATIONS = 252, + XPRIVILEGE_MULTIPLAYER_SESSIONS = 254, + XPRIVILEGE_ADD_FRIEND = 255, + } +} diff --git a/sources/Interop/Windows/um/gamingtcui/Windows.cs b/sources/Interop/Windows/um/gamingtcui/Windows.cs new file mode 100644 index 0000000000..9c0f129d48 --- /dev/null +++ b/sources/Interop/Windows/um/gamingtcui/Windows.cs @@ -0,0 +1,117 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowGameInviteUI([NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowPlayerPickerUI([NativeTypeName("HSTRING")] IntPtr promptDisplayText, [NativeTypeName("const HSTRING *")] IntPtr* xuids, [NativeTypeName("size_t")] nuint xuidsCount, [NativeTypeName("const HSTRING *")] IntPtr* preSelectedXuids, [NativeTypeName("size_t")] nuint preSelectedXuidsCount, [NativeTypeName("size_t")] nuint minSelectionCount, [NativeTypeName("size_t")] nuint maxSelectionCount, [NativeTypeName("PlayerPickerUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowProfileCardUI([NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowChangeFriendRelationshipUI([NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowTitleAchievementsUI([NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ProcessPendingGameUI([NativeTypeName("BOOL")] int waitForCompletion); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int TryCancelPendingGameUI(); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int CheckGamingPrivilegeWithUI([NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("HSTRING")] IntPtr friendlyMessage, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int CheckGamingPrivilegeSilently([NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("BOOL *")] int* hasPrivilege); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowGameInviteUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowPlayerPickerUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr promptDisplayText, [NativeTypeName("const HSTRING *")] IntPtr* xuids, [NativeTypeName("size_t")] nuint xuidsCount, [NativeTypeName("const HSTRING *")] IntPtr* preSelectedXuids, [NativeTypeName("size_t")] nuint preSelectedXuidsCount, [NativeTypeName("size_t")] nuint minSelectionCount, [NativeTypeName("size_t")] nuint maxSelectionCount, [NativeTypeName("PlayerPickerUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowProfileCardUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowChangeFriendRelationshipUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowTitleAchievementsUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int CheckGamingPrivilegeWithUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("HSTRING")] IntPtr friendlyMessage, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int CheckGamingPrivilegeSilentlyForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("BOOL *")] int* hasPrivilege); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowGameInviteUIWithContext([NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("HSTRING")] IntPtr customActivationContext, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowGameInviteUIWithContextForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("HSTRING")] IntPtr customActivationContext, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowGameInfoUI([NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowGameInfoUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowFindFriendsUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowFindFriendsUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowCustomizeUserProfileUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowCustomizeUserProfileUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowUserSettingsUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + + [DllImport("gamingtcui", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int ShowUserSettingsUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + } +} From 9e8fc87df7d594417cecc6079b71e988beb98ccb Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 23:26:20 -0500 Subject: [PATCH 23/36] Add manipulations.h and manipulations_i.c --- TerraFX.Interop.Windows.sln | 8 + generation/remap.rsp | 2 + generation/um/manipulations/generate.rsp | 13 + generation/um/manipulations/header.txt | 4 + .../um/manipulations/um-manipulations.h | 3 + .../um/manipulations/IInertiaProcessor.cs | 382 ++++++++++++++++++ .../manipulations/IManipulationProcessor.cs | 186 +++++++++ .../um/manipulations/InertiaProcessor.cs | 14 + .../MANIPULATION_PROCESSOR_MANIPULATIONS.cs | 20 + .../um/manipulations/ManipulationProcessor.cs | 14 + .../Windows/um/manipulations/Windows.cs | 39 ++ .../um/manipulations/_IManipulationEvents.cs | 60 +++ .../manipulations/IInertiaProcessorTests.cs | 51 +++ .../IManipulationProcessorTests.cs | 51 +++ .../um/manipulations/InertiaProcessorTests.cs | 44 ++ .../ManipulationProcessorTests.cs | 44 ++ .../_IManipulationEventsTests.cs | 51 +++ 17 files changed, 986 insertions(+) create mode 100644 generation/um/manipulations/generate.rsp create mode 100644 generation/um/manipulations/header.txt create mode 100644 generation/um/manipulations/um-manipulations.h create mode 100644 sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs create mode 100644 sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs create mode 100644 sources/Interop/Windows/um/manipulations/InertiaProcessor.cs create mode 100644 sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs create mode 100644 sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs create mode 100644 sources/Interop/Windows/um/manipulations/Windows.cs create mode 100644 sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs create mode 100644 tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs create mode 100644 tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs create mode 100644 tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs create mode 100644 tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs create mode 100644 tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index cf990babe1..193ba3dc65 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1988,6 +1988,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gamingtcui", "gamingtcui", generation\um\gamingtcui\um-gamingtcui.h = generation\um\gamingtcui\um-gamingtcui.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "manipulations", "manipulations", "{68E9A8F5-C4A3-47FD-B449-748EC32A6FEB}" + ProjectSection(SolutionItems) = preProject + generation\um\manipulations\generate.rsp = generation\um\manipulations\generate.rsp + generation\um\manipulations\header.txt = generation\um\manipulations\header.txt + generation\um\manipulations\um-manipulations.h = generation\um\manipulations\um-manipulations.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2300,6 +2307,7 @@ Global {0D590928-AA03-4324-BB11-424047D41EC3} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2207882C-191C-40CB-86DE-6CC96860EDD5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {55B74712-EDD0-49F8-B6E2-0B3FD355CEEF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {68E9A8F5-C4A3-47FD-B449-748EC32A6FEB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 56e29e0cfc..994a0617b8 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -452,6 +452,7 @@ IID_FXEcho=CLSID_FXEcho IID_FXEQ=CLSID_FXEQ IID_FXMasteringLimiter=CLSID_FXMasteringLimiter IID_FXReverb=CLSID_FXReverb +IID_InertiaProcessor=CLSID_InertiaProcessor IID_InkD2DRenderer=CLSID_InkD2DRenderer IID_InkDesktopHost=CLSID_InkDesktopHost IID_InMemoryPropertyStore=CLSID_InMemoryPropertyStore @@ -460,6 +461,7 @@ IID_IsolatedAppLauncher=CLSID_IsolatedAppLauncher IID_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT=STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT IID_KSDATAFORMAT_SUBTYPE_PCM=STATIC_KSDATAFORMAT_SUBTYPE_PCM IID_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX=STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX +IID_ManipulationProcessor=CLSID_ManipulationProcessor IID_MSDiscMasterObj=CLSID_MSDiscMasterObj IID_MSDiscRecorderObj=CLSID_MSDiscRecorderObj IID_MSEnumDiscRecordersObj=CLSID_MSEnumDiscRecordersObj diff --git a/generation/um/manipulations/generate.rsp b/generation/um/manipulations/generate.rsp new file mode 100644 index 0000000000..82cf22ec6c --- /dev/null +++ b/generation/um/manipulations/generate.rsp @@ -0,0 +1,13 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-manipulations.h +--output +../../../sources/Interop/Windows/um/manipulations +--test-output +../../../tests/Interop/Windows/um/manipulations +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/manipulations.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/manipulations_i.c +--with-attribute +MANIPULATION_PROCESSOR_MANIPULATIONS=Flags diff --git a/generation/um/manipulations/header.txt b/generation/um/manipulations/header.txt new file mode 100644 index 0000000000..9c1c14b1a5 --- /dev/null +++ b/generation/um/manipulations/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/manipulations/um-manipulations.h b/generation/um/manipulations/um-manipulations.h new file mode 100644 index 0000000000..54fc4ff3e0 --- /dev/null +++ b/generation/um/manipulations/um-manipulations.h @@ -0,0 +1,3 @@ +#include +#include +#include diff --git a/sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs b/sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs new file mode 100644 index 0000000000..8559d3b60d --- /dev/null +++ b/sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs @@ -0,0 +1,382 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("18B00C6D-C5EE-41B1-90A9-9D4A929095AD")] + [NativeTypeName("struct IInertiaProcessor : IUnknown")] + public unsafe partial struct IInertiaProcessor + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IInertiaProcessor*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IInertiaProcessor*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialOriginX([NativeTypeName("FLOAT *")] float* x) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), x); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialOriginX([NativeTypeName("FLOAT")] float x) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), x); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialOriginY([NativeTypeName("FLOAT *")] float* y) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialOriginY([NativeTypeName("FLOAT")] float y) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialVelocityX([NativeTypeName("FLOAT *")] float* x) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), x); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialVelocityX([NativeTypeName("FLOAT")] float x) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), x); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialVelocityY([NativeTypeName("FLOAT *")] float* y) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialVelocityY([NativeTypeName("FLOAT")] float y) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialAngularVelocity([NativeTypeName("FLOAT *")] float* velocity) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), velocity); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialAngularVelocity([NativeTypeName("FLOAT")] float velocity) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), velocity); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialExpansionVelocity([NativeTypeName("FLOAT *")] float* velocity) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), velocity); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialExpansionVelocity([NativeTypeName("FLOAT")] float velocity) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), velocity); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialRadius([NativeTypeName("FLOAT *")] float* radius) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), radius); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialRadius([NativeTypeName("FLOAT")] float radius) + { + return ((delegate* unmanaged)(lpVtbl[16]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), radius); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_BoundaryLeft([NativeTypeName("FLOAT *")] float* left) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), left); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_BoundaryLeft([NativeTypeName("FLOAT")] float left) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), left); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_BoundaryTop([NativeTypeName("FLOAT *")] float* top) + { + return ((delegate* unmanaged)(lpVtbl[19]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), top); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_BoundaryTop([NativeTypeName("FLOAT")] float top) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), top); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_BoundaryRight([NativeTypeName("FLOAT *")] float* right) + { + return ((delegate* unmanaged)(lpVtbl[21]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_BoundaryRight([NativeTypeName("FLOAT")] float right) + { + return ((delegate* unmanaged)(lpVtbl[22]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_BoundaryBottom([NativeTypeName("FLOAT *")] float* bottom) + { + return ((delegate* unmanaged)(lpVtbl[23]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), bottom); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_BoundaryBottom([NativeTypeName("FLOAT")] float bottom) + { + return ((delegate* unmanaged)(lpVtbl[24]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), bottom); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_ElasticMarginLeft([NativeTypeName("FLOAT *")] float* left) + { + return ((delegate* unmanaged)(lpVtbl[25]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), left); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_ElasticMarginLeft([NativeTypeName("FLOAT")] float left) + { + return ((delegate* unmanaged)(lpVtbl[26]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), left); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_ElasticMarginTop([NativeTypeName("FLOAT *")] float* top) + { + return ((delegate* unmanaged)(lpVtbl[27]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), top); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_ElasticMarginTop([NativeTypeName("FLOAT")] float top) + { + return ((delegate* unmanaged)(lpVtbl[28]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), top); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_ElasticMarginRight([NativeTypeName("FLOAT *")] float* right) + { + return ((delegate* unmanaged)(lpVtbl[29]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_ElasticMarginRight([NativeTypeName("FLOAT")] float right) + { + return ((delegate* unmanaged)(lpVtbl[30]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), right); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_ElasticMarginBottom([NativeTypeName("FLOAT *")] float* bottom) + { + return ((delegate* unmanaged)(lpVtbl[31]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), bottom); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_ElasticMarginBottom([NativeTypeName("FLOAT")] float bottom) + { + return ((delegate* unmanaged)(lpVtbl[32]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), bottom); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_DesiredDisplacement([NativeTypeName("FLOAT *")] float* displacement) + { + return ((delegate* unmanaged)(lpVtbl[33]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), displacement); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_DesiredDisplacement([NativeTypeName("FLOAT")] float displacement) + { + return ((delegate* unmanaged)(lpVtbl[34]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), displacement); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_DesiredRotation([NativeTypeName("FLOAT *")] float* rotation) + { + return ((delegate* unmanaged)(lpVtbl[35]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), rotation); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_DesiredRotation([NativeTypeName("FLOAT")] float rotation) + { + return ((delegate* unmanaged)(lpVtbl[36]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), rotation); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_DesiredExpansion([NativeTypeName("FLOAT *")] float* expansion) + { + return ((delegate* unmanaged)(lpVtbl[37]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), expansion); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_DesiredExpansion([NativeTypeName("FLOAT")] float expansion) + { + return ((delegate* unmanaged)(lpVtbl[38]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), expansion); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_DesiredDeceleration([NativeTypeName("FLOAT *")] float* deceleration) + { + return ((delegate* unmanaged)(lpVtbl[39]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), deceleration); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_DesiredDeceleration([NativeTypeName("FLOAT")] float deceleration) + { + return ((delegate* unmanaged)(lpVtbl[40]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), deceleration); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_DesiredAngularDeceleration([NativeTypeName("FLOAT *")] float* deceleration) + { + return ((delegate* unmanaged)(lpVtbl[41]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), deceleration); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_DesiredAngularDeceleration([NativeTypeName("FLOAT")] float deceleration) + { + return ((delegate* unmanaged)(lpVtbl[42]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), deceleration); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_DesiredExpansionDeceleration([NativeTypeName("FLOAT *")] float* deceleration) + { + return ((delegate* unmanaged)(lpVtbl[43]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), deceleration); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_DesiredExpansionDeceleration([NativeTypeName("FLOAT")] float deceleration) + { + return ((delegate* unmanaged)(lpVtbl[44]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), deceleration); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_InitialTimestamp([NativeTypeName("DWORD *")] uint* timestamp) + { + return ((delegate* unmanaged)(lpVtbl[45]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), timestamp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_InitialTimestamp([NativeTypeName("DWORD")] uint timestamp) + { + return ((delegate* unmanaged)(lpVtbl[46]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), timestamp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Reset() + { + return ((delegate* unmanaged)(lpVtbl[47]))((IInertiaProcessor*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Process([NativeTypeName("BOOL *")] int* completed) + { + return ((delegate* unmanaged)(lpVtbl[48]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), completed); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ProcessTime([NativeTypeName("DWORD")] uint timestamp, [NativeTypeName("BOOL *")] int* completed) + { + return ((delegate* unmanaged)(lpVtbl[49]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), timestamp, completed); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Complete() + { + return ((delegate* unmanaged)(lpVtbl[50]))((IInertiaProcessor*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int CompleteTime([NativeTypeName("DWORD")] uint timestamp) + { + return ((delegate* unmanaged)(lpVtbl[51]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), timestamp); + } + } +} diff --git a/sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs b/sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs new file mode 100644 index 0000000000..fd506b05cd --- /dev/null +++ b/sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs @@ -0,0 +1,186 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("A22AC519-8300-48A0-BEF4-F1BE8737DBA4")] + [NativeTypeName("struct IManipulationProcessor : IUnknown")] + public unsafe partial struct IManipulationProcessor + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IManipulationProcessor*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IManipulationProcessor*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_SupportedManipulations([NativeTypeName("MANIPULATION_PROCESSOR_MANIPULATIONS *")] MANIPULATION_PROCESSOR_MANIPULATIONS* manipulations) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulations); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_SupportedManipulations(MANIPULATION_PROCESSOR_MANIPULATIONS manipulations) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulations); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_PivotPointX([NativeTypeName("FLOAT *")] float* pivotPointX) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), pivotPointX); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_PivotPointX([NativeTypeName("FLOAT")] float pivotPointX) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), pivotPointX); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_PivotPointY([NativeTypeName("FLOAT *")] float* pivotPointY) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), pivotPointY); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_PivotPointY([NativeTypeName("FLOAT")] float pivotPointY) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), pivotPointY); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_PivotRadius([NativeTypeName("FLOAT *")] float* pivotRadius) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), pivotRadius); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_PivotRadius([NativeTypeName("FLOAT")] float pivotRadius) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), pivotRadius); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int CompleteManipulation() + { + return ((delegate* unmanaged)(lpVtbl[11]))((IManipulationProcessor*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ProcessDown([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulatorId, x, y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ProcessMove([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulatorId, x, y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ProcessUp([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulatorId, x, y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ProcessDownWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("DWORD")] uint timestamp) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulatorId, x, y, timestamp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ProcessMoveWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("DWORD")] uint timestamp) + { + return ((delegate* unmanaged)(lpVtbl[16]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulatorId, x, y, timestamp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ProcessUpWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("DWORD")] uint timestamp) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulatorId, x, y, timestamp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetVelocityX([NativeTypeName("FLOAT *")] float* velocityX) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), velocityX); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetVelocityY([NativeTypeName("FLOAT *")] float* velocityY) + { + return ((delegate* unmanaged)(lpVtbl[19]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), velocityY); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetExpansionVelocity([NativeTypeName("FLOAT *")] float* expansionVelocity) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), expansionVelocity); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetAngularVelocity([NativeTypeName("FLOAT *")] float* angularVelocity) + { + return ((delegate* unmanaged)(lpVtbl[21]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), angularVelocity); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int get_MinimumScaleRotateRadius([NativeTypeName("FLOAT *")] float* minRadius) + { + return ((delegate* unmanaged)(lpVtbl[22]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), minRadius); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int put_MinimumScaleRotateRadius([NativeTypeName("FLOAT")] float minRadius) + { + return ((delegate* unmanaged)(lpVtbl[23]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), minRadius); + } + } +} diff --git a/sources/Interop/Windows/um/manipulations/InertiaProcessor.cs b/sources/Interop/Windows/um/manipulations/InertiaProcessor.cs new file mode 100644 index 0000000000..7b1bf0db8d --- /dev/null +++ b/sources/Interop/Windows/um/manipulations/InertiaProcessor.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("ABB27087-4CE0-4E58-A0CB-E24DF96814BE")] + public partial struct InertiaProcessor + { + } +} diff --git a/sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs b/sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs new file mode 100644 index 0000000000..31b7e21f5b --- /dev/null +++ b/sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs @@ -0,0 +1,20 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum MANIPULATION_PROCESSOR_MANIPULATIONS + { + MANIPULATION_NONE = 0, + MANIPULATION_TRANSLATE_X = 0x1, + MANIPULATION_TRANSLATE_Y = 0x2, + MANIPULATION_SCALE = 0x4, + MANIPULATION_ROTATE = 0x8, + MANIPULATION_ALL = 0xf, + } +} diff --git a/sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs b/sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs new file mode 100644 index 0000000000..1af18c81dc --- /dev/null +++ b/sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("597D4FB0-47FD-4AFF-89B9-C6CFAE8CF08E")] + public partial struct ManipulationProcessor + { + } +} diff --git a/sources/Interop/Windows/um/manipulations/Windows.cs b/sources/Interop/Windows/um/manipulations/Windows.cs new file mode 100644 index 0000000000..6df39e06b3 --- /dev/null +++ b/sources/Interop/Windows/um/manipulations/Windows.cs @@ -0,0 +1,39 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + [NativeTypeName("const float")] + public const float POSITIVE_INFINITY = ((float)(1e308 * 10)); + + [NativeTypeName("const float")] + public const float NEGATIVE_INFINITY = ((float)(-1e308 * 10)); + + [NativeTypeName("const float")] + public const float NaN = ((float)((1e308 * 10) * 0.0)); + + [NativeTypeName("const IID")] + public static readonly Guid LIBID_ManipulationsLib = new Guid(0x935610b3, 0x6f81, 0x450f, 0x85, 0xd5, 0x42, 0xd3, 0xd2, 0x6c, 0x5c, 0x11); + + [NativeTypeName("const IID")] + public static readonly Guid IID__IManipulationEvents = new Guid(0x4f62c8da, 0x9c53, 0x4b22, 0x93, 0xdf, 0x92, 0x7a, 0x86, 0x2b, 0xbb, 0x03); + + [NativeTypeName("const IID")] + public static readonly Guid IID_IInertiaProcessor = new Guid(0x18b00c6d, 0xc5ee, 0x41b1, 0x90, 0xa9, 0x9d, 0x4a, 0x92, 0x90, 0x95, 0xad); + + [NativeTypeName("const IID")] + public static readonly Guid IID_IManipulationProcessor = new Guid(0xA22AC519, 0x8300, 0x48a0, 0xBE, 0xF4, 0xF1, 0xBE, 0x87, 0x37, 0xDB, 0xA4); + + [NativeTypeName("const CLSID")] + public static readonly Guid CLSID_InertiaProcessor = new Guid(0xabb27087, 0x4ce0, 0x4e58, 0xa0, 0xcb, 0xe2, 0x4d, 0xf9, 0x68, 0x14, 0xbe); + + [NativeTypeName("const CLSID")] + public static readonly Guid CLSID_ManipulationProcessor = new Guid(0x597D4FB0, 0x47FD, 0x4aff, 0x89, 0xB9, 0xC6, 0xCF, 0xAE, 0x8C, 0xF0, 0x8E); + } +} diff --git a/sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs b/sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs new file mode 100644 index 0000000000..65d00e65bc --- /dev/null +++ b/sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs @@ -0,0 +1,60 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("4F62C8DA-9C53-4B22-93DF-927A862BBB03")] + [NativeTypeName("struct _IManipulationEvents : IUnknown")] + public unsafe partial struct _IManipulationEvents + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged<_IManipulationEvents*, Guid*, void**, int>)(lpVtbl[0]))((_IManipulationEvents*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged<_IManipulationEvents*, uint>)(lpVtbl[1]))((_IManipulationEvents*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged<_IManipulationEvents*, uint>)(lpVtbl[2]))((_IManipulationEvents*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ManipulationStarted([NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) + { + return ((delegate* unmanaged<_IManipulationEvents*, float, float, int>)(lpVtbl[3]))((_IManipulationEvents*)Unsafe.AsPointer(ref this), x, y); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ManipulationDelta([NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("FLOAT")] float translationDeltaX, [NativeTypeName("FLOAT")] float translationDeltaY, [NativeTypeName("FLOAT")] float scaleDelta, [NativeTypeName("FLOAT")] float expansionDelta, [NativeTypeName("FLOAT")] float rotationDelta, [NativeTypeName("FLOAT")] float cumulativeTranslationX, [NativeTypeName("FLOAT")] float cumulativeTranslationY, [NativeTypeName("FLOAT")] float cumulativeScale, [NativeTypeName("FLOAT")] float cumulativeExpansion, [NativeTypeName("FLOAT")] float cumulativeRotation) + { + return ((delegate* unmanaged<_IManipulationEvents*, float, float, float, float, float, float, float, float, float, float, float, float, int>)(lpVtbl[4]))((_IManipulationEvents*)Unsafe.AsPointer(ref this), x, y, translationDeltaX, translationDeltaY, scaleDelta, expansionDelta, rotationDelta, cumulativeTranslationX, cumulativeTranslationY, cumulativeScale, cumulativeExpansion, cumulativeRotation); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int ManipulationCompleted([NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("FLOAT")] float cumulativeTranslationX, [NativeTypeName("FLOAT")] float cumulativeTranslationY, [NativeTypeName("FLOAT")] float cumulativeScale, [NativeTypeName("FLOAT")] float cumulativeExpansion, [NativeTypeName("FLOAT")] float cumulativeRotation) + { + return ((delegate* unmanaged<_IManipulationEvents*, float, float, float, float, float, float, float, int>)(lpVtbl[5]))((_IManipulationEvents*)Unsafe.AsPointer(ref this), x, y, cumulativeTranslationX, cumulativeTranslationY, cumulativeScale, cumulativeExpansion, cumulativeRotation); + } + } +} diff --git a/tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs b/tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs new file mode 100644 index 0000000000..9403c6867d --- /dev/null +++ b/tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IInertiaProcessorTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IInertiaProcessor).GUID, Is.EqualTo(IID_IInertiaProcessor)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IInertiaProcessor))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IInertiaProcessor).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IInertiaProcessor), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IInertiaProcessor), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs b/tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs new file mode 100644 index 0000000000..357291dc2a --- /dev/null +++ b/tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IManipulationProcessorTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IManipulationProcessor).GUID, Is.EqualTo(IID_IManipulationProcessor)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IManipulationProcessor))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IManipulationProcessor).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IManipulationProcessor), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IManipulationProcessor), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs b/tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs new file mode 100644 index 0000000000..731d8f0dde --- /dev/null +++ b/tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class InertiaProcessorTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(InertiaProcessor).GUID, Is.EqualTo(CLSID_InertiaProcessor)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(InertiaProcessor))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(InertiaProcessor).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(InertiaProcessor), Is.EqualTo(1)); + } + } +} diff --git a/tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs b/tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs new file mode 100644 index 0000000000..531b945038 --- /dev/null +++ b/tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class ManipulationProcessorTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(ManipulationProcessor).GUID, Is.EqualTo(CLSID_ManipulationProcessor)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ManipulationProcessor))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(ManipulationProcessor).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(ManipulationProcessor), Is.EqualTo(1)); + } + } +} diff --git a/tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs b/tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs new file mode 100644 index 0000000000..df463dd0f3 --- /dev/null +++ b/tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class _IManipulationEventsTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(_IManipulationEvents).GUID, Is.EqualTo(IID__IManipulationEvents)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf<_IManipulationEvents>(), Is.EqualTo(sizeof(_IManipulationEvents))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(_IManipulationEvents).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(_IManipulationEvents), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(_IManipulationEvents), Is.EqualTo(4)); + } + } + } +} From 238c46963eb828f26ff3ea37cc1cbbeab4aecbb9 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 23:34:13 -0500 Subject: [PATCH 24/36] Add tbs.h --- TerraFX.Interop.Windows.sln | 8 + generation/remap.rsp | 4 + generation/shared/tbs/generate.rsp | 12 ++ generation/shared/tbs/header.txt | 4 + generation/shared/tbs/shared-tbs.h | 2 + .../Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs | 13 ++ .../Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs | 138 ++++++++++++++ .../Windows/shared/tbs/TPM_DEVICE_INFO.cs | 22 +++ .../shared/tbs/TPM_WNF_PROVISIONING.cs | 16 ++ sources/Interop/Windows/shared/tbs/Windows.cs | 178 ++++++++++++++++++ .../shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs | 35 ++++ .../shared/tbs/TBS_CONTEXT_PARAMSTests.cs | 35 ++++ .../shared/tbs/TPM_DEVICE_INFOTests.cs | 35 ++++ .../shared/tbs/TPM_WNF_PROVISIONINGTests.cs | 35 ++++ 14 files changed, 537 insertions(+) create mode 100644 generation/shared/tbs/generate.rsp create mode 100644 generation/shared/tbs/header.txt create mode 100644 generation/shared/tbs/shared-tbs.h create mode 100644 sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs create mode 100644 sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs create mode 100644 sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs create mode 100644 sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs create mode 100644 sources/Interop/Windows/shared/tbs/Windows.cs create mode 100644 tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs create mode 100644 tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs create mode 100644 tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs create mode 100644 tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 193ba3dc65..ab81e2b132 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1995,6 +1995,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "manipulations", "manipulati generation\um\manipulations\um-manipulations.h = generation\um\manipulations\um-manipulations.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tbs", "tbs", "{2B0D3696-0540-4B74-8CD3-DADECBE1EDB3}" + ProjectSection(SolutionItems) = preProject + generation\shared\tbs\generate.rsp = generation\shared\tbs\generate.rsp + generation\shared\tbs\header.txt = generation\shared\tbs\header.txt + generation\shared\tbs\shared-tbs.h = generation\shared\tbs\shared-tbs.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2308,6 +2315,7 @@ Global {2207882C-191C-40CB-86DE-6CC96860EDD5} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {55B74712-EDD0-49F8-B6E2-0B3FD355CEEF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {68E9A8F5-C4A3-47FD-B449-748EC32A6FEB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {2B0D3696-0540-4B74-8CD3-DADECBE1EDB3} = {F9716DD9-2967-4295-AC71-F1FD5A9EEFEF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 994a0617b8..d0920218f8 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -1198,6 +1198,9 @@ tagXFORMCOORDS=XFORMCOORDS tagXMLEMEM_TYPE=XMLELEM_TYPE tag_s_RIFFWAVE_inst=s_RIFFWAVE_inst tag_TRUECOLORINFO=TRUECOLORINFO +tdTBS_CONTEXT_PARAMS=TBS_CONTEXT_PARAMS +tdTBS_CONTEXT_PARAMS2=TBS_CONTEXT_PARAMS2 +tdTPM_WNF_PROVISIONING=TPM_WNF_PROVISIONING tMIXERCONTROLDETAILS=MIXERCONTROLDETAILS tMIXERCONTROLDETAILS_BOOLEAN=MIXERCONTROLDETAILS_BOOLEAN tMIXERCONTROLDETAILS_SIGNED=MIXERCONTROLDETAILS_SIGNED @@ -3014,6 +3017,7 @@ _TOKEN_STATISTICS=TOKEN_STATISTICS _TOKEN_TYPE=TOKEN_TYPE _TOKEN_USER=TOKEN_USER _TOKEN_USER_CLAIMS=TOKEN_USER_CLAIMS +_TPM_DEVICE_INFO=TPM_DEVICE_INFO _TP_CALLBACK_ENVIRON_V3=TP_CALLBACK_ENVIRON_V3 _TP_CALLBACK_PRIORITY=TP_CALLBACK_PRIORITY _TP_POOL_STACK_INFORMATION=TP_POOL_STACK_INFORMATION diff --git a/generation/shared/tbs/generate.rsp b/generation/shared/tbs/generate.rsp new file mode 100644 index 0000000000..7af107680f --- /dev/null +++ b/generation/shared/tbs/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +shared-tbs.h +--output +../../../sources/Interop/Windows/shared/tbs +--test-output +../../../tests/Interop/Windows/shared/tbs +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared/tbs.h +--with-librarypath +*=tbs diff --git a/generation/shared/tbs/header.txt b/generation/shared/tbs/header.txt new file mode 100644 index 0000000000..d410046c15 --- /dev/null +++ b/generation/shared/tbs/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/shared/tbs/shared-tbs.h b/generation/shared/tbs/shared-tbs.h new file mode 100644 index 0000000000..1091632247 --- /dev/null +++ b/generation/shared/tbs/shared-tbs.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs new file mode 100644 index 0000000000..0f7677f012 --- /dev/null +++ b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct TBS_CONTEXT_PARAMS + { + [NativeTypeName("UINT32")] + public uint version; + } +} diff --git a/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs new file mode 100644 index 0000000000..5c465896ef --- /dev/null +++ b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs @@ -0,0 +1,138 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public partial struct TBS_CONTEXT_PARAMS2 + { + [NativeTypeName("UINT32")] + public uint version; + + [NativeTypeName("tdTBS_CONTEXT_PARAMS2::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared/tbs.h:154:5)")] + public _Anonymous_e__Union Anonymous; + + public uint requestRaw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.requestRaw; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.requestRaw = value; + } + } + + public uint includeTpm12 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.includeTpm12; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.includeTpm12 = value; + } + } + + public uint includeTpm20 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return Anonymous.Anonymous.includeTpm20; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + Anonymous.Anonymous.includeTpm20 = value; + } + } + + public ref uint asUINT32 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.asUINT32, 1)); + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("tdTBS_CONTEXT_PARAMS2::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared/tbs.h:156:9)")] + public _Anonymous_e__Struct Anonymous; + + [FieldOffset(0)] + [NativeTypeName("UINT32")] + public uint asUINT32; + + public partial struct _Anonymous_e__Struct + { + public uint _bitfield; + + [NativeTypeName("UINT32 : 1")] + public uint requestRaw + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return _bitfield & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~0x1u) | (value & 0x1u); + } + } + + [NativeTypeName("UINT32 : 1")] + public uint includeTpm12 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 1) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 1)) | ((value & 0x1u) << 1); + } + } + + [NativeTypeName("UINT32 : 1")] + public uint includeTpm20 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return (_bitfield >> 2) & 0x1u; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + set + { + _bitfield = (_bitfield & ~(0x1u << 2)) | ((value & 0x1u) << 2); + } + } + } + } + } +} diff --git a/sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs b/sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs new file mode 100644 index 0000000000..0c6acfdb1d --- /dev/null +++ b/sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct TPM_DEVICE_INFO + { + [NativeTypeName("UINT32")] + public uint structVersion; + + [NativeTypeName("UINT32")] + public uint tpmVersion; + + [NativeTypeName("UINT32")] + public uint tpmInterfaceType; + + [NativeTypeName("UINT32")] + public uint tpmImpRevision; + } +} diff --git a/sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs b/sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs new file mode 100644 index 0000000000..84c83a57e8 --- /dev/null +++ b/sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct TPM_WNF_PROVISIONING + { + [NativeTypeName("UINT32")] + public uint status; + + [NativeTypeName("BYTE [28]")] + public fixed byte message[28]; + } +} diff --git a/sources/Interop/Windows/shared/tbs/Windows.cs b/sources/Interop/Windows/shared/tbs/Windows.cs new file mode 100644 index 0000000000..fceb07496d --- /dev/null +++ b/sources/Interop/Windows/shared/tbs/Windows.cs @@ -0,0 +1,178 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_Context_Create([NativeTypeName("PCTBS_CONTEXT_PARAMS")] TBS_CONTEXT_PARAMS* pContextParams, [NativeTypeName("PTBS_HCONTEXT")] void** phContext); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsip_Context_Close([NativeTypeName("TBS_HCONTEXT")] void* hContext); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsip_Submit_Command([NativeTypeName("TBS_HCONTEXT")] void* hContext, [NativeTypeName("TBS_COMMAND_LOCALITY")] uint Locality, [NativeTypeName("TBS_COMMAND_PRIORITY")] uint Priority, [NativeTypeName("PCBYTE")] byte* pabCommand, [NativeTypeName("UINT32")] uint cbCommand, [NativeTypeName("PBYTE")] byte* pabResult, [NativeTypeName("PUINT32")] uint* pcbResult); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsip_Cancel_Commands([NativeTypeName("TBS_HCONTEXT")] void* hContext); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_Physical_Presence_Command([NativeTypeName("TBS_HCONTEXT")] void* hContext, [NativeTypeName("PCBYTE")] byte* pabInput, [NativeTypeName("UINT32")] uint cbInput, [NativeTypeName("PBYTE")] byte* pabOutput, [NativeTypeName("PUINT32")] uint* pcbOutput); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_Get_TCG_Log([NativeTypeName("TBS_HCONTEXT")] void* hContext, [NativeTypeName("PBYTE")] byte* pOutputBuf, [NativeTypeName("PUINT32")] uint* pOutputBufLen); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_GetDeviceInfo([NativeTypeName("UINT32")] uint Size, [NativeTypeName("PVOID")] void* Info); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_Get_OwnerAuth([NativeTypeName("TBS_HCONTEXT")] void* hContext, [NativeTypeName("TBS_OWNERAUTH_TYPE")] uint ownerauthType, [NativeTypeName("PBYTE")] byte* pOutputBuf, [NativeTypeName("PUINT32")] uint* pOutputBufLen); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_Revoke_Attestation(); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetDeviceID([NativeTypeName("PBYTE")] byte* pbWindowsAIK, [NativeTypeName("UINT32")] uint cbWindowsAIK, [NativeTypeName("PUINT32")] uint* pcbResult, [NativeTypeName("BOOL *")] int* pfProtectedByTPM); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("HRESULT")] + public static extern int GetDeviceIDString([NativeTypeName("PWSTR")] ushort* pszWindowsAIK, [NativeTypeName("UINT32")] uint cchWindowsAIK, [NativeTypeName("PUINT32")] uint* pcchResult, [NativeTypeName("BOOL *")] int* pfProtectedByTPM); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_Create_Windows_Key([NativeTypeName("TBS_HANDLE")] uint keyHandle); + + [DllImport("tbs", ExactSpelling = true)] + [return: NativeTypeName("TBS_RESULT")] + public static extern uint Tbsi_Get_TCG_Log_Ex([NativeTypeName("UINT32")] uint logType, [NativeTypeName("PBYTE")] byte* pbOutput, [NativeTypeName("PUINT32")] uint* pcbOutput); + + [NativeTypeName("#define TBS_CONTEXT_VERSION_ONE 1")] + public const int TBS_CONTEXT_VERSION_ONE = 1; + + [NativeTypeName("#define TBS_COMMAND_PRIORITY_LOW 100")] + public const int TBS_COMMAND_PRIORITY_LOW = 100; + + [NativeTypeName("#define TBS_COMMAND_PRIORITY_NORMAL 200")] + public const int TBS_COMMAND_PRIORITY_NORMAL = 200; + + [NativeTypeName("#define TBS_COMMAND_PRIORITY_HIGH 300")] + public const int TBS_COMMAND_PRIORITY_HIGH = 300; + + [NativeTypeName("#define TBS_COMMAND_PRIORITY_SYSTEM 400")] + public const int TBS_COMMAND_PRIORITY_SYSTEM = 400; + + [NativeTypeName("#define TBS_COMMAND_PRIORITY_MAX 0x80000000")] + public const uint TBS_COMMAND_PRIORITY_MAX = 0x80000000; + + [NativeTypeName("#define TBS_COMMAND_LOCALITY_ZERO 0")] + public const int TBS_COMMAND_LOCALITY_ZERO = 0; + + [NativeTypeName("#define TBS_COMMAND_LOCALITY_ONE 1")] + public const int TBS_COMMAND_LOCALITY_ONE = 1; + + [NativeTypeName("#define TBS_COMMAND_LOCALITY_TWO 2")] + public const int TBS_COMMAND_LOCALITY_TWO = 2; + + [NativeTypeName("#define TBS_COMMAND_LOCALITY_THREE 3")] + public const int TBS_COMMAND_LOCALITY_THREE = 3; + + [NativeTypeName("#define TBS_COMMAND_LOCALITY_FOUR 4")] + public const int TBS_COMMAND_LOCALITY_FOUR = 4; + + [NativeTypeName("#define TBS_SUCCESS 0")] + public const int TBS_SUCCESS = 0; + + [NativeTypeName("#define TBS_IN_OUT_BUF_SIZE_MAX (256*1024)")] + public const int TBS_IN_OUT_BUF_SIZE_MAX = (256 * 1024); + + [NativeTypeName("#define TBS_OWNERAUTH_TYPE_FULL 1")] + public const int TBS_OWNERAUTH_TYPE_FULL = 1; + + [NativeTypeName("#define TBS_OWNERAUTH_TYPE_ADMIN 2")] + public const int TBS_OWNERAUTH_TYPE_ADMIN = 2; + + [NativeTypeName("#define TBS_OWNERAUTH_TYPE_USER 3")] + public const int TBS_OWNERAUTH_TYPE_USER = 3; + + [NativeTypeName("#define TBS_OWNERAUTH_TYPE_ENDORSEMENT 4")] + public const int TBS_OWNERAUTH_TYPE_ENDORSEMENT = 4; + + [NativeTypeName("#define TBS_OWNERAUTH_TYPE_ENDORSEMENT_20 12")] + public const int TBS_OWNERAUTH_TYPE_ENDORSEMENT_20 = 12; + + [NativeTypeName("#define TBS_OWNERAUTH_TYPE_STORAGE_20 13")] + public const int TBS_OWNERAUTH_TYPE_STORAGE_20 = 13; + + [NativeTypeName("#define TBS_CONTEXT_VERSION_TWO 2")] + public const int TBS_CONTEXT_VERSION_TWO = 2; + + [NativeTypeName("#define TPM_WNF_INFO_CLEAR_SUCCESSFUL 0x00000001")] + public const int TPM_WNF_INFO_CLEAR_SUCCESSFUL = 0x00000001; + + [NativeTypeName("#define TPM_WNF_INFO_OWNERSHIP_SUCCESSFUL 0x00000002")] + public const int TPM_WNF_INFO_OWNERSHIP_SUCCESSFUL = 0x00000002; + + [NativeTypeName("#define TPM_WNF_INFO_NO_REBOOT_REQUIRED 1")] + public const int TPM_WNF_INFO_NO_REBOOT_REQUIRED = 1; + + [NativeTypeName("#define TPM_VERSION_UNKNOWN 0")] + public const int TPM_VERSION_UNKNOWN = 0; + + [NativeTypeName("#define TPM_VERSION_12 1")] + public const int TPM_VERSION_12 = 1; + + [NativeTypeName("#define TPM_VERSION_20 2")] + public const int TPM_VERSION_20 = 2; + + [NativeTypeName("#define TPM_IFTYPE_UNKNOWN 0")] + public const int TPM_IFTYPE_UNKNOWN = 0; + + [NativeTypeName("#define TPM_IFTYPE_1 1")] + public const int TPM_IFTYPE_1 = 1; + + [NativeTypeName("#define TPM_IFTYPE_TRUSTZONE 2")] + public const int TPM_IFTYPE_TRUSTZONE = 2; + + [NativeTypeName("#define TPM_IFTYPE_HW 3")] + public const int TPM_IFTYPE_HW = 3; + + [NativeTypeName("#define TPM_IFTYPE_EMULATOR 4")] + public const int TPM_IFTYPE_EMULATOR = 4; + + [NativeTypeName("#define TPM_IFTYPE_SPB 5")] + public const int TPM_IFTYPE_SPB = 5; + + [NativeTypeName("#define TBS_TCGLOG_SRTM_CURRENT 0")] + public const int TBS_TCGLOG_SRTM_CURRENT = 0; + + [NativeTypeName("#define TBS_TCGLOG_DRTM_CURRENT 1")] + public const int TBS_TCGLOG_DRTM_CURRENT = 1; + + [NativeTypeName("#define TBS_TCGLOG_SRTM_BOOT 2")] + public const int TBS_TCGLOG_SRTM_BOOT = 2; + + [NativeTypeName("#define TBS_TCGLOG_SRTM_RESUME 3")] + public const int TBS_TCGLOG_SRTM_RESUME = 3; + + [NativeTypeName("#define TBS_TCGLOG_DRTM_BOOT 4")] + public const int TBS_TCGLOG_DRTM_BOOT = 4; + + [NativeTypeName("#define TBS_TCGLOG_DRTM_RESUME 5")] + public const int TBS_TCGLOG_DRTM_RESUME = 5; + } +} diff --git a/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs new file mode 100644 index 0000000000..678a751619 --- /dev/null +++ b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class TBS_CONTEXT_PARAMS2Tests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(TBS_CONTEXT_PARAMS2))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(TBS_CONTEXT_PARAMS2).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(TBS_CONTEXT_PARAMS2), Is.EqualTo(8)); + } + } +} diff --git a/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs new file mode 100644 index 0000000000..de1e65b619 --- /dev/null +++ b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class TBS_CONTEXT_PARAMSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(TBS_CONTEXT_PARAMS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(TBS_CONTEXT_PARAMS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(TBS_CONTEXT_PARAMS), Is.EqualTo(4)); + } + } +} diff --git a/tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs b/tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs new file mode 100644 index 0000000000..350510c6ca --- /dev/null +++ b/tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class TPM_DEVICE_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(TPM_DEVICE_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(TPM_DEVICE_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(TPM_DEVICE_INFO), Is.EqualTo(16)); + } + } +} diff --git a/tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs b/tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs new file mode 100644 index 0000000000..75a06e3489 --- /dev/null +++ b/tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class TPM_WNF_PROVISIONINGTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(TPM_WNF_PROVISIONING))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(TPM_WNF_PROVISIONING).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(TPM_WNF_PROVISIONING), Is.EqualTo(32)); + } + } +} From fc616ac09fa39590a8f50be6c02b00fd25f3ef2b Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 23:42:19 -0500 Subject: [PATCH 25/36] Add davclnt.h --- TerraFX.Interop.Windows.sln | 8 ++ generation/remap.rsp | 3 + generation/um/davclnt/generate.rsp | 22 ++++++ generation/um/davclnt/header.txt | 4 + generation/um/davclnt/um-davclnt.h | 2 + .../Windows/um/davclnt/AUTHNEXTSTEP.cs | 14 ++++ .../um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs | 19 +++++ .../um/davclnt/DAV_CALLBACK_AUTH_UNP.cs | 22 ++++++ .../Windows/um/davclnt/DAV_CALLBACK_CRED.cs | 20 +++++ sources/Interop/Windows/um/davclnt/Windows.cs | 77 +++++++++++++++++++ .../um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs | 43 +++++++++++ .../um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs | 43 +++++++++++ .../um/davclnt/DAV_CALLBACK_CREDTests.cs | 43 +++++++++++ 13 files changed, 320 insertions(+) create mode 100644 generation/um/davclnt/generate.rsp create mode 100644 generation/um/davclnt/header.txt create mode 100644 generation/um/davclnt/um-davclnt.h create mode 100644 sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs create mode 100644 sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs create mode 100644 sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs create mode 100644 sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs create mode 100644 sources/Interop/Windows/um/davclnt/Windows.cs create mode 100644 tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs create mode 100644 tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs create mode 100644 tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index ab81e2b132..cf3c832ad8 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -2002,6 +2002,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tbs", "tbs", "{2B0D3696-054 generation\shared\tbs\shared-tbs.h = generation\shared\tbs\shared-tbs.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "davclnt", "davclnt", "{D9F58364-B99D-4384-84C4-BC0EE0136523}" + ProjectSection(SolutionItems) = preProject + generation\um\davclnt\generate.rsp = generation\um\davclnt\generate.rsp + generation\um\davclnt\header.txt = generation\um\davclnt\header.txt + generation\um\davclnt\um-davclnt.h = generation\um\davclnt\um-davclnt.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2316,6 +2323,7 @@ Global {55B74712-EDD0-49F8-B6E2-0B3FD355CEEF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {68E9A8F5-C4A3-47FD-B449-748EC32A6FEB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2B0D3696-0540-4B74-8CD3-DADECBE1EDB3} = {F9716DD9-2967-4295-AC71-F1FD5A9EEFEF} + {D9F58364-B99D-4384-84C4-BC0EE0136523} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index d0920218f8..6b4e77d72f 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -1663,6 +1663,9 @@ _CTL_VERIFY_USAGE_PARA=CTL_VERIFY_USAGE_PARA _CTL_VERIFY_USAGE_STATUS=CTL_VERIFY_USAGE_STATUS _CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG=CUSTOM_SYSTEM_EVENT_TRIGGER_CONFIG _CYPHER_BLOCK=CYPHER_BLOCK +_DAV_CALLBACK_AUTH_BLOB=DAV_CALLBACK_AUTH_BLOB +_DAV_CALLBACK_AUTH_UNP=DAV_CALLBACK_AUTH_UNP +_DAV_CALLBACK_CRED=DAV_CALLBACK_CRED _D3D10_SHADER_BUFFER_DESC=D3D10_SHADER_BUFFER_DESC _D3D10_SHADER_DESC=D3D10_SHADER_DESC _D3D10_SHADER_INPUT_BIND_DESC=D3D10_SHADER_INPUT_BIND_DESC diff --git a/generation/um/davclnt/generate.rsp b/generation/um/davclnt/generate.rsp new file mode 100644 index 0000000000..160a06f492 --- /dev/null +++ b/generation/um/davclnt/generate.rsp @@ -0,0 +1,22 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-davclnt.h +--output +../../../sources/Interop/Windows/um/davclnt +--test-output +../../../tests/Interop/Windows/um/davclnt +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/davclnt.h +--with-librarypath +DavAddConnection=netapi32 +DavCancelConnectionsToServer=davclnt +DavDeleteConnection=netapi32 +DavFlushFile=netapi32 +DavGetExtendedError=netapi32 +DavGetHTTPFromUNCPath=netapi32 +DavGetTheLockOwnerOfTheFile=netapi32 +DavGetUNCFromHTTPPath=netapi32 +DavInvalidateCache=davclnt +DavRegisterAuthCallback=davclnt +DavUnregisterAuthCallback=davclnt diff --git a/generation/um/davclnt/header.txt b/generation/um/davclnt/header.txt new file mode 100644 index 0000000000..c53a626883 --- /dev/null +++ b/generation/um/davclnt/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/davclnt/um-davclnt.h b/generation/um/davclnt/um-davclnt.h new file mode 100644 index 0000000000..1cd1373b37 --- /dev/null +++ b/generation/um/davclnt/um-davclnt.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs b/sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs new file mode 100644 index 0000000000..2dcfbc3074 --- /dev/null +++ b/sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum AUTHNEXTSTEP + { + DefaultBehavior, + RetryRequest, + CancelRequest, + } +} diff --git a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs new file mode 100644 index 0000000000..17ee7e3c79 --- /dev/null +++ b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct DAV_CALLBACK_AUTH_BLOB + { + [NativeTypeName("PVOID")] + public void* pBuffer; + + [NativeTypeName("ULONG")] + public uint ulSize; + + [NativeTypeName("ULONG")] + public uint ulType; + } +} diff --git a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs new file mode 100644 index 0000000000..27e2e9871e --- /dev/null +++ b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public unsafe partial struct DAV_CALLBACK_AUTH_UNP + { + [NativeTypeName("LPWSTR")] + public ushort* pszUserName; + + [NativeTypeName("ULONG")] + public uint ulUserNameLength; + + [NativeTypeName("LPWSTR")] + public ushort* pszPassword; + + [NativeTypeName("ULONG")] + public uint ulPasswordLength; + } +} diff --git a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs new file mode 100644 index 0000000000..c87a4c8829 --- /dev/null +++ b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs @@ -0,0 +1,20 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct DAV_CALLBACK_CRED + { + public DAV_CALLBACK_AUTH_BLOB AuthBlob; + + public DAV_CALLBACK_AUTH_UNP UNPBlob; + + [NativeTypeName("BOOL")] + public int bAuthBlobValid; + + [NativeTypeName("BOOL")] + public int bSave; + } +} diff --git a/sources/Interop/Windows/um/davclnt/Windows.cs b/sources/Interop/Windows/um/davclnt/Windows.cs new file mode 100644 index 0000000000..7aed38683f --- /dev/null +++ b/sources/Interop/Windows/um/davclnt/Windows.cs @@ -0,0 +1,77 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("netapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavAddConnection([NativeTypeName("HANDLE *")] IntPtr* ConnectionHandle, [NativeTypeName("LPCWSTR")] ushort* RemoteName, [NativeTypeName("LPCWSTR")] ushort* UserName, [NativeTypeName("LPCWSTR")] ushort* Password, [NativeTypeName("PBYTE")] byte* ClientCert, [NativeTypeName("DWORD")] uint CertSize); + + [DllImport("netapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavDeleteConnection([NativeTypeName("HANDLE")] IntPtr ConnectionHandle); + + [DllImport("netapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavGetUNCFromHTTPPath([NativeTypeName("LPCWSTR")] ushort* Url, [NativeTypeName("LPWSTR")] ushort* UncPath, [NativeTypeName("LPDWORD")] uint* lpSize); + + [DllImport("netapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavGetHTTPFromUNCPath([NativeTypeName("LPCWSTR")] ushort* UncPath, [NativeTypeName("LPWSTR")] ushort* Url, [NativeTypeName("LPDWORD")] uint* lpSize); + + [DllImport("netapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavGetTheLockOwnerOfTheFile([NativeTypeName("LPCWSTR")] ushort* FileName, [NativeTypeName("PWSTR")] ushort* LockOwnerName, [NativeTypeName("PULONG")] uint* LockOwnerNameLengthInBytes); + + [DllImport("netapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavGetExtendedError([NativeTypeName("HANDLE")] IntPtr hFile, [NativeTypeName("DWORD *")] uint* ExtError, [NativeTypeName("LPWSTR")] ushort* ExtErrorString, [NativeTypeName("DWORD *")] uint* cChSize); + + [DllImport("netapi32", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavFlushFile([NativeTypeName("HANDLE")] IntPtr hFile); + + [DllImport("davclnt", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavInvalidateCache([NativeTypeName("LPCWSTR")] ushort* URLName); + + [DllImport("davclnt", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavCancelConnectionsToServer([NativeTypeName("LPWSTR")] ushort* lpName, [NativeTypeName("BOOL")] int fForce); + + [DllImport("davclnt", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint DavRegisterAuthCallback([NativeTypeName("PFNDAVAUTHCALLBACK")] delegate* unmanaged*, uint> CallBack, [NativeTypeName("ULONG")] uint Version); + + [DllImport("davclnt", ExactSpelling = true)] + public static extern void DavUnregisterAuthCallback([NativeTypeName("DWORD")] uint hCallback); + + [NativeTypeName("#define DAV_AUTHN_SCHEME_BASIC 0x00000001")] + public const int DAV_AUTHN_SCHEME_BASIC = 0x00000001; + + [NativeTypeName("#define DAV_AUTHN_SCHEME_NTLM 0x00000002")] + public const int DAV_AUTHN_SCHEME_NTLM = 0x00000002; + + [NativeTypeName("#define DAV_AUTHN_SCHEME_PASSPORT 0x00000004")] + public const int DAV_AUTHN_SCHEME_PASSPORT = 0x00000004; + + [NativeTypeName("#define DAV_AUTHN_SCHEME_DIGEST 0x00000008")] + public const int DAV_AUTHN_SCHEME_DIGEST = 0x00000008; + + [NativeTypeName("#define DAV_AUTHN_SCHEME_NEGOTIATE 0x00000010")] + public const int DAV_AUTHN_SCHEME_NEGOTIATE = 0x00000010; + + [NativeTypeName("#define DAV_AUTHN_SCHEME_CERT 0x00010000")] + public const int DAV_AUTHN_SCHEME_CERT = 0x00010000; + + [NativeTypeName("#define DAV_AUTHN_SCHEME_FBA 0x00100000")] + public const int DAV_AUTHN_SCHEME_FBA = 0x00100000; + } +} diff --git a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs new file mode 100644 index 0000000000..f7be7e8ac5 --- /dev/null +++ b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class DAV_CALLBACK_AUTH_BLOBTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DAV_CALLBACK_AUTH_BLOB))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DAV_CALLBACK_AUTH_BLOB).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(DAV_CALLBACK_AUTH_BLOB), Is.EqualTo(16)); + } + else + { + Assert.That(sizeof(DAV_CALLBACK_AUTH_BLOB), Is.EqualTo(12)); + } + } + } +} diff --git a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs new file mode 100644 index 0000000000..b9d80909e6 --- /dev/null +++ b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class DAV_CALLBACK_AUTH_UNPTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DAV_CALLBACK_AUTH_UNP))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DAV_CALLBACK_AUTH_UNP).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(DAV_CALLBACK_AUTH_UNP), Is.EqualTo(32)); + } + else + { + Assert.That(sizeof(DAV_CALLBACK_AUTH_UNP), Is.EqualTo(16)); + } + } + } +} diff --git a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs new file mode 100644 index 0000000000..4e2f4be4f1 --- /dev/null +++ b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class DAV_CALLBACK_CREDTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(DAV_CALLBACK_CRED))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(DAV_CALLBACK_CRED).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(DAV_CALLBACK_CRED), Is.EqualTo(56)); + } + else + { + Assert.That(sizeof(DAV_CALLBACK_CRED), Is.EqualTo(36)); + } + } + } +} From 00012a846ef29e996266b824f939e6dc5eda25eb Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 23:49:52 -0500 Subject: [PATCH 26/36] Add wcmapi.h --- TerraFX.Interop.Windows.sln | 8 ++++ generation/remap.rsp | 11 +++++ generation/um/wcmapi/generate.rsp | 14 ++++++ generation/um/wcmapi/header.txt | 4 ++ generation/um/wcmapi/um-wcmapi.h | 2 + .../um/wcmapi/WCM_BILLING_CYCLE_INFO.cs | 17 +++++++ .../Windows/um/wcmapi/WCM_CONNECTION_COST.cs | 22 ++++++++++ .../um/wcmapi/WCM_CONNECTION_COST_DATA.cs | 15 +++++++ .../um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs | 15 +++++++ .../Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs | 29 ++++++++++++ .../Windows/um/wcmapi/WCM_MEDIA_TYPE.cs | 17 +++++++ .../Windows/um/wcmapi/WCM_POLICY_VALUE.cs | 16 +++++++ .../Windows/um/wcmapi/WCM_PROFILE_INFO.cs | 20 +++++++++ .../um/wcmapi/WCM_PROFILE_INFO_LIST.cs | 37 ++++++++++++++++ .../Interop/Windows/um/wcmapi/WCM_PROPERTY.cs | 18 ++++++++ .../Windows/um/wcmapi/WCM_TIME_INTERVAL.cs | 31 +++++++++++++ .../Windows/um/wcmapi/WCM_USAGE_DATA.cs | 15 +++++++ sources/Interop/Windows/um/wcmapi/Windows.cs | 44 +++++++++++++++++++ .../um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs | 35 +++++++++++++++ .../wcmapi/WCM_CONNECTION_COST_DATATests.cs | 35 +++++++++++++++ .../um/wcmapi/WCM_DATAPLAN_STATUSTests.cs | 35 +++++++++++++++ .../um/wcmapi/WCM_POLICY_VALUETests.cs | 35 +++++++++++++++ .../um/wcmapi/WCM_PROFILE_INFOTests.cs | 35 +++++++++++++++ .../um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs | 35 +++++++++++++++ .../um/wcmapi/WCM_TIME_INTERVALTests.cs | 35 +++++++++++++++ .../Windows/um/wcmapi/WCM_USAGE_DATATests.cs | 35 +++++++++++++++ 26 files changed, 615 insertions(+) create mode 100644 generation/um/wcmapi/generate.rsp create mode 100644 generation/um/wcmapi/header.txt create mode 100644 generation/um/wcmapi/um-wcmapi.h create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs create mode 100644 sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs create mode 100644 sources/Interop/Windows/um/wcmapi/Windows.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs create mode 100644 tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index cf3c832ad8..d68449a290 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -2009,6 +2009,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "davclnt", "davclnt", "{D9F5 generation\um\davclnt\um-davclnt.h = generation\um\davclnt\um-davclnt.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wcmapi", "wcmapi", "{686A85CD-0BA2-4F6B-A9D9-E5F1FF3451B2}" + ProjectSection(SolutionItems) = preProject + generation\um\wcmapi\generate.rsp = generation\um\wcmapi\generate.rsp + generation\um\wcmapi\header.txt = generation\um\wcmapi\header.txt + generation\um\wcmapi\um-wcmapi.h = generation\um\wcmapi\um-wcmapi.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2324,6 +2331,7 @@ Global {68E9A8F5-C4A3-47FD-B449-748EC32A6FEB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2B0D3696-0540-4B74-8CD3-DADECBE1EDB3} = {F9716DD9-2967-4295-AC71-F1FD5A9EEFEF} {D9F58364-B99D-4384-84C4-BC0EE0136523} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {686A85CD-0BA2-4F6B-A9D9-E5F1FF3451B2} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 6b4e77d72f..43b4df607a 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -3093,6 +3093,17 @@ _VMRVideoDesc=VMRVideoDesc _VMRVIDEOSTREAMINFO=VMRVIDEOSTREAMINFO _VOLUME_DISK_EXTENTS=VOLUME_DISK_EXTENTS _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION=VOLUME_GET_GPT_ATTRIBUTES_INFORMATION +_WCM_CONNECTION_COST=WCM_CONNECTION_COST +_WCM_CONNECTION_COST_DATA=WCM_CONNECTION_COST_DATA +_WCM_CONNECTION_COST_SOURCE=WCM_CONNECTION_COST_SOURCE +_WCM_DATAPLAN_STATUS=WCM_DATAPLAN_STATUS +_WCM_MEDIA_TYPE=WCM_MEDIA_TYPE +_WCM_POLICY_VALUE=WCM_POLICY_VALUE +_WCM_PROFILE_INFO=WCM_PROFILE_INFO +_WCM_PROFILE_INFO_LIST=WCM_PROFILE_INFO_LIST +_WCM_PROPERTY=WCM_PROPERTY +_WCM_TIME_INTERVAL=WCM_TIME_INTERVAL +_WCM_USAGE_DATA=WCM_USAGE_DATA _WGLSWAP=WGLSWAP _WIM_PROVIDER_ADD_OVERLAY_INPUT=WIM_PROVIDER_ADD_OVERLAY_INPUT _WIM_PROVIDER_EXTERNAL_INFO=WIM_PROVIDER_EXTERNAL_INFO diff --git a/generation/um/wcmapi/generate.rsp b/generation/um/wcmapi/generate.rsp new file mode 100644 index 0000000000..e56858b001 --- /dev/null +++ b/generation/um/wcmapi/generate.rsp @@ -0,0 +1,14 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-wcmapi.h +--output +../../../sources/Interop/Windows/um/wcmapi +--test-output +../../../tests/Interop/Windows/um/wcmapi +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/wcmapi.h +--with-attribute +WCM_CONNECTION_COST=Flags +--with-librarypath +*=wcmapi diff --git a/generation/um/wcmapi/header.txt b/generation/um/wcmapi/header.txt new file mode 100644 index 0000000000..5b8f029cf6 --- /dev/null +++ b/generation/um/wcmapi/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/wcmapi/um-wcmapi.h b/generation/um/wcmapi/um-wcmapi.h new file mode 100644 index 0000000000..71fc66e274 --- /dev/null +++ b/generation/um/wcmapi/um-wcmapi.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs b/sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs new file mode 100644 index 0000000000..fe57b88ed7 --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs @@ -0,0 +1,17 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct WCM_BILLING_CYCLE_INFO + { + public FILETIME StartDate; + + public WCM_TIME_INTERVAL Duration; + + [NativeTypeName("BOOL")] + public int Reset; + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs new file mode 100644 index 0000000000..969c03a4bd --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + [Flags] + public enum WCM_CONNECTION_COST + { + WCM_CONNECTION_COST_UNKNOWN = 0x0, + WCM_CONNECTION_COST_UNRESTRICTED = 0x1, + WCM_CONNECTION_COST_FIXED = 0x2, + WCM_CONNECTION_COST_VARIABLE = 0x4, + WCM_CONNECTION_COST_OVERDATALIMIT = 0x10000, + WCM_CONNECTION_COST_CONGESTED = 0x20000, + WCM_CONNECTION_COST_ROAMING = 0x40000, + WCM_CONNECTION_COST_APPROACHINGDATALIMIT = 0x80000, + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs new file mode 100644 index 0000000000..d827b6f3ad --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct WCM_CONNECTION_COST_DATA + { + [NativeTypeName("DWORD")] + public uint ConnectionCost; + + public WCM_CONNECTION_COST_SOURCE CostSource; + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs new file mode 100644 index 0000000000..60f3b0680a --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum WCM_CONNECTION_COST_SOURCE + { + WCM_CONNECTION_COST_SOURCE_DEFAULT = 0, + WCM_CONNECTION_COST_SOURCE_GP = 1, + WCM_CONNECTION_COST_SOURCE_USER = 2, + WCM_CONNECTION_COST_SOURCE_OPERATOR = 3, + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs b/sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs new file mode 100644 index 0000000000..360722d47a --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs @@ -0,0 +1,29 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct WCM_DATAPLAN_STATUS + { + public WCM_USAGE_DATA UsageData; + + [NativeTypeName("DWORD")] + public uint DataLimitInMegabytes; + + [NativeTypeName("DWORD")] + public uint InboundBandwidthInKbps; + + [NativeTypeName("DWORD")] + public uint OutboundBandwidthInKbps; + + public WCM_BILLING_CYCLE_INFO BillingCycle; + + [NativeTypeName("DWORD")] + public uint MaxTransferSizeInMegabytes; + + [NativeTypeName("DWORD")] + public uint Reserved; + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs b/sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs new file mode 100644 index 0000000000..2dd324e8c0 --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs @@ -0,0 +1,17 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum WCM_MEDIA_TYPE + { + wcm_media_unknown, + wcm_media_ethernet, + wcm_media_wlan, + wcm_media_mbn, + wcm_media_invalid, + wcm_media_max, + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs b/sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs new file mode 100644 index 0000000000..3efe1da03c --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct WCM_POLICY_VALUE + { + [NativeTypeName("BOOL")] + public int fValue; + + [NativeTypeName("BOOL")] + public int fIsGroupPolicy; + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs new file mode 100644 index 0000000000..394cd8c9bf --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs @@ -0,0 +1,20 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public unsafe partial struct WCM_PROFILE_INFO + { + [NativeTypeName("WCHAR [256]")] + public fixed ushort strProfileName[256]; + + [NativeTypeName("GUID")] + public Guid AdapterGUID; + + public WCM_MEDIA_TYPE Media; + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs new file mode 100644 index 0000000000..ee5d778006 --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs @@ -0,0 +1,37 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public partial struct WCM_PROFILE_INFO_LIST + { + [NativeTypeName("DWORD")] + public uint dwNumberOfItems; + + [NativeTypeName("WCM_PROFILE_INFO [1]")] + public _ProfileInfo_e__FixedBuffer ProfileInfo; + + public partial struct _ProfileInfo_e__FixedBuffer + { + public WCM_PROFILE_INFO e0; + + public ref WCM_PROFILE_INFO this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref AsSpan(int.MaxValue)[index]; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); + } + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs b/sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs new file mode 100644 index 0000000000..a604a10ec8 --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum WCM_PROPERTY + { + wcm_global_property_domain_policy, + wcm_global_property_minimize_policy, + wcm_global_property_roaming_policy, + wcm_global_property_powermanagement_policy, + wcm_intf_property_connection_cost, + wcm_intf_property_dataplan_status, + wcm_intf_property_hotspot_profile, + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs b/sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs new file mode 100644 index 0000000000..6de9606ea5 --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs @@ -0,0 +1,31 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct WCM_TIME_INTERVAL + { + [NativeTypeName("WORD")] + public ushort wYear; + + [NativeTypeName("WORD")] + public ushort wMonth; + + [NativeTypeName("WORD")] + public ushort wDay; + + [NativeTypeName("WORD")] + public ushort wHour; + + [NativeTypeName("WORD")] + public ushort wMinute; + + [NativeTypeName("WORD")] + public ushort wSecond; + + [NativeTypeName("WORD")] + public ushort wMilliseconds; + } +} diff --git a/sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs b/sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs new file mode 100644 index 0000000000..152a2b2afb --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct WCM_USAGE_DATA + { + [NativeTypeName("DWORD")] + public uint UsageInMegabytes; + + public FILETIME LastSyncTime; + } +} diff --git a/sources/Interop/Windows/um/wcmapi/Windows.cs b/sources/Interop/Windows/um/wcmapi/Windows.cs new file mode 100644 index 0000000000..35de48db9c --- /dev/null +++ b/sources/Interop/Windows/um/wcmapi/Windows.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("wcmapi", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint WcmQueryProperty([NativeTypeName("const GUID *")] Guid* pInterface, [NativeTypeName("LPCWSTR")] ushort* strProfileName, WCM_PROPERTY Property, [NativeTypeName("PVOID")] void* pReserved, [NativeTypeName("PDWORD")] uint* pdwDataSize, [NativeTypeName("PBYTE *")] byte** ppData); + + [DllImport("wcmapi", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint WcmSetProperty([NativeTypeName("const GUID *")] Guid* pInterface, [NativeTypeName("LPCWSTR")] ushort* strProfileName, WCM_PROPERTY Property, [NativeTypeName("PVOID")] void* pReserved, [NativeTypeName("DWORD")] uint dwDataSize, [NativeTypeName("const BYTE *")] byte* pbData); + + [DllImport("wcmapi", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint WcmGetProfileList([NativeTypeName("PVOID")] void* pReserved, [NativeTypeName("WCM_PROFILE_INFO_LIST **")] WCM_PROFILE_INFO_LIST** ppProfileList); + + [DllImport("wcmapi", ExactSpelling = true)] + [return: NativeTypeName("DWORD")] + public static extern uint WcmSetProfileList([NativeTypeName("WCM_PROFILE_INFO_LIST *")] WCM_PROFILE_INFO_LIST* pProfileList, [NativeTypeName("DWORD")] uint dwPosition, [NativeTypeName("BOOL")] int fIgnoreUnknownProfiles, [NativeTypeName("PVOID")] void* pReserved); + + [DllImport("wcmapi", ExactSpelling = true)] + public static extern void WcmFreeMemory([NativeTypeName("PVOID")] void* pMemory); + + [NativeTypeName("#define WCM_API_VERSION_1_0 0x00000001")] + public const int WCM_API_VERSION_1_0 = 0x00000001; + + [NativeTypeName("#define WCM_API_VERSION WCM_API_VERSION_1_0")] + public const int WCM_API_VERSION = 0x00000001; + + [NativeTypeName("#define WCM_UNKNOWN_DATAPLAN_STATUS 0xFFFFFFFF")] + public const uint WCM_UNKNOWN_DATAPLAN_STATUS = 0xFFFFFFFF; + + [NativeTypeName("#define WCM_MAX_PROFILE_NAME 256")] + public const int WCM_MAX_PROFILE_NAME = 256; + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs new file mode 100644 index 0000000000..dacc809c44 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_BILLING_CYCLE_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_BILLING_CYCLE_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_BILLING_CYCLE_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_BILLING_CYCLE_INFO), Is.EqualTo(28)); + } + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs b/tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs new file mode 100644 index 0000000000..a1eb19b0f2 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_CONNECTION_COST_DATATests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_CONNECTION_COST_DATA))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_CONNECTION_COST_DATA).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_CONNECTION_COST_DATA), Is.EqualTo(8)); + } + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs new file mode 100644 index 0000000000..e25af23904 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_DATAPLAN_STATUSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_DATAPLAN_STATUS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_DATAPLAN_STATUS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_DATAPLAN_STATUS), Is.EqualTo(60)); + } + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs b/tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs new file mode 100644 index 0000000000..72b8cfccd9 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_POLICY_VALUETests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_POLICY_VALUE))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_POLICY_VALUE).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_POLICY_VALUE), Is.EqualTo(8)); + } + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs new file mode 100644 index 0000000000..346359faa1 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_PROFILE_INFOTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_PROFILE_INFO))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_PROFILE_INFO).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_PROFILE_INFO), Is.EqualTo(532)); + } + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs new file mode 100644 index 0000000000..b113cee456 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_PROFILE_INFO_LISTTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_PROFILE_INFO_LIST))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_PROFILE_INFO_LIST).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_PROFILE_INFO_LIST), Is.EqualTo(536)); + } + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs new file mode 100644 index 0000000000..3c5ab60d43 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_TIME_INTERVALTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_TIME_INTERVAL))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_TIME_INTERVAL).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_TIME_INTERVAL), Is.EqualTo(14)); + } + } +} diff --git a/tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs b/tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs new file mode 100644 index 0000000000..7f3df60806 --- /dev/null +++ b/tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class WCM_USAGE_DATATests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(WCM_USAGE_DATA))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(WCM_USAGE_DATA).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(WCM_USAGE_DATA), Is.EqualTo(12)); + } + } +} From 1e61611fe3b04bd7b5c89cebf5a7e2b138852f34 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sat, 13 Feb 2021 23:55:49 -0500 Subject: [PATCH 27/36] Add IContact.h --- TerraFX.Interop.Windows.sln | 8 ++ generation/remap.rsp | 2 + generation/um/IContact/generate.rsp | 10 ++ generation/um/IContact/header.txt | 4 + generation/um/IContact/um-IContact.h | 2 + .../Interop/Windows/um/IContact/Contact.cs | 14 ++ .../Windows/um/IContact/ContactManager.cs | 14 ++ .../Interop/Windows/um/IContact/IContact.cs | 60 ++++++++ .../Windows/um/IContact/IContactCollection.cs | 60 ++++++++ .../Windows/um/IContact/IContactManager.cs | 81 +++++++++++ .../Windows/um/IContact/IContactProperties.cs | 130 ++++++++++++++++++ .../um/IContact/IContactPropertyCollection.cs | 88 ++++++++++++ .../Interop/Windows/um/IContact/Windows.cs | 44 ++++++ .../um/IContact/ContactManagerTests.cs | 44 ++++++ .../Windows/um/IContact/ContactTests.cs | 44 ++++++ .../um/IContact/IContactCollectionTests.cs | 51 +++++++ .../um/IContact/IContactManagerTests.cs | 51 +++++++ .../um/IContact/IContactPropertiesTests.cs | 51 +++++++ .../IContactPropertyCollectionTests.cs | 51 +++++++ .../Windows/um/IContact/IContactTests.cs | 51 +++++++ 20 files changed, 860 insertions(+) create mode 100644 generation/um/IContact/generate.rsp create mode 100644 generation/um/IContact/header.txt create mode 100644 generation/um/IContact/um-IContact.h create mode 100644 sources/Interop/Windows/um/IContact/Contact.cs create mode 100644 sources/Interop/Windows/um/IContact/ContactManager.cs create mode 100644 sources/Interop/Windows/um/IContact/IContact.cs create mode 100644 sources/Interop/Windows/um/IContact/IContactCollection.cs create mode 100644 sources/Interop/Windows/um/IContact/IContactManager.cs create mode 100644 sources/Interop/Windows/um/IContact/IContactProperties.cs create mode 100644 sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs create mode 100644 sources/Interop/Windows/um/IContact/Windows.cs create mode 100644 tests/Interop/Windows/um/IContact/ContactManagerTests.cs create mode 100644 tests/Interop/Windows/um/IContact/ContactTests.cs create mode 100644 tests/Interop/Windows/um/IContact/IContactCollectionTests.cs create mode 100644 tests/Interop/Windows/um/IContact/IContactManagerTests.cs create mode 100644 tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs create mode 100644 tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs create mode 100644 tests/Interop/Windows/um/IContact/IContactTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index d68449a290..373671183e 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -2016,6 +2016,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wcmapi", "wcmapi", "{686A85 generation\um\wcmapi\um-wcmapi.h = generation\um\wcmapi\um-wcmapi.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IContact", "IContact", "{1F5573A8-15AF-43CC-8879-F20398695556}" + ProjectSection(SolutionItems) = preProject + generation\um\IContact\generate.rsp = generation\um\IContact\generate.rsp + generation\um\IContact\header.txt = generation\um\IContact\header.txt + generation\um\IContact\um-IContact.h = generation\um\IContact\um-IContact.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2332,6 +2339,7 @@ Global {2B0D3696-0540-4B74-8CD3-DADECBE1EDB3} = {F9716DD9-2967-4295-AC71-F1FD5A9EEFEF} {D9F58364-B99D-4384-84C4-BC0EE0136523} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {686A85CD-0BA2-4F6B-A9D9-E5F1FF3451B2} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {1F5573A8-15AF-43CC-8879-F20398695556} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 43b4df607a..bf367bbb99 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -431,6 +431,8 @@ IID_CODECAPI_GUID_AVEncWMV=STATIC_CODECAPI_GUID_AVEncWMV IID_CODECAPI_GUID_AVEndMPEG4Video=STATIC_CODECAPI_GUID_AVEndMPEG4Video IID_CODECAPI_SetHDCPManagerContext=STATIC_CODECAPI_SetHDCPManagerContext IID_CODECAPI_VideoEncoderDisplayContentType=STATIC_CODECAPI_VideoEncoderDisplayContentType +IID_Contact=CLSID_Contact +IID_ContactManager=CLSID_ContactManager IID_DCompManipulationCompositor=CLSID_DCompManipulationCompositor IID_DedupBackupSupport=CLSID_DedupBackupSupport IID_DirectManipulationManager=CLSID_DirectManipulationManager diff --git a/generation/um/IContact/generate.rsp b/generation/um/IContact/generate.rsp new file mode 100644 index 0000000000..8d7ad81a48 --- /dev/null +++ b/generation/um/IContact/generate.rsp @@ -0,0 +1,10 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-IContact.h +--output +../../../sources/Interop/Windows/um/IContact +--test-output +../../../tests/Interop/Windows/um/IContact +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/IContact.h diff --git a/generation/um/IContact/header.txt b/generation/um/IContact/header.txt new file mode 100644 index 0000000000..a3da22b530 --- /dev/null +++ b/generation/um/IContact/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/IContact/um-IContact.h b/generation/um/IContact/um-IContact.h new file mode 100644 index 0000000000..948984c1f6 --- /dev/null +++ b/generation/um/IContact/um-IContact.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/IContact/Contact.cs b/sources/Interop/Windows/um/IContact/Contact.cs new file mode 100644 index 0000000000..370646a871 --- /dev/null +++ b/sources/Interop/Windows/um/IContact/Contact.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("61B68808-8EEE-4FD1-ACB8-3D804C8DB056")] + public partial struct Contact + { + } +} diff --git a/sources/Interop/Windows/um/IContact/ContactManager.cs b/sources/Interop/Windows/um/IContact/ContactManager.cs new file mode 100644 index 0000000000..1bd110a2ba --- /dev/null +++ b/sources/Interop/Windows/um/IContact/ContactManager.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("7165C8AB-AF88-42BD-86FD-5310B4285A02")] + public partial struct ContactManager + { + } +} diff --git a/sources/Interop/Windows/um/IContact/IContact.cs b/sources/Interop/Windows/um/IContact/IContact.cs new file mode 100644 index 0000000000..2dfeb3c71c --- /dev/null +++ b/sources/Interop/Windows/um/IContact/IContact.cs @@ -0,0 +1,60 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("F941B671-BDA7-4F77-884A-F46462F226A7")] + [NativeTypeName("struct IContact : IUnknown")] + public unsafe partial struct IContact + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IContact*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IContact*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IContact*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetContactID([NativeTypeName("LPWSTR")] ushort* pszContactID, [NativeTypeName("DWORD")] uint cchContactID, [NativeTypeName("DWORD *")] uint* pdwcchContactIDRequired) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IContact*)Unsafe.AsPointer(ref this), pszContactID, cchContactID, pdwcchContactIDRequired); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPath([NativeTypeName("LPWSTR")] ushort* pszPath, [NativeTypeName("DWORD")] uint cchPath, [NativeTypeName("DWORD *")] uint* pdwcchPathRequired) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IContact*)Unsafe.AsPointer(ref this), pszPath, cchPath, pdwcchPathRequired); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int CommitChanges([NativeTypeName("DWORD")] uint dwCommitFlags) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IContact*)Unsafe.AsPointer(ref this), dwCommitFlags); + } + } +} diff --git a/sources/Interop/Windows/um/IContact/IContactCollection.cs b/sources/Interop/Windows/um/IContact/IContactCollection.cs new file mode 100644 index 0000000000..a65d3cd7dc --- /dev/null +++ b/sources/Interop/Windows/um/IContact/IContactCollection.cs @@ -0,0 +1,60 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("B6AFA338-D779-11D9-8BDE-F66BAD1E3F3A")] + [NativeTypeName("struct IContactCollection : IUnknown")] + public unsafe partial struct IContactCollection + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IContactCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IContactCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IContactCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Reset() + { + return ((delegate* unmanaged)(lpVtbl[3]))((IContactCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Next() + { + return ((delegate* unmanaged)(lpVtbl[4]))((IContactCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetCurrent([NativeTypeName("IContact **")] IContact** ppContact) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IContactCollection*)Unsafe.AsPointer(ref this), ppContact); + } + } +} diff --git a/sources/Interop/Windows/um/IContact/IContactManager.cs b/sources/Interop/Windows/um/IContact/IContactManager.cs new file mode 100644 index 0000000000..46820b08a3 --- /dev/null +++ b/sources/Interop/Windows/um/IContact/IContactManager.cs @@ -0,0 +1,81 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("AD553D98-DEB1-474A-8E17-FC0C2075B738")] + [NativeTypeName("struct IContactManager : IUnknown")] + public unsafe partial struct IContactManager + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IContactManager*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IContactManager*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IContactManager*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Initialize([NativeTypeName("LPCWSTR")] ushort* pszAppName, [NativeTypeName("LPCWSTR")] ushort* pszAppVersion) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IContactManager*)Unsafe.AsPointer(ref this), pszAppName, pszAppVersion); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Load([NativeTypeName("LPCWSTR")] ushort* pszContactID, [NativeTypeName("IContact **")] IContact** ppContact) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IContactManager*)Unsafe.AsPointer(ref this), pszContactID, ppContact); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int MergeContactIDs([NativeTypeName("LPCWSTR")] ushort* pszNewContactID, [NativeTypeName("LPCWSTR")] ushort* pszOldContactID) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IContactManager*)Unsafe.AsPointer(ref this), pszNewContactID, pszOldContactID); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetMeContact([NativeTypeName("IContact **")] IContact** ppMeContact) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IContactManager*)Unsafe.AsPointer(ref this), ppMeContact); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetMeContact([NativeTypeName("IContact *")] IContact* pMeContact) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IContactManager*)Unsafe.AsPointer(ref this), pMeContact); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetContactCollection([NativeTypeName("IContactCollection **")] IContactCollection** ppContactCollection) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IContactManager*)Unsafe.AsPointer(ref this), ppContactCollection); + } + } +} diff --git a/sources/Interop/Windows/um/IContact/IContactProperties.cs b/sources/Interop/Windows/um/IContact/IContactProperties.cs new file mode 100644 index 0000000000..a96e8dd73f --- /dev/null +++ b/sources/Interop/Windows/um/IContact/IContactProperties.cs @@ -0,0 +1,130 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("70DD27DD-5CBD-46E8-BEF0-23B6B346288F")] + [NativeTypeName("struct IContactProperties : IUnknown")] + public unsafe partial struct IContactProperties + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IContactProperties*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IContactProperties*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IContactProperties*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetString([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPWSTR")] ushort* pszValue, [NativeTypeName("DWORD")] uint cchValue, [NativeTypeName("DWORD *")] uint* pdwcchPropertyValueRequired) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pszValue, cchValue, pdwcchPropertyValueRequired); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetDate([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("FILETIME *")] FILETIME* pftDateTime) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pftDateTime); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetBinary([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPWSTR")] ushort* pszContentType, [NativeTypeName("DWORD")] uint cchContentType, [NativeTypeName("DWORD *")] uint* pdwcchContentTypeRequired, [NativeTypeName("IStream **")] IStream** ppStream) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pszContentType, cchContentType, pdwcchContentTypeRequired, ppStream); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPWSTR")] ushort* pszLabels, [NativeTypeName("DWORD")] uint cchLabels, [NativeTypeName("DWORD *")] uint* pdwcchLabelsRequired) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IContactProperties*)Unsafe.AsPointer(ref this), pszArrayElementName, dwFlags, pszLabels, cchLabels, pdwcchLabelsRequired); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetString([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszValue) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pszValue); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetDate([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, FILETIME ftDateTime) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, ftDateTime); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetBinary([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszContentType, [NativeTypeName("IStream *")] IStream* pStream) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pszContentType, pStream); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("DWORD")] uint dwLabelCount, [NativeTypeName("LPCWSTR []")] ushort** ppszLabels) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IContactProperties*)Unsafe.AsPointer(ref this), pszArrayElementName, dwFlags, dwLabelCount, ppszLabels); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int CreateArrayNode([NativeTypeName("LPCWSTR")] ushort* pszArrayName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("BOOL")] int fAppend, [NativeTypeName("LPWSTR")] ushort* pszNewArrayElementName, [NativeTypeName("DWORD")] uint cchNewArrayElementName, [NativeTypeName("DWORD *")] uint* pdwcchNewArrayElementNameRequired) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IContactProperties*)Unsafe.AsPointer(ref this), pszArrayName, dwFlags, fAppend, pszNewArrayElementName, cchNewArrayElementName, pdwcchNewArrayElementNameRequired); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int DeleteProperty([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int DeleteArrayNode([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IContactProperties*)Unsafe.AsPointer(ref this), pszArrayElementName, dwFlags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int DeleteLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IContactProperties*)Unsafe.AsPointer(ref this), pszArrayElementName, dwFlags); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPropertyCollection([NativeTypeName("IContactPropertyCollection **")] IContactPropertyCollection** ppPropertyCollection, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszMultiValueName, [NativeTypeName("DWORD")] uint dwLabelCount, [NativeTypeName("LPCWSTR []")] ushort** ppszLabels, [NativeTypeName("BOOL")] int fAnyLabelMatches) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IContactProperties*)Unsafe.AsPointer(ref this), ppPropertyCollection, dwFlags, pszMultiValueName, dwLabelCount, ppszLabels, fAnyLabelMatches); + } + } +} diff --git a/sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs b/sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs new file mode 100644 index 0000000000..8827ffa2f2 --- /dev/null +++ b/sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs @@ -0,0 +1,88 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("FFD3ADF8-FA64-4328-B1B6-2E0DB509CB3C")] + [NativeTypeName("struct IContactPropertyCollection : IUnknown")] + public unsafe partial struct IContactPropertyCollection + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Reset() + { + return ((delegate* unmanaged)(lpVtbl[3]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int Next() + { + return ((delegate* unmanaged)(lpVtbl[4]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPropertyName([NativeTypeName("LPWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint cchPropertyName, [NativeTypeName("DWORD *")] uint* pdwcchPropertyNameRequired) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), pszPropertyName, cchPropertyName, pdwcchPropertyNameRequired); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPropertyType([NativeTypeName("DWORD *")] uint* pdwType) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), pdwType); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPropertyVersion([NativeTypeName("DWORD *")] uint* pdwVersion) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), pdwVersion); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPropertyModificationDate([NativeTypeName("FILETIME *")] FILETIME* pftModificationDate) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), pftModificationDate); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPropertyArrayElementID([NativeTypeName("LPWSTR")] ushort* pszArrayElementID, [NativeTypeName("DWORD")] uint cchArrayElementID, [NativeTypeName("DWORD *")] uint* pdwcchArrayElementIDRequired) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), pszArrayElementID, cchArrayElementID, pdwcchArrayElementIDRequired); + } + } +} diff --git a/sources/Interop/Windows/um/IContact/Windows.cs b/sources/Interop/Windows/um/IContact/Windows.cs new file mode 100644 index 0000000000..a807bf5f77 --- /dev/null +++ b/sources/Interop/Windows/um/IContact/Windows.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + [NativeTypeName("#define CGD_DEFAULT 0x00000000")] + public const int CGD_DEFAULT = 0x00000000; + + [NativeTypeName("#define CGD_UNKNOWN_PROPERTY 0x00000000")] + public const int CGD_UNKNOWN_PROPERTY = 0x00000000; + + [NativeTypeName("#define CGD_STRING_PROPERTY 0x00000001")] + public const int CGD_STRING_PROPERTY = 0x00000001; + + [NativeTypeName("#define CGD_DATE_PROPERTY 0x00000002")] + public const int CGD_DATE_PROPERTY = 0x00000002; + + [NativeTypeName("#define CGD_BINARY_PROPERTY 0x00000004")] + public const int CGD_BINARY_PROPERTY = 0x00000004; + + [NativeTypeName("#define CGD_ARRAY_NODE 0x00000008")] + public const int CGD_ARRAY_NODE = 0x00000008; + + public static readonly Guid IID_IContactManager = new Guid(0xAD553D98, 0xDEB1, 0x474A, 0x8E, 0x17, 0xFC, 0x0C, 0x20, 0x75, 0xB7, 0x38); + + public static readonly Guid IID_IContactCollection = new Guid(0xB6AFA338, 0xD779, 0x11D9, 0x8B, 0xDE, 0xF6, 0x6B, 0xAD, 0x1E, 0x3F, 0x3A); + + public static readonly Guid IID_IContactProperties = new Guid(0x70DD27DD, 0x5CBD, 0x46E8, 0xBE, 0xF0, 0x23, 0xB6, 0xB3, 0x46, 0x28, 0x8F); + + public static readonly Guid IID_IContact = new Guid(0xF941B671, 0xBDA7, 0x4F77, 0x88, 0x4A, 0xF4, 0x64, 0x62, 0xF2, 0x26, 0xA7); + + public static readonly Guid IID_IContactPropertyCollection = new Guid(0xFFD3ADF8, 0xFA64, 0x4328, 0xB1, 0xB6, 0x2E, 0x0D, 0xB5, 0x09, 0xCB, 0x3C); + + public static readonly Guid CLSID_Contact = new Guid(0x61B68808, 0x8EEE, 0x4FD1, 0xAC, 0xB8, 0x3D, 0x80, 0x4C, 0x8D, 0xB0, 0x56); + + public static readonly Guid CLSID_ContactManager = new Guid(0x7165C8AB, 0xAF88, 0x42BD, 0x86, 0xFD, 0x53, 0x10, 0xB4, 0x28, 0x5A, 0x02); + } +} diff --git a/tests/Interop/Windows/um/IContact/ContactManagerTests.cs b/tests/Interop/Windows/um/IContact/ContactManagerTests.cs new file mode 100644 index 0000000000..173836563f --- /dev/null +++ b/tests/Interop/Windows/um/IContact/ContactManagerTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class ContactManagerTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(ContactManager).GUID, Is.EqualTo(CLSID_ContactManager)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(ContactManager))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(ContactManager).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(ContactManager), Is.EqualTo(1)); + } + } +} diff --git a/tests/Interop/Windows/um/IContact/ContactTests.cs b/tests/Interop/Windows/um/IContact/ContactTests.cs new file mode 100644 index 0000000000..f4e10192ff --- /dev/null +++ b/tests/Interop/Windows/um/IContact/ContactTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class ContactTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(Contact).GUID, Is.EqualTo(CLSID_Contact)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(Contact))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(Contact).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(Contact), Is.EqualTo(1)); + } + } +} diff --git a/tests/Interop/Windows/um/IContact/IContactCollectionTests.cs b/tests/Interop/Windows/um/IContact/IContactCollectionTests.cs new file mode 100644 index 0000000000..dcb741ced9 --- /dev/null +++ b/tests/Interop/Windows/um/IContact/IContactCollectionTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IContactCollectionTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IContactCollection).GUID, Is.EqualTo(IID_IContactCollection)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IContactCollection))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IContactCollection).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IContactCollection), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IContactCollection), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/IContact/IContactManagerTests.cs b/tests/Interop/Windows/um/IContact/IContactManagerTests.cs new file mode 100644 index 0000000000..6377879650 --- /dev/null +++ b/tests/Interop/Windows/um/IContact/IContactManagerTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IContactManagerTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IContactManager).GUID, Is.EqualTo(IID_IContactManager)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IContactManager))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IContactManager).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IContactManager), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IContactManager), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs b/tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs new file mode 100644 index 0000000000..960c3e2192 --- /dev/null +++ b/tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IContactPropertiesTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IContactProperties).GUID, Is.EqualTo(IID_IContactProperties)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IContactProperties))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IContactProperties).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IContactProperties), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IContactProperties), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs b/tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs new file mode 100644 index 0000000000..b7defe8ad9 --- /dev/null +++ b/tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IContactPropertyCollectionTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IContactPropertyCollection).GUID, Is.EqualTo(IID_IContactPropertyCollection)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IContactPropertyCollection))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IContactPropertyCollection).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IContactPropertyCollection), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IContactPropertyCollection), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/IContact/IContactTests.cs b/tests/Interop/Windows/um/IContact/IContactTests.cs new file mode 100644 index 0000000000..6cb1ddd523 --- /dev/null +++ b/tests/Interop/Windows/um/IContact/IContactTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IContactTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IContact).GUID, Is.EqualTo(IID_IContact)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IContact))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IContact).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IContact), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IContact), Is.EqualTo(4)); + } + } + } +} From 71fff6f274b16cd082b5a2d69b93420409de7d2c Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 14 Feb 2021 00:00:40 -0500 Subject: [PATCH 28/36] Adjust InkPresenterDesktop.h --- .../um/InkPresenterDesktop/generate.rsp | 1 + generation/um/InkPresenterDesktop/header.txt | 2 +- .../um-InkPresenterDesktop.h | 1 + .../IInkCommitRequestHandler.cs | 2 +- .../um/InkPresenterDesktop/IInkDesktopHost.cs | 2 +- .../InkPresenterDesktop/IInkHostWorkItem.cs | 2 +- .../IInkPresenterDesktop.cs | 2 +- .../um/InkPresenterDesktop/InkDesktopHost.cs | 2 +- .../Windows/um/InkPresenterDesktop/Windows.cs | 20 +++++++++++++------ .../IInkCommitRequestHandlerTests.cs | 2 +- .../IInkDesktopHostTests.cs | 2 +- .../IInkHostWorkItemTests.cs | 2 +- .../IInkPresenterDesktopTests.cs | 2 +- .../InkDesktopHostTests.cs | 2 +- 14 files changed, 27 insertions(+), 17 deletions(-) diff --git a/generation/um/InkPresenterDesktop/generate.rsp b/generation/um/InkPresenterDesktop/generate.rsp index 8953bb7f45..87498fb116 100644 --- a/generation/um/InkPresenterDesktop/generate.rsp +++ b/generation/um/InkPresenterDesktop/generate.rsp @@ -8,3 +8,4 @@ um-InkPresenterDesktop.h ../../../tests/Interop/Windows/um/InkPresenterDesktop --traverse C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/InkPresenterDesktop.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/InkPresenterDesktop_i.c diff --git a/generation/um/InkPresenterDesktop/header.txt b/generation/um/InkPresenterDesktop/header.txt index e3a63cd875..129946ef7b 100644 --- a/generation/um/InkPresenterDesktop/header.txt +++ b/generation/um/InkPresenterDesktop/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/InkPresenterDesktop/um-InkPresenterDesktop.h b/generation/um/InkPresenterDesktop/um-InkPresenterDesktop.h index 33c92d6820..9a117858cd 100644 --- a/generation/um/InkPresenterDesktop/um-InkPresenterDesktop.h +++ b/generation/um/InkPresenterDesktop/um-InkPresenterDesktop.h @@ -1,2 +1,3 @@ #include #include +#include diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandler.cs b/sources/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandler.cs index df30f38888..c70d57e348 100644 --- a/sources/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandler.cs +++ b/sources/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandler.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHost.cs b/sources/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHost.cs index e4b59081cb..46c18803b8 100644 --- a/sources/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHost.cs +++ b/sources/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHost.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItem.cs b/sources/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItem.cs index f0a5f643cf..338b871dfa 100644 --- a/sources/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItem.cs +++ b/sources/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItem.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktop.cs b/sources/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktop.cs index 79ab2b1727..4ae0017536 100644 --- a/sources/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktop.cs +++ b/sources/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktop.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/InkDesktopHost.cs b/sources/Interop/Windows/um/InkPresenterDesktop/InkDesktopHost.cs index 18246b04e1..11c33529e8 100644 --- a/sources/Interop/Windows/um/InkPresenterDesktop/InkDesktopHost.cs +++ b/sources/Interop/Windows/um/InkPresenterDesktop/InkDesktopHost.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs b/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs index 0be0e0cc0c..c31e5ed39d 100644 --- a/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs +++ b/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -9,14 +9,22 @@ namespace TerraFX.Interop { public static partial class Windows { - public static readonly Guid IID_IInkCommitRequestHandler = new Guid(0xFABEA3FC, 0xB108, 0x45B6, 0xA9, 0xFC, 0x8D, 0x08, 0xFA, 0x9F, 0x85, 0xCF); + [NativeTypeName("const IID")] + public static readonly Guid IID_IInkCommitRequestHandler = new Guid(0xfabea3fc, 0xb108, 0x45b6, 0xa9, 0xfc, 0x8d, 0x08, 0xfa, 0x9f, 0x85, 0xcf); - public static readonly Guid IID_IInkPresenterDesktop = new Guid(0x73F3C0D9, 0x2E8B, 0x48F3, 0x89, 0x5E, 0x20, 0xCB, 0xD2, 0x7B, 0x72, 0x3B); + [NativeTypeName("const IID")] + public static readonly Guid IID_IInkPresenterDesktop = new Guid(0x73f3c0d9, 0x2e8b, 0x48f3, 0x89, 0x5e, 0x20, 0xcb, 0xd2, 0x7b, 0x72, 0x3b); - public static readonly Guid IID_IInkHostWorkItem = new Guid(0xCCDA0A9A, 0x1B78, 0x4632, 0xBB, 0x96, 0x97, 0x80, 0x06, 0x62, 0xE2, 0x6C); + [NativeTypeName("const IID")] + public static readonly Guid IID_IInkHostWorkItem = new Guid(0xccda0a9a, 0x1b78, 0x4632, 0xbb, 0x96, 0x97, 0x80, 0x06, 0x62, 0xe2, 0x6c); - public static readonly Guid IID_IInkDesktopHost = new Guid(0x4CE7D875, 0xA981, 0x4140, 0xA1, 0xFF, 0xAD, 0x93, 0x25, 0x8E, 0x8D, 0x59); + [NativeTypeName("const IID")] + public static readonly Guid IID_IInkDesktopHost = new Guid(0x4ce7d875, 0xa981, 0x4140, 0xa1, 0xff, 0xad, 0x93, 0x25, 0x8e, 0x8d, 0x59); - public static readonly Guid CLSID_InkDesktopHost = new Guid(0x062584A6, 0xF830, 0x4BDC, 0xA4, 0xD2, 0x0A, 0x10, 0xAB, 0x06, 0x2B, 0x1D); + [NativeTypeName("const IID")] + public static readonly Guid LIBID_InkDesktopHostLib = new Guid(0x2aef0967, 0xc833, 0x4f38, 0x91, 0xf3, 0x16, 0xe6, 0x7d, 0x55, 0xd7, 0x17); + + [NativeTypeName("const CLSID")] + public static readonly Guid CLSID_InkDesktopHost = new Guid(0x062584a6, 0xf830, 0x4bdc, 0xa4, 0xd2, 0x0a, 0x10, 0xab, 0x06, 0x2b, 0x1d); } } diff --git a/tests/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandlerTests.cs b/tests/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandlerTests.cs index 7627ab69a3..6e56809683 100644 --- a/tests/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandlerTests.cs +++ b/tests/Interop/Windows/um/InkPresenterDesktop/IInkCommitRequestHandlerTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHostTests.cs b/tests/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHostTests.cs index 989a1ffcf0..9a1d933d51 100644 --- a/tests/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHostTests.cs +++ b/tests/Interop/Windows/um/InkPresenterDesktop/IInkDesktopHostTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItemTests.cs b/tests/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItemTests.cs index 1e9a09186a..069e07846a 100644 --- a/tests/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItemTests.cs +++ b/tests/Interop/Windows/um/InkPresenterDesktop/IInkHostWorkItemTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktopTests.cs b/tests/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktopTests.cs index 4ce4b1932e..d6f6a6b1de 100644 --- a/tests/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktopTests.cs +++ b/tests/Interop/Windows/um/InkPresenterDesktop/IInkPresenterDesktopTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/InkPresenterDesktop/InkDesktopHostTests.cs b/tests/Interop/Windows/um/InkPresenterDesktop/InkDesktopHostTests.cs index 30d16ebc5b..8804d14762 100644 --- a/tests/Interop/Windows/um/InkPresenterDesktop/InkDesktopHostTests.cs +++ b/tests/Interop/Windows/um/InkPresenterDesktop/InkDesktopHostTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; From c08c3c6faa7a34c1d3e3323dbab9b1c84649e616 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 14 Feb 2021 00:05:53 -0500 Subject: [PATCH 29/36] Add EvColl.h --- TerraFX.Interop.Windows.sln | 8 + generation/remap.rsp | 10 ++ generation/um/EvColl/generate.rsp | 12 ++ generation/um/EvColl/header.txt | 4 + generation/um/EvColl/um-EvColl.h | 2 + .../EC_SUBSCRIPTION_CONFIGURATION_MODE.cs | 15 ++ .../EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs | 13 ++ .../EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs | 16 ++ .../EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs | 13 ++ .../um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs | 44 +++++ ...BSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs | 15 ++ .../EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs | 19 +++ .../Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs | 13 ++ .../Interop/Windows/um/EvColl/EC_VARIANT.cs | 159 ++++++++++++++++++ .../Windows/um/EvColl/EC_VARIANT_TYPE.cs | 17 ++ sources/Interop/Windows/um/EvColl/Windows.cs | 94 +++++++++++ .../Windows/um/EvColl/EC_VARIANTTests.cs | 35 ++++ 17 files changed, 489 insertions(+) create mode 100644 generation/um/EvColl/generate.rsp create mode 100644 generation/um/EvColl/header.txt create mode 100644 generation/um/EvColl/um-EvColl.h create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_VARIANT.cs create mode 100644 sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs create mode 100644 sources/Interop/Windows/um/EvColl/Windows.cs create mode 100644 tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 373671183e..00c4902ad4 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -2023,6 +2023,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IContact", "IContact", "{1F generation\um\IContact\um-IContact.h = generation\um\IContact\um-IContact.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EvColl", "EvColl", "{C7DE8450-50ED-487C-B1DF-B0ADE5F55F09}" + ProjectSection(SolutionItems) = preProject + generation\um\EvColl\generate.rsp = generation\um\EvColl\generate.rsp + generation\um\EvColl\header.txt = generation\um\EvColl\header.txt + generation\um\EvColl\um-EvColl.h = generation\um\EvColl\um-EvColl.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2340,6 +2347,7 @@ Global {D9F58364-B99D-4384-84C4-BC0EE0136523} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {686A85CD-0BA2-4F6B-A9D9-E5F1FF3451B2} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {1F5573A8-15AF-43CC-8879-F20398695556} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {C7DE8450-50ED-487C-B1DF-B0ADE5F55F09} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index bf367bbb99..6b9d6f2522 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -1880,6 +1880,16 @@ _DXGI_OFFER_RESOURCE_FLAGS=DXGI_OFFER_RESOURCE_FLAGS _DXGI_OFFER_RESOURCE_PRIORITY=DXGI_OFFER_RESOURCE_PRIORITY _DXGI_RECLAIM_RESOURCE_RESULTS=DXGI_RECLAIM_RESOURCE_RESULTS _EAllocationType=EAllocationType +_EC_SUBSCRIPTION_CONFIGURATION_MODE=EC_SUBSCRIPTION_CONFIGURATION_MODE +_EC_SUBSCRIPTION_CONTENT_FORMAT=EC_SUBSCRIPTION_CONTENT_FORMAT +_EC_SUBSCRIPTION_CREDENTIALS_TYPE=EC_SUBSCRIPTION_CREDENTIALS_TYPE +_EC_SUBSCRIPTION_DELIVERY_MODE=EC_SUBSCRIPTION_DELIVERY_MODE +_EC_SUBSCRIPTION_PROPERTY_ID=EC_SUBSCRIPTION_PROPERTY_ID +_EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS=EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS +_EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID=EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID +_EC_SUBSCRIPTION_TYPE=EC_SUBSCRIPTION_TYPE +_EC_VARIANT=EC_VARIANT +_EC_VARIANT_TYPE=EC_VARIANT_TYPE _ELEMENT_TYPE=ELEMENT_TYPE _ENCLAVE_CREATE_INFO_SGX=ENCLAVE_CREATE_INFO_SGX _ENCLAVE_CREATE_INFO_VBS=ENCLAVE_CREATE_INFO_VBS diff --git a/generation/um/EvColl/generate.rsp b/generation/um/EvColl/generate.rsp new file mode 100644 index 0000000000..56750868d8 --- /dev/null +++ b/generation/um/EvColl/generate.rsp @@ -0,0 +1,12 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-EvColl.h +--output +../../../sources/Interop/Windows/um/EvColl +--test-output +../../../tests/Interop/Windows/um/EvColl +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/EvColl.h +--with-librarypath +*=wecapi diff --git a/generation/um/EvColl/header.txt b/generation/um/EvColl/header.txt new file mode 100644 index 0000000000..e40cbbaf8f --- /dev/null +++ b/generation/um/EvColl/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/EvColl/um-EvColl.h b/generation/um/EvColl/um-EvColl.h new file mode 100644 index 0000000000..fa2e989f10 --- /dev/null +++ b/generation/um/EvColl/um-EvColl.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs new file mode 100644 index 0000000000..9eea34c21c --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_CONFIGURATION_MODE + { + EcConfigurationModeNormal = 0, + EcConfigurationModeCustom, + EcConfigurationModeMinLatency, + EcConfigurationModeMinBandwidth, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs new file mode 100644 index 0000000000..9cf61126f3 --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_CONTENT_FORMAT + { + EcContentFormatEvents = 1, + EcContentFormatRenderedText, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs new file mode 100644 index 0000000000..0b4a397912 --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs @@ -0,0 +1,16 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_CREDENTIALS_TYPE + { + EcSubscriptionCredDefault = 0, + EcSubscriptionCredNegotiate, + EcSubscriptionCredDigest, + EcSubscriptionCredBasic, + EcSubscriptionCredLocalMachine, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs new file mode 100644 index 0000000000..a02bb7a22b --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_DELIVERY_MODE + { + EcDeliveryModePull = 1, + EcDeliveryModePush, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs new file mode 100644 index 0000000000..88aff73f60 --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_PROPERTY_ID + { + EcSubscriptionEnabled = 0, + EcSubscriptionEventSources, + EcSubscriptionEventSourceAddress, + EcSubscriptionEventSourceEnabled, + EcSubscriptionEventSourceUserName, + EcSubscriptionEventSourcePassword, + EcSubscriptionDescription, + EcSubscriptionURI, + EcSubscriptionConfigurationMode, + EcSubscriptionExpires, + EcSubscriptionQuery, + EcSubscriptionTransportName, + EcSubscriptionTransportPort, + EcSubscriptionDeliveryMode, + EcSubscriptionDeliveryMaxItems, + EcSubscriptionDeliveryMaxLatencyTime, + EcSubscriptionHeartbeatInterval, + EcSubscriptionLocale, + EcSubscriptionContentFormat, + EcSubscriptionLogFile, + EcSubscriptionPublisherName, + EcSubscriptionCredentialsType, + EcSubscriptionCommonUserName, + EcSubscriptionCommonPassword, + EcSubscriptionHostName, + EcSubscriptionReadExistingEvents, + EcSubscriptionDialect, + EcSubscriptionType, + EcSubscriptionAllowedIssuerCAs, + EcSubscriptionAllowedSubjects, + EcSubscriptionDeniedSubjects, + EcSubscriptionAllowedSourceDomainComputers, + EcSubscriptionPropertyIdEND, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs new file mode 100644 index 0000000000..46475bc87a --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS + { + EcRuntimeStatusActiveStatusDisabled = 1, + EcRuntimeStatusActiveStatusActive, + EcRuntimeStatusActiveStatusInactive, + EcRuntimeStatusActiveStatusTrying, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs new file mode 100644 index 0000000000..3fd9955d89 --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs @@ -0,0 +1,19 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID + { + EcSubscriptionRunTimeStatusActive = 0, + EcSubscriptionRunTimeStatusLastError, + EcSubscriptionRunTimeStatusLastErrorMessage, + EcSubscriptionRunTimeStatusLastErrorTime, + EcSubscriptionRunTimeStatusNextRetryTime, + EcSubscriptionRunTimeStatusEventSources, + EcSubscriptionRunTimeStatusLastHeartbeatTime, + EcSubscriptionRunTimeStatusInfoIdEND, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs new file mode 100644 index 0000000000..f0f4ca70ad --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_SUBSCRIPTION_TYPE + { + EcSubscriptionTypeSourceInitiated = 0, + EcSubscriptionTypeCollectorInitiated = 1, + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_VARIANT.cs b/sources/Interop/Windows/um/EvColl/EC_VARIANT.cs new file mode 100644 index 0000000000..f6af40ab83 --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_VARIANT.cs @@ -0,0 +1,159 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public unsafe partial struct EC_VARIANT + { + [NativeTypeName("_EC_VARIANT::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/EvColl.h:121:5)")] + public _Anonymous_e__Union Anonymous; + + public ref int BooleanVal + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.BooleanVal, 1)); + } + } + + public ref uint UInt32Val + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.UInt32Val, 1)); + } + } + + public ref ulong DateTimeVal + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.DateTimeVal, 1)); + } + } + + public ref ushort* StringVal + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->StringVal; + } + } + } + + public ref byte* BinaryVal + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->BinaryVal; + } + } + } + + public ref int* BooleanArr + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->BooleanArr; + } + } + } + + public ref int* Int32Arr + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->Int32Arr; + } + } + } + + public ref ushort** StringArr + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + fixed (_Anonymous_e__Union* pField = &Anonymous) + { + return ref pField->StringArr; + } + } + } + + public ref IntPtr PropertyHandleVal + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.PropertyHandleVal, 1)); + } + } + + [NativeTypeName("DWORD")] + public uint Count; + + [NativeTypeName("DWORD")] + public uint Type; + + [StructLayout(LayoutKind.Explicit)] + public unsafe partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + [NativeTypeName("BOOL")] + public int BooleanVal; + + [FieldOffset(0)] + [NativeTypeName("UINT32")] + public uint UInt32Val; + + [FieldOffset(0)] + [NativeTypeName("ULONGLONG")] + public ulong DateTimeVal; + + [FieldOffset(0)] + [NativeTypeName("LPCWSTR")] + public ushort* StringVal; + + [FieldOffset(0)] + [NativeTypeName("PBYTE")] + public byte* BinaryVal; + + [FieldOffset(0)] + [NativeTypeName("BOOL *")] + public int* BooleanArr; + + [FieldOffset(0)] + [NativeTypeName("INT32 *")] + public int* Int32Arr; + + [FieldOffset(0)] + [NativeTypeName("LPWSTR *")] + public ushort** StringArr; + + [FieldOffset(0)] + [NativeTypeName("EC_OBJECT_ARRAY_PROPERTY_HANDLE")] + public IntPtr PropertyHandleVal; + } + } +} diff --git a/sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs b/sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs new file mode 100644 index 0000000000..5510ab3e2c --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs @@ -0,0 +1,17 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum EC_VARIANT_TYPE + { + EcVarTypeNull = 0, + EcVarTypeBoolean, + EcVarTypeUInt32, + EcVarTypeDateTime, + EcVarTypeString, + EcVarObjectArrayPropertyHandle, + } +} diff --git a/sources/Interop/Windows/um/EvColl/Windows.cs b/sources/Interop/Windows/um/EvColl/Windows.cs new file mode 100644 index 0000000000..c11ee5c1b5 --- /dev/null +++ b/sources/Interop/Windows/um/EvColl/Windows.cs @@ -0,0 +1,94 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public static unsafe partial class Windows + { + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("EC_HANDLE")] + public static extern IntPtr EcOpenSubscriptionEnum([NativeTypeName("DWORD")] uint Flags); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcEnumNextSubscription([NativeTypeName("EC_HANDLE")] IntPtr SubscriptionEnum, [NativeTypeName("DWORD")] uint SubscriptionNameBufferSize, [NativeTypeName("LPWSTR")] ushort* SubscriptionNameBuffer, [NativeTypeName("PDWORD")] uint* SubscriptionNameBufferUsed); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("EC_HANDLE")] + public static extern IntPtr EcOpenSubscription([NativeTypeName("LPCWSTR")] ushort* SubscriptionName, [NativeTypeName("DWORD")] uint AccessMask, [NativeTypeName("DWORD")] uint Flags); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcSetSubscriptionProperty([NativeTypeName("EC_HANDLE")] IntPtr Subscription, EC_SUBSCRIPTION_PROPERTY_ID PropertyId, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("PEC_VARIANT")] EC_VARIANT* PropertyValue); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcGetSubscriptionProperty([NativeTypeName("EC_HANDLE")] IntPtr Subscription, EC_SUBSCRIPTION_PROPERTY_ID PropertyId, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("DWORD")] uint PropertyValueBufferSize, [NativeTypeName("PEC_VARIANT")] EC_VARIANT* PropertyValueBuffer, [NativeTypeName("PDWORD")] uint* PropertyValueBufferUsed); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcSaveSubscription([NativeTypeName("EC_HANDLE")] IntPtr Subscription, [NativeTypeName("DWORD")] uint Flags); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcDeleteSubscription([NativeTypeName("LPCWSTR")] ushort* SubscriptionName, [NativeTypeName("DWORD")] uint Flags); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcGetObjectArraySize([NativeTypeName("EC_OBJECT_ARRAY_PROPERTY_HANDLE")] IntPtr ObjectArray, [NativeTypeName("PDWORD")] uint* ObjectArraySize); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcSetObjectArrayProperty([NativeTypeName("EC_OBJECT_ARRAY_PROPERTY_HANDLE")] IntPtr ObjectArray, EC_SUBSCRIPTION_PROPERTY_ID PropertyId, [NativeTypeName("DWORD")] uint ArrayIndex, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("PEC_VARIANT")] EC_VARIANT* PropertyValue); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcGetObjectArrayProperty([NativeTypeName("EC_OBJECT_ARRAY_PROPERTY_HANDLE")] IntPtr ObjectArray, EC_SUBSCRIPTION_PROPERTY_ID PropertyId, [NativeTypeName("DWORD")] uint ArrayIndex, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("DWORD")] uint PropertyValueBufferSize, [NativeTypeName("PEC_VARIANT")] EC_VARIANT* PropertyValueBuffer, [NativeTypeName("PDWORD")] uint* PropertyValueBufferUsed); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcInsertObjectArrayElement([NativeTypeName("EC_OBJECT_ARRAY_PROPERTY_HANDLE")] IntPtr ObjectArray, [NativeTypeName("DWORD")] uint ArrayIndex); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcRemoveObjectArrayElement([NativeTypeName("EC_OBJECT_ARRAY_PROPERTY_HANDLE")] IntPtr ObjectArray, [NativeTypeName("DWORD")] uint ArrayIndex); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcGetSubscriptionRunTimeStatus([NativeTypeName("LPCWSTR")] ushort* SubscriptionName, EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID StatusInfoId, [NativeTypeName("LPCWSTR")] ushort* EventSourceName, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("DWORD")] uint StatusValueBufferSize, [NativeTypeName("PEC_VARIANT")] EC_VARIANT* StatusValueBuffer, [NativeTypeName("PDWORD")] uint* StatusValueBufferUsed); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcRetrySubscription([NativeTypeName("LPCWSTR")] ushort* SubscriptionName, [NativeTypeName("LPCWSTR")] ushort* EventSourceName, [NativeTypeName("DWORD")] uint Flags); + + [DllImport("wecapi", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int EcClose([NativeTypeName("EC_HANDLE")] IntPtr Object); + + [NativeTypeName("#define EC_VARIANT_TYPE_MASK 0x7f")] + public const int EC_VARIANT_TYPE_MASK = 0x7f; + + [NativeTypeName("#define EC_VARIANT_TYPE_ARRAY 128")] + public const int EC_VARIANT_TYPE_ARRAY = 128; + + [NativeTypeName("#define EC_READ_ACCESS 1")] + public const int EC_READ_ACCESS = 1; + + [NativeTypeName("#define EC_WRITE_ACCESS 2")] + public const int EC_WRITE_ACCESS = 2; + + [NativeTypeName("#define EC_OPEN_ALWAYS 0")] + public const int EC_OPEN_ALWAYS = 0; + + [NativeTypeName("#define EC_CREATE_NEW 1")] + public const int EC_CREATE_NEW = 1; + + [NativeTypeName("#define EC_OPEN_EXISTING 2")] + public const int EC_OPEN_EXISTING = 2; + } +} diff --git a/tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs b/tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs new file mode 100644 index 0000000000..0f709086f4 --- /dev/null +++ b/tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class EC_VARIANTTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(EC_VARIANT))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(EC_VARIANT).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(EC_VARIANT), Is.EqualTo(16)); + } + } +} From 96851acf6845400c7f07f56e56aaf7336eef1078 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 14 Feb 2021 00:11:59 -0500 Subject: [PATCH 30/36] Add XblIdpAuthManager.h --- TerraFX.Interop.Windows.sln | 8 + generation/remap.rsp | 3 + generation/um/XblIdpAuthManager/generate.rsp | 10 + generation/um/XblIdpAuthManager/header.txt | 4 + .../XblIdpAuthManager/um-XblIdpAuthManager.h | 2 + .../XblIdpAuthManager/IXblIdpAuthManager.cs | 81 ++++++++ .../IXblIdpAuthTokenResult.cs | 179 ++++++++++++++++++ .../IXblIdpAuthTokenResult2.cs | 60 ++++++ .../Windows/um/XblIdpAuthManager/Windows.cs | 22 +++ .../XBL_IDP_AUTH_TOKEN_STATUS.cs | 20 ++ .../um/XblIdpAuthManager/XblIdpAuthManager.cs | 14 ++ .../XblIdpAuthTokenResult.cs | 14 ++ .../IXblIdpAuthManagerTests.cs | 51 +++++ .../IXblIdpAuthTokenResult2Tests.cs | 51 +++++ .../IXblIdpAuthTokenResultTests.cs | 51 +++++ .../XblIdpAuthManagerTests.cs | 44 +++++ .../XblIdpAuthTokenResultTests.cs | 44 +++++ 17 files changed, 658 insertions(+) create mode 100644 generation/um/XblIdpAuthManager/generate.rsp create mode 100644 generation/um/XblIdpAuthManager/header.txt create mode 100644 generation/um/XblIdpAuthManager/um-XblIdpAuthManager.h create mode 100644 sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs create mode 100644 sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs create mode 100644 sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs create mode 100644 sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs create mode 100644 sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs create mode 100644 sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs create mode 100644 sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs create mode 100644 tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs create mode 100644 tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs create mode 100644 tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs create mode 100644 tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs create mode 100644 tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 00c4902ad4..c82782575c 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -2030,6 +2030,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EvColl", "EvColl", "{C7DE84 generation\um\EvColl\um-EvColl.h = generation\um\EvColl\um-EvColl.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XblIdpAuthManager", "XblIdpAuthManager", "{EAAB8DAC-A628-425F-ACC2-E3DBC2130C4B}" + ProjectSection(SolutionItems) = preProject + generation\um\XblIdpAuthManager\generate.rsp = generation\um\XblIdpAuthManager\generate.rsp + generation\um\XblIdpAuthManager\header.txt = generation\um\XblIdpAuthManager\header.txt + generation\um\XblIdpAuthManager\um-XblIdpAuthManager.h = generation\um\XblIdpAuthManager\um-XblIdpAuthManager.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2348,6 +2355,7 @@ Global {686A85CD-0BA2-4F6B-A9D9-E5F1FF3451B2} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {1F5573A8-15AF-43CC-8879-F20398695556} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C7DE8450-50ED-487C-B1DF-B0ADE5F55F09} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {EAAB8DAC-A628-425F-ACC2-E3DBC2130C4B} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/remap.rsp b/generation/remap.rsp index 6b9d6f2522..7b7833704f 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -524,6 +524,8 @@ IID_UIAnimationTransitionLibrary=CLSID_UIAnimationTransitionLibrary IID_UIAnimationTransitionLibrary2=CLSID_UIAnimationTransitionLibrary2 IID_UIAnimationTransitionFactory=CLSID_UIAnimationTransitionFactory IID_UIAnimationTransitionFactory2=CLSID_UIAnimationTransitionFactory2 +IID_XblIdpAuthManager=CLSID_XblIdpAuthManager +IID_XblIdpAuthTokenResult=CLSID_XblIdpAuthTokenResult IID_XMLDocument=CLSID_XMLDocument IID_XMLDOMDocumentEvents=DIID_XMLDOMDocumentEvents IID_XMLDSOControl=CLSID_XMLDSOControl @@ -3435,6 +3437,7 @@ _WTD_GENERIC_CHAIN_POLICY_CREATE_INFO=WTD_GENERIC_CHAIN_POLICY_CREATE_INFO _WTD_GENERIC_CHAIN_POLICY_DATA=WTD_GENERIC_CHAIN_POLICY_DATA _WTD_GENERIC_CHAIN_POLICY_SIGNER_INFO=WTD_GENERIC_CHAIN_POLICY_SIGNER_INFO _X509Certificate=X509Certificate +_XBL_IDP_AUTH_TOKEN_STATUS=XBL_IDP_AUTH_TOKEN_STATUS _XINPUT_BATTERY_INFORMATION=XINPUT_BATTERY_INFORMATION _XINPUT_CAPABILITIES=XINPUT_CAPABILITIES _XINPUT_GAMEPAD=XINPUT_GAMEPAD diff --git a/generation/um/XblIdpAuthManager/generate.rsp b/generation/um/XblIdpAuthManager/generate.rsp new file mode 100644 index 0000000000..612418c222 --- /dev/null +++ b/generation/um/XblIdpAuthManager/generate.rsp @@ -0,0 +1,10 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-XblIdpAuthManager.h +--output +../../../sources/Interop/Windows/um/XblIdpAuthManager +--test-output +../../../tests/Interop/Windows/um/XblIdpAuthManager +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/XblIdpAuthManager.h diff --git a/generation/um/XblIdpAuthManager/header.txt b/generation/um/XblIdpAuthManager/header.txt new file mode 100644 index 0000000000..b11b79207d --- /dev/null +++ b/generation/um/XblIdpAuthManager/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/XblIdpAuthManager/um-XblIdpAuthManager.h b/generation/um/XblIdpAuthManager/um-XblIdpAuthManager.h new file mode 100644 index 0000000000..337bf8fd05 --- /dev/null +++ b/generation/um/XblIdpAuthManager/um-XblIdpAuthManager.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs new file mode 100644 index 0000000000..e8ee39175a --- /dev/null +++ b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs @@ -0,0 +1,81 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("EB5DDB08-8BBF-449B-AC21-B02DDEB3B136")] + [NativeTypeName("struct IXblIdpAuthManager : IUnknown")] + public unsafe partial struct IXblIdpAuthManager + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetGamerAccount([NativeTypeName("LPCWSTR")] ushort* msaAccountId, [NativeTypeName("LPCWSTR")] ushort* xuid) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), msaAccountId, xuid); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetGamerAccount([NativeTypeName("LPWSTR *")] ushort** msaAccountId, [NativeTypeName("LPWSTR *")] ushort** xuid) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), msaAccountId, xuid); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int SetAppViewInitialized([NativeTypeName("LPCWSTR")] ushort* appSid, [NativeTypeName("LPCWSTR")] ushort* msaAccountId) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), appSid, msaAccountId); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetEnvironment([NativeTypeName("LPWSTR *")] ushort** environment) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), environment); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetSandbox([NativeTypeName("LPWSTR *")] ushort** sandbox) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), sandbox); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetTokenAndSignatureWithTokenResult([NativeTypeName("LPCWSTR")] ushort* msaAccountId, [NativeTypeName("LPCWSTR")] ushort* appSid, [NativeTypeName("LPCWSTR")] ushort* msaTarget, [NativeTypeName("LPCWSTR")] ushort* msaPolicy, [NativeTypeName("LPCWSTR")] ushort* httpMethod, [NativeTypeName("LPCWSTR")] ushort* uri, [NativeTypeName("LPCWSTR")] ushort* headers, [NativeTypeName("BYTE *")] byte* body, [NativeTypeName("DWORD")] uint bodySize, [NativeTypeName("BOOL")] int forceRefresh, [NativeTypeName("IXblIdpAuthTokenResult **")] IXblIdpAuthTokenResult** result) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), msaAccountId, appSid, msaTarget, msaPolicy, httpMethod, uri, headers, body, bodySize, forceRefresh, result); + } + } +} diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs new file mode 100644 index 0000000000..123c9743c9 --- /dev/null +++ b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs @@ -0,0 +1,179 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("46CE0225-F267-4D68-B299-B2762552DEC1")] + [NativeTypeName("struct IXblIdpAuthTokenResult : IUnknown")] + public unsafe partial struct IXblIdpAuthTokenResult + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetStatus([NativeTypeName("XBL_IDP_AUTH_TOKEN_STATUS *")] XBL_IDP_AUTH_TOKEN_STATUS* status) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), status); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetErrorCode([NativeTypeName("HRESULT *")] int* errorCode) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), errorCode); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetToken([NativeTypeName("LPWSTR *")] ushort** token) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), token); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetSignature([NativeTypeName("LPWSTR *")] ushort** signature) + { + return ((delegate* unmanaged)(lpVtbl[6]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), signature); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetSandbox([NativeTypeName("LPWSTR *")] ushort** sandbox) + { + return ((delegate* unmanaged)(lpVtbl[7]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), sandbox); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetEnvironment([NativeTypeName("LPWSTR *")] ushort** environment) + { + return ((delegate* unmanaged)(lpVtbl[8]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), environment); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetMsaAccountId([NativeTypeName("LPWSTR *")] ushort** msaAccountId) + { + return ((delegate* unmanaged)(lpVtbl[9]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), msaAccountId); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetXuid([NativeTypeName("LPWSTR *")] ushort** xuid) + { + return ((delegate* unmanaged)(lpVtbl[10]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), xuid); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetGamertag([NativeTypeName("LPWSTR *")] ushort** gamertag) + { + return ((delegate* unmanaged)(lpVtbl[11]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), gamertag); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetAgeGroup([NativeTypeName("LPWSTR *")] ushort** ageGroup) + { + return ((delegate* unmanaged)(lpVtbl[12]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), ageGroup); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetPrivileges([NativeTypeName("LPWSTR *")] ushort** privileges) + { + return ((delegate* unmanaged)(lpVtbl[13]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), privileges); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetMsaTarget([NativeTypeName("LPWSTR *")] ushort** msaTarget) + { + return ((delegate* unmanaged)(lpVtbl[14]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), msaTarget); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetMsaPolicy([NativeTypeName("LPWSTR *")] ushort** msaPolicy) + { + return ((delegate* unmanaged)(lpVtbl[15]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), msaPolicy); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetMsaAppId([NativeTypeName("LPWSTR *")] ushort** msaAppId) + { + return ((delegate* unmanaged)(lpVtbl[16]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), msaAppId); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetRedirect([NativeTypeName("LPWSTR *")] ushort** redirect) + { + return ((delegate* unmanaged)(lpVtbl[17]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), redirect); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetMessageW([NativeTypeName("LPWSTR *")] ushort** message) + { + return ((delegate* unmanaged)(lpVtbl[18]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), message); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetHelpId([NativeTypeName("LPWSTR *")] ushort** helpId) + { + return ((delegate* unmanaged)(lpVtbl[19]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), helpId); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetEnforcementBans([NativeTypeName("LPWSTR *")] ushort** enforcementBans) + { + return ((delegate* unmanaged)(lpVtbl[20]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), enforcementBans); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetRestrictions([NativeTypeName("LPWSTR *")] ushort** restrictions) + { + return ((delegate* unmanaged)(lpVtbl[21]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), restrictions); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetTitleRestrictions([NativeTypeName("LPWSTR *")] ushort** titleRestrictions) + { + return ((delegate* unmanaged)(lpVtbl[22]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), titleRestrictions); + } + } +} diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs new file mode 100644 index 0000000000..76dd952a5e --- /dev/null +++ b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs @@ -0,0 +1,60 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("75D760B0-60B9-412D-994F-26B2CD5F7812")] + [NativeTypeName("struct IXblIdpAuthTokenResult2 : IUnknown")] + public unsafe partial struct IXblIdpAuthTokenResult2 + { + public void** lpVtbl; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + { + return ((delegate* unmanaged)(lpVtbl[0]))((IXblIdpAuthTokenResult2*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged)(lpVtbl[1]))((IXblIdpAuthTokenResult2*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged)(lpVtbl[2]))((IXblIdpAuthTokenResult2*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetModernGamertag([NativeTypeName("LPWSTR *")] ushort** value) + { + return ((delegate* unmanaged)(lpVtbl[3]))((IXblIdpAuthTokenResult2*)Unsafe.AsPointer(ref this), value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetModernGamertagSuffix([NativeTypeName("LPWSTR *")] ushort** value) + { + return ((delegate* unmanaged)(lpVtbl[4]))((IXblIdpAuthTokenResult2*)Unsafe.AsPointer(ref this), value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [return: NativeTypeName("HRESULT")] + public int GetUniqueModernGamertag([NativeTypeName("LPWSTR *")] ushort** value) + { + return ((delegate* unmanaged)(lpVtbl[5]))((IXblIdpAuthTokenResult2*)Unsafe.AsPointer(ref this), value); + } + } +} diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs b/sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs new file mode 100644 index 0000000000..66734ea5b7 --- /dev/null +++ b/sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs @@ -0,0 +1,22 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; + +namespace TerraFX.Interop +{ + public static partial class Windows + { + public static readonly Guid IID_IXblIdpAuthManager = new Guid(0xEB5DDB08, 0x8BBF, 0x449B, 0xAC, 0x21, 0xB0, 0x2D, 0xDE, 0xB3, 0xB1, 0x36); + + public static readonly Guid IID_IXblIdpAuthTokenResult = new Guid(0x46CE0225, 0xF267, 0x4D68, 0xB2, 0x99, 0xB2, 0x76, 0x25, 0x52, 0xDE, 0xC1); + + public static readonly Guid IID_IXblIdpAuthTokenResult2 = new Guid(0x75D760B0, 0x60B9, 0x412D, 0x99, 0x4F, 0x26, 0xB2, 0xCD, 0x5F, 0x78, 0x12); + + public static readonly Guid CLSID_XblIdpAuthManager = new Guid(0xCE23534B, 0x56D8, 0x4978, 0x86, 0xA2, 0x7E, 0xE5, 0x70, 0x64, 0x04, 0x68); + + public static readonly Guid CLSID_XblIdpAuthTokenResult = new Guid(0x9F493441, 0x744A, 0x410C, 0xAE, 0x2B, 0x9A, 0x22, 0xF7, 0xC7, 0x73, 0x1F); + } +} diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs b/sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs new file mode 100644 index 0000000000..572f1ba1e4 --- /dev/null +++ b/sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs @@ -0,0 +1,20 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum XBL_IDP_AUTH_TOKEN_STATUS + { + XBL_IDP_AUTH_TOKEN_STATUS_SUCCESS = 0, + XBL_IDP_AUTH_TOKEN_STATUS_OFFLINE_SUCCESS = (XBL_IDP_AUTH_TOKEN_STATUS_SUCCESS + 1), + XBL_IDP_AUTH_TOKEN_STATUS_NO_ACCOUNT_SET = (XBL_IDP_AUTH_TOKEN_STATUS_OFFLINE_SUCCESS + 1), + XBL_IDP_AUTH_TOKEN_STATUS_LOAD_MSA_ACCOUNT_FAILED = (XBL_IDP_AUTH_TOKEN_STATUS_NO_ACCOUNT_SET + 1), + XBL_IDP_AUTH_TOKEN_STATUS_XBOX_VETO = (XBL_IDP_AUTH_TOKEN_STATUS_LOAD_MSA_ACCOUNT_FAILED + 1), + XBL_IDP_AUTH_TOKEN_STATUS_MSA_INTERRUPT = (XBL_IDP_AUTH_TOKEN_STATUS_XBOX_VETO + 1), + XBL_IDP_AUTH_TOKEN_STATUS_OFFLINE_NO_CONSENT = (XBL_IDP_AUTH_TOKEN_STATUS_MSA_INTERRUPT + 1), + XBL_IDP_AUTH_TOKEN_STATUS_VIEW_NOT_SET = (XBL_IDP_AUTH_TOKEN_STATUS_OFFLINE_NO_CONSENT + 1), + XBL_IDP_AUTH_TOKEN_STATUS_UNKNOWN = unchecked((int)(0xffffffff)), + } +} diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs new file mode 100644 index 0000000000..463fe792cc --- /dev/null +++ b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("CE23534B-56D8-4978-86A2-7EE570640468")] + public partial struct XblIdpAuthManager + { + } +} diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs new file mode 100644 index 0000000000..3ae34ed66a --- /dev/null +++ b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs @@ -0,0 +1,14 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + [Guid("9F493441-744A-410C-AE2B-9A22F7C7731F")] + public partial struct XblIdpAuthTokenResult + { + } +} diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs new file mode 100644 index 0000000000..7df50bd291 --- /dev/null +++ b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IXblIdpAuthManagerTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IXblIdpAuthManager).GUID, Is.EqualTo(IID_IXblIdpAuthManager)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IXblIdpAuthManager))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IXblIdpAuthManager).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IXblIdpAuthManager), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IXblIdpAuthManager), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs new file mode 100644 index 0000000000..ad3cd0f5d0 --- /dev/null +++ b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IXblIdpAuthTokenResult2Tests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IXblIdpAuthTokenResult2).GUID, Is.EqualTo(IID_IXblIdpAuthTokenResult2)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IXblIdpAuthTokenResult2))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IXblIdpAuthTokenResult2).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IXblIdpAuthTokenResult2), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IXblIdpAuthTokenResult2), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs new file mode 100644 index 0000000000..7146ab83db --- /dev/null +++ b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs @@ -0,0 +1,51 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class IXblIdpAuthTokenResultTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(IXblIdpAuthTokenResult).GUID, Is.EqualTo(IID_IXblIdpAuthTokenResult)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(IXblIdpAuthTokenResult))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(IXblIdpAuthTokenResult).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + if (Environment.Is64BitProcess) + { + Assert.That(sizeof(IXblIdpAuthTokenResult), Is.EqualTo(8)); + } + else + { + Assert.That(sizeof(IXblIdpAuthTokenResult), Is.EqualTo(4)); + } + } + } +} diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs new file mode 100644 index 0000000000..e05b80d518 --- /dev/null +++ b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class XblIdpAuthManagerTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(XblIdpAuthManager).GUID, Is.EqualTo(CLSID_XblIdpAuthManager)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(XblIdpAuthManager))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(XblIdpAuthManager).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(XblIdpAuthManager), Is.EqualTo(1)); + } + } +} diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs new file mode 100644 index 0000000000..791a8ce5ef --- /dev/null +++ b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs @@ -0,0 +1,44 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class XblIdpAuthTokenResultTests + { + /// Validates that the of the struct is correct. + [Test] + public static void GuidOfTest() + { + Assert.That(typeof(XblIdpAuthTokenResult).GUID, Is.EqualTo(CLSID_XblIdpAuthTokenResult)); + } + + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(XblIdpAuthTokenResult))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(XblIdpAuthTokenResult).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(XblIdpAuthTokenResult), Is.EqualTo(1)); + } + } +} From c75ee5b3bbba8b61b37ab4806741aae7f340e005 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 14 Feb 2021 00:21:57 -0500 Subject: [PATCH 31/36] Fix flags --- generation/um/RestartManager/generate.rsp | 3 ++- sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs | 3 +++ sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs | 3 --- sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/generation/um/RestartManager/generate.rsp b/generation/um/RestartManager/generate.rsp index cbad683a13..12f183398c 100644 --- a/generation/um/RestartManager/generate.rsp +++ b/generation/um/RestartManager/generate.rsp @@ -9,7 +9,8 @@ um-RestartManager.h --traverse C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/RestartManager.h --with-attribute -RM_APP_TYPE=Flags +RM_APP_STATUS=Flags +RM_REBOOT_REASON=Flags RM_SHUTDOWN_TYPE=Flags --with-librarypath *=rstrtmgr diff --git a/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs b/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs index 9144f69492..fb86acbe9a 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs @@ -3,8 +3,11 @@ // Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { + [Flags] public enum RM_APP_STATUS { RmStatusUnknown = 0x0, diff --git a/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs b/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs index c4682a27df..6945b03ee4 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs @@ -3,11 +3,8 @@ // Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 // Original source is Copyright © Microsoft. All rights reserved. -using System; - namespace TerraFX.Interop { - [Flags] public enum RM_APP_TYPE { RmUnknownApp = 0, diff --git a/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs b/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs index 6594dba875..f2bcbd88ef 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs @@ -3,8 +3,11 @@ // Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { + [Flags] public enum RM_REBOOT_REASON { RmRebootReasonNone = 0x0, From a44918fa9b4415a869b6b3ec35007c9aabf85215 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 10 Oct 2021 15:04:34 -0400 Subject: [PATCH 32/36] Update generation files --- generation/shared/tbs/generate.rsp | 2 +- generation/shared/tbs/header.txt | 2 +- generation/um/EvColl/generate.rsp | 2 +- generation/um/EvColl/header.txt | 2 +- generation/um/IContact/generate.rsp | 2 +- generation/um/IContact/header.txt | 2 +- generation/um/IMessageDispatcher/generate.rsp | 2 +- generation/um/IMessageDispatcher/header.txt | 2 +- generation/um/IsolatedAppLauncher/generate.rsp | 2 +- generation/um/IsolatedAppLauncher/header.txt | 2 +- generation/um/MDMRegistration/generate.rsp | 2 +- generation/um/MDMRegistration/header.txt | 2 +- generation/um/MSChapp/generate.rsp | 2 +- generation/um/MSChapp/header.txt | 2 +- generation/um/NotificationActivationCallback/generate.rsp | 2 +- generation/um/NotificationActivationCallback/header.txt | 2 +- generation/um/ProcessSnapshot/generate.rsp | 2 +- generation/um/ProcessSnapshot/header.txt | 2 +- generation/um/Psapi/generate.rsp | 2 +- generation/um/Psapi/header.txt | 2 +- generation/um/RestartManager/generate.rsp | 2 +- generation/um/RestartManager/header.txt | 2 +- generation/um/ShellScalingApi/generate.rsp | 2 +- generation/um/ShellScalingApi/header.txt | 2 +- generation/um/XblIdpAuthManager/generate.rsp | 2 +- generation/um/XblIdpAuthManager/header.txt | 2 +- generation/um/compressapi/generate.rsp | 2 +- generation/um/compressapi/header.txt | 2 +- generation/um/davclnt/generate.rsp | 2 +- generation/um/davclnt/header.txt | 2 +- generation/um/ddpbackup/generate.rsp | 2 +- generation/um/ddpbackup/header.txt | 2 +- generation/um/gamingtcui/generate.rsp | 2 +- generation/um/gamingtcui/header.txt | 2 +- generation/um/manipulations/generate.rsp | 4 ++-- generation/um/manipulations/header.txt | 2 +- generation/um/msports/generate.rsp | 2 +- generation/um/msports/header.txt | 2 +- generation/um/oobenotification/generate.rsp | 2 +- generation/um/oobenotification/header.txt | 2 +- generation/um/rendezvoussession/generate.rsp | 4 ++-- generation/um/rendezvoussession/header.txt | 2 +- generation/um/shtypes/generate.rsp | 2 +- generation/um/shtypes/header.txt | 2 +- generation/um/swdevice/generate.rsp | 2 +- generation/um/swdevice/header.txt | 2 +- generation/um/swdevicedef/generate.rsp | 2 +- generation/um/swdevicedef/header.txt | 2 +- generation/um/wcmapi/generate.rsp | 2 +- generation/um/wcmapi/header.txt | 2 +- generation/winrt/DocumentSource/generate.rsp | 2 +- generation/winrt/DocumentSource/header.txt | 2 +- generation/winrt/MessageDispatcherApi/generate.rsp | 2 +- generation/winrt/MessageDispatcherApi/header.txt | 2 +- generation/winrt/Wsdevlicensing/generate.rsp | 2 +- generation/winrt/Wsdevlicensing/header.txt | 2 +- 56 files changed, 58 insertions(+), 58 deletions(-) diff --git a/generation/shared/tbs/generate.rsp b/generation/shared/tbs/generate.rsp index 7af107680f..447bcf3434 100644 --- a/generation/shared/tbs/generate.rsp +++ b/generation/shared/tbs/generate.rsp @@ -7,6 +7,6 @@ shared-tbs.h --test-output ../../../tests/Interop/Windows/shared/tbs --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared/tbs.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/tbs.h --with-librarypath *=tbs diff --git a/generation/shared/tbs/header.txt b/generation/shared/tbs/header.txt index d410046c15..27bfb2b91d 100644 --- a/generation/shared/tbs/header.txt +++ b/generation/shared/tbs/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/EvColl/generate.rsp b/generation/um/EvColl/generate.rsp index 56750868d8..927b155e4f 100644 --- a/generation/um/EvColl/generate.rsp +++ b/generation/um/EvColl/generate.rsp @@ -7,6 +7,6 @@ um-EvColl.h --test-output ../../../tests/Interop/Windows/um/EvColl --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/EvColl.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/EvColl.h --with-librarypath *=wecapi diff --git a/generation/um/EvColl/header.txt b/generation/um/EvColl/header.txt index e40cbbaf8f..fb4df77e27 100644 --- a/generation/um/EvColl/header.txt +++ b/generation/um/EvColl/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/IContact/generate.rsp b/generation/um/IContact/generate.rsp index 8d7ad81a48..abfc535fe6 100644 --- a/generation/um/IContact/generate.rsp +++ b/generation/um/IContact/generate.rsp @@ -7,4 +7,4 @@ um-IContact.h --test-output ../../../tests/Interop/Windows/um/IContact --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/IContact.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/IContact.h diff --git a/generation/um/IContact/header.txt b/generation/um/IContact/header.txt index a3da22b530..9f40a33a66 100644 --- a/generation/um/IContact/header.txt +++ b/generation/um/IContact/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/IMessageDispatcher/generate.rsp b/generation/um/IMessageDispatcher/generate.rsp index ebcff7e50a..a3cdbed96e 100644 --- a/generation/um/IMessageDispatcher/generate.rsp +++ b/generation/um/IMessageDispatcher/generate.rsp @@ -7,4 +7,4 @@ um-IMessageDispatcher.h --test-output ../../../tests/Interop/Windows/um/IMessageDispatcher --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/IMessageDispatcher.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/IMessageDispatcher.h diff --git a/generation/um/IMessageDispatcher/header.txt b/generation/um/IMessageDispatcher/header.txt index 3d2ea34f7a..89a0bb51c3 100644 --- a/generation/um/IMessageDispatcher/header.txt +++ b/generation/um/IMessageDispatcher/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/IsolatedAppLauncher/generate.rsp b/generation/um/IsolatedAppLauncher/generate.rsp index 8e7a2ae3eb..3c308b1359 100644 --- a/generation/um/IsolatedAppLauncher/generate.rsp +++ b/generation/um/IsolatedAppLauncher/generate.rsp @@ -7,6 +7,6 @@ um-IsolatedAppLauncher.h --test-output ../../../tests/Interop/Windows/um/IsolatedAppLauncher --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/IsolatedAppLauncher.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/IsolatedAppLauncher.h --with-librarypath *=shcore diff --git a/generation/um/IsolatedAppLauncher/header.txt b/generation/um/IsolatedAppLauncher/header.txt index 5a1b0b33f1..7d7eb0394f 100644 --- a/generation/um/IsolatedAppLauncher/header.txt +++ b/generation/um/IsolatedAppLauncher/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/MDMRegistration/generate.rsp b/generation/um/MDMRegistration/generate.rsp index 0a89338cee..987e6e0d16 100644 --- a/generation/um/MDMRegistration/generate.rsp +++ b/generation/um/MDMRegistration/generate.rsp @@ -7,6 +7,6 @@ um-MDMRegistration.h --test-output ../../../tests/Interop/Windows/um/MDMRegistration --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/MDMRegistration.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/MDMRegistration.h --with-librarypath *=MDMRegistration diff --git a/generation/um/MDMRegistration/header.txt b/generation/um/MDMRegistration/header.txt index 78e056e613..6fde026c7d 100644 --- a/generation/um/MDMRegistration/header.txt +++ b/generation/um/MDMRegistration/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/MSChapp/generate.rsp b/generation/um/MSChapp/generate.rsp index 7ecaa4fabf..c625dc06f7 100644 --- a/generation/um/MSChapp/generate.rsp +++ b/generation/um/MSChapp/generate.rsp @@ -7,6 +7,6 @@ um-MSChapp.h --test-output ../../../tests/Interop/Windows/um/MSChapp --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/MSChapp.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/MSChapp.h --with-librarypath *=advapi32 diff --git a/generation/um/MSChapp/header.txt b/generation/um/MSChapp/header.txt index 10fdd0004c..8700cae8f5 100644 --- a/generation/um/MSChapp/header.txt +++ b/generation/um/MSChapp/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/NotificationActivationCallback/generate.rsp b/generation/um/NotificationActivationCallback/generate.rsp index 1c7e42bd55..b2c8d13169 100644 --- a/generation/um/NotificationActivationCallback/generate.rsp +++ b/generation/um/NotificationActivationCallback/generate.rsp @@ -7,4 +7,4 @@ um-NotificationActivationCallback.h --test-output ../../../tests/Interop/Windows/um/NotificationActivationCallback --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/NotificationActivationCallback.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/NotificationActivationCallback.h diff --git a/generation/um/NotificationActivationCallback/header.txt b/generation/um/NotificationActivationCallback/header.txt index 16df687a7d..13324cb681 100644 --- a/generation/um/NotificationActivationCallback/header.txt +++ b/generation/um/NotificationActivationCallback/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/ProcessSnapshot/generate.rsp b/generation/um/ProcessSnapshot/generate.rsp index 3f38e945cd..7a42efdb7a 100644 --- a/generation/um/ProcessSnapshot/generate.rsp +++ b/generation/um/ProcessSnapshot/generate.rsp @@ -7,7 +7,7 @@ um-ProcessSnapshot.h --test-output ../../../tests/Interop/Windows/um/ProcessSnapshot --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h --with-attribute PSS_CAPTURE_FLAGS=Flags PSS_DUPLICATE_FLAGS=Flags diff --git a/generation/um/ProcessSnapshot/header.txt b/generation/um/ProcessSnapshot/header.txt index fa03b96f06..db9dc3a69a 100644 --- a/generation/um/ProcessSnapshot/header.txt +++ b/generation/um/ProcessSnapshot/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/Psapi/generate.rsp b/generation/um/Psapi/generate.rsp index 1b9de78416..0602b73453 100644 --- a/generation/um/Psapi/generate.rsp +++ b/generation/um/Psapi/generate.rsp @@ -7,7 +7,7 @@ um-Psapi.h --test-output ../../../tests/Interop/Windows/um/Psapi --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/Psapi.h --with-getlasterror K32EmptyWorkingSet K32EnumDeviceDrivers diff --git a/generation/um/Psapi/header.txt b/generation/um/Psapi/header.txt index f9a0dc13b2..36aa1b1bb5 100644 --- a/generation/um/Psapi/header.txt +++ b/generation/um/Psapi/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/RestartManager/generate.rsp b/generation/um/RestartManager/generate.rsp index 12f183398c..9b8e55a3a1 100644 --- a/generation/um/RestartManager/generate.rsp +++ b/generation/um/RestartManager/generate.rsp @@ -7,7 +7,7 @@ um-RestartManager.h --test-output ../../../tests/Interop/Windows/um/RestartManager --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/RestartManager.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/RestartManager.h --with-attribute RM_APP_STATUS=Flags RM_REBOOT_REASON=Flags diff --git a/generation/um/RestartManager/header.txt b/generation/um/RestartManager/header.txt index b08de30022..58dff051d6 100644 --- a/generation/um/RestartManager/header.txt +++ b/generation/um/RestartManager/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/ShellScalingApi/generate.rsp b/generation/um/ShellScalingApi/generate.rsp index 24742c2df6..3a8697f963 100644 --- a/generation/um/ShellScalingApi/generate.rsp +++ b/generation/um/ShellScalingApi/generate.rsp @@ -7,7 +7,7 @@ um-ShellScalingApi.h --test-output ../../../tests/Interop/Windows/um/ShellScalingApi --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ShellScalingApi.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ShellScalingApi.h --with-attribute SCALE_CHANGE_FLAGS=Flags --with-librarypath diff --git a/generation/um/ShellScalingApi/header.txt b/generation/um/ShellScalingApi/header.txt index 9307f073cd..af24a43197 100644 --- a/generation/um/ShellScalingApi/header.txt +++ b/generation/um/ShellScalingApi/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/XblIdpAuthManager/generate.rsp b/generation/um/XblIdpAuthManager/generate.rsp index 612418c222..cb134e33ab 100644 --- a/generation/um/XblIdpAuthManager/generate.rsp +++ b/generation/um/XblIdpAuthManager/generate.rsp @@ -7,4 +7,4 @@ um-XblIdpAuthManager.h --test-output ../../../tests/Interop/Windows/um/XblIdpAuthManager --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/XblIdpAuthManager.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/XblIdpAuthManager.h diff --git a/generation/um/XblIdpAuthManager/header.txt b/generation/um/XblIdpAuthManager/header.txt index b11b79207d..867668d89d 100644 --- a/generation/um/XblIdpAuthManager/header.txt +++ b/generation/um/XblIdpAuthManager/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/compressapi/generate.rsp b/generation/um/compressapi/generate.rsp index 767394524e..775ee92bff 100644 --- a/generation/um/compressapi/generate.rsp +++ b/generation/um/compressapi/generate.rsp @@ -7,6 +7,6 @@ um-compressapi.h --test-output ../../../tests/Interop/Windows/um/compressapi --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/compressapi.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/compressapi.h --with-librarypath *=cabinet diff --git a/generation/um/compressapi/header.txt b/generation/um/compressapi/header.txt index 61c15d0401..dd10a3c9ac 100644 --- a/generation/um/compressapi/header.txt +++ b/generation/um/compressapi/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/davclnt/generate.rsp b/generation/um/davclnt/generate.rsp index 160a06f492..5e4178c259 100644 --- a/generation/um/davclnt/generate.rsp +++ b/generation/um/davclnt/generate.rsp @@ -7,7 +7,7 @@ um-davclnt.h --test-output ../../../tests/Interop/Windows/um/davclnt --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/davclnt.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/davclnt.h --with-librarypath DavAddConnection=netapi32 DavCancelConnectionsToServer=davclnt diff --git a/generation/um/davclnt/header.txt b/generation/um/davclnt/header.txt index c53a626883..cee7315679 100644 --- a/generation/um/davclnt/header.txt +++ b/generation/um/davclnt/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/ddpbackup/generate.rsp b/generation/um/ddpbackup/generate.rsp index 112c163fda..ea82130828 100644 --- a/generation/um/ddpbackup/generate.rsp +++ b/generation/um/ddpbackup/generate.rsp @@ -7,4 +7,4 @@ um-ddpbackup.h --test-output ../../../tests/Interop/Windows/um/ddpbackup --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ddpbackup.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ddpbackup.h diff --git a/generation/um/ddpbackup/header.txt b/generation/um/ddpbackup/header.txt index 9f03ff4db0..b4bc77dfbb 100644 --- a/generation/um/ddpbackup/header.txt +++ b/generation/um/ddpbackup/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/gamingtcui/generate.rsp b/generation/um/gamingtcui/generate.rsp index d901f49571..0f31385c1a 100644 --- a/generation/um/gamingtcui/generate.rsp +++ b/generation/um/gamingtcui/generate.rsp @@ -7,6 +7,6 @@ um-gamingtcui.h --test-output ../../../tests/Interop/Windows/um/gamingtcui --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/gamingtcui.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/gamingtcui.h --with-librarypath *=gamingtcui diff --git a/generation/um/gamingtcui/header.txt b/generation/um/gamingtcui/header.txt index b1a9d68733..512d8ffb13 100644 --- a/generation/um/gamingtcui/header.txt +++ b/generation/um/gamingtcui/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/manipulations/generate.rsp b/generation/um/manipulations/generate.rsp index 82cf22ec6c..1dc5a2a382 100644 --- a/generation/um/manipulations/generate.rsp +++ b/generation/um/manipulations/generate.rsp @@ -7,7 +7,7 @@ um-manipulations.h --test-output ../../../tests/Interop/Windows/um/manipulations --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/manipulations.h -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/manipulations_i.c +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/manipulations.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/manipulations_i.c --with-attribute MANIPULATION_PROCESSOR_MANIPULATIONS=Flags diff --git a/generation/um/manipulations/header.txt b/generation/um/manipulations/header.txt index 9c1c14b1a5..816fac36e5 100644 --- a/generation/um/manipulations/header.txt +++ b/generation/um/manipulations/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/msports/generate.rsp b/generation/um/msports/generate.rsp index caa3fd93ce..dc0ea38bb6 100644 --- a/generation/um/msports/generate.rsp +++ b/generation/um/msports/generate.rsp @@ -9,6 +9,6 @@ um-msports.h --test-output ../../../tests/Interop/Windows/um/msports --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/msports.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/msports.h --with-librarypath *=msports diff --git a/generation/um/msports/header.txt b/generation/um/msports/header.txt index 01e28fe023..3a39017668 100644 --- a/generation/um/msports/header.txt +++ b/generation/um/msports/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/msports.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/msports.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/oobenotification/generate.rsp b/generation/um/oobenotification/generate.rsp index 375f8ffe0c..9417a6c8e3 100644 --- a/generation/um/oobenotification/generate.rsp +++ b/generation/um/oobenotification/generate.rsp @@ -7,6 +7,6 @@ um-oobenotification.h --test-output ../../../tests/Interop/Windows/um/oobenotification --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/oobenotification.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/oobenotification.h --with-librarypath *=kernel32 diff --git a/generation/um/oobenotification/header.txt b/generation/um/oobenotification/header.txt index b9a9c4afde..9975f9443f 100644 --- a/generation/um/oobenotification/header.txt +++ b/generation/um/oobenotification/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/oobenotification.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/oobenotification.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/rendezvoussession/generate.rsp b/generation/um/rendezvoussession/generate.rsp index e0158c4bf7..113de76f5e 100644 --- a/generation/um/rendezvoussession/generate.rsp +++ b/generation/um/rendezvoussession/generate.rsp @@ -7,7 +7,7 @@ um-rendezvoussession.h --test-output ../../../tests/Interop/Windows/um/rendezvoussession --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/rendezvoussession.h -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/rendezvoussession_i.c +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/rendezvoussession.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/rendezvoussession_i.c --with-attribute RENDEZVOUS_SESSION_FLAGS=Flags diff --git a/generation/um/rendezvoussession/header.txt b/generation/um/rendezvoussession/header.txt index 43e29d18fc..9e59138705 100644 --- a/generation/um/rendezvoussession/header.txt +++ b/generation/um/rendezvoussession/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/shtypes/generate.rsp b/generation/um/shtypes/generate.rsp index e1c1fa9db3..14196f51db 100644 --- a/generation/um/shtypes/generate.rsp +++ b/generation/um/shtypes/generate.rsp @@ -9,6 +9,6 @@ um-shtypes.h --test-output ../../../tests/Interop/Windows/um/shtypes --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/shtypes.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/shtypes.h --with-attribute SHCOLSTATE=Flags diff --git a/generation/um/shtypes/header.txt b/generation/um/shtypes/header.txt index 12a47b416c..c54934cfa0 100644 --- a/generation/um/shtypes/header.txt +++ b/generation/um/shtypes/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/shtypes.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/swdevice/generate.rsp b/generation/um/swdevice/generate.rsp index 057be2599a..d63bba8286 100644 --- a/generation/um/swdevice/generate.rsp +++ b/generation/um/swdevice/generate.rsp @@ -7,6 +7,6 @@ um-swdevice.h --test-output ../../../tests/Interop/Windows/um/swdevice --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/swdevice.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/swdevice.h --with-librarypath *=cfgmgr32 diff --git a/generation/um/swdevice/header.txt b/generation/um/swdevice/header.txt index 65db6a09b4..10deb2c5a5 100644 --- a/generation/um/swdevice/header.txt +++ b/generation/um/swdevice/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/swdevice.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/swdevice.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/swdevicedef/generate.rsp b/generation/um/swdevicedef/generate.rsp index 3c6e21a64d..71877f5196 100644 --- a/generation/um/swdevicedef/generate.rsp +++ b/generation/um/swdevicedef/generate.rsp @@ -7,6 +7,6 @@ um-swdevicedef.h --test-output ../../../tests/Interop/Windows/um/swdevicedef --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/swdevicedef.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/swdevicedef.h --with-attribute SW_DEVICE_CAPABILITIES=Flags diff --git a/generation/um/swdevicedef/header.txt b/generation/um/swdevicedef/header.txt index 0454fd9326..757dd92a9b 100644 --- a/generation/um/swdevicedef/header.txt +++ b/generation/um/swdevicedef/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/wcmapi/generate.rsp b/generation/um/wcmapi/generate.rsp index e56858b001..25f17e9ba6 100644 --- a/generation/um/wcmapi/generate.rsp +++ b/generation/um/wcmapi/generate.rsp @@ -7,7 +7,7 @@ um-wcmapi.h --test-output ../../../tests/Interop/Windows/um/wcmapi --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/wcmapi.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/wcmapi.h --with-attribute WCM_CONNECTION_COST=Flags --with-librarypath diff --git a/generation/um/wcmapi/header.txt b/generation/um/wcmapi/header.txt index 5b8f029cf6..9f3b0417ad 100644 --- a/generation/um/wcmapi/header.txt +++ b/generation/um/wcmapi/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/winrt/DocumentSource/generate.rsp b/generation/winrt/DocumentSource/generate.rsp index e75dd8426c..7c3f26a878 100644 --- a/generation/winrt/DocumentSource/generate.rsp +++ b/generation/winrt/DocumentSource/generate.rsp @@ -7,4 +7,4 @@ winrt-DocumentSource.h --test-output ../../../tests/Interop/Windows/winrt/DocumentSource --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt/DocumentSource.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/winrt/DocumentSource.h diff --git a/generation/winrt/DocumentSource/header.txt b/generation/winrt/DocumentSource/header.txt index 99f64865ec..9474b8853b 100644 --- a/generation/winrt/DocumentSource/header.txt +++ b/generation/winrt/DocumentSource/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/winrt/MessageDispatcherApi/generate.rsp b/generation/winrt/MessageDispatcherApi/generate.rsp index f0fa2a8318..bce8f5e022 100644 --- a/generation/winrt/MessageDispatcherApi/generate.rsp +++ b/generation/winrt/MessageDispatcherApi/generate.rsp @@ -7,6 +7,6 @@ winrt-MessageDispatcherApi.h --test-output ../../../tests/Interop/Windows/winrt/MessageDispatcherApi --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt/MessageDispatcherApi.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/winrt/MessageDispatcherApi.h --with-librarypath *=ole32 diff --git a/generation/winrt/MessageDispatcherApi/header.txt b/generation/winrt/MessageDispatcherApi/header.txt index 6d02b2b4a5..085a4b95aa 100644 --- a/generation/winrt/MessageDispatcherApi/header.txt +++ b/generation/winrt/MessageDispatcherApi/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/MessageDispatcherApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/MessageDispatcherApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/winrt/Wsdevlicensing/generate.rsp b/generation/winrt/Wsdevlicensing/generate.rsp index f5866ec9b9..3afad7563c 100644 --- a/generation/winrt/Wsdevlicensing/generate.rsp +++ b/generation/winrt/Wsdevlicensing/generate.rsp @@ -7,6 +7,6 @@ winrt-Wsdevlicensing.h --test-output ../../../tests/Interop/Windows/winrt/Wsdevlicensing --traverse -C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt/Wsdevlicensing.h +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/winrt/Wsdevlicensing.h --with-librarypath *=wsclient diff --git a/generation/winrt/Wsdevlicensing/header.txt b/generation/winrt/Wsdevlicensing/header.txt index 608b4cba4f..296df3e544 100644 --- a/generation/winrt/Wsdevlicensing/header.txt +++ b/generation/winrt/Wsdevlicensing/header.txt @@ -1,4 +1,4 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/Wsdevlicensing.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/Wsdevlicensing.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. From 3a70e303f29ef4a573da4eba058b208d8fa73a5e Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 10 Oct 2021 19:09:33 -0400 Subject: [PATCH 33/36] Fix botched merge --- TerraFX.Interop.Windows.sln | 2 -- 1 file changed, 2 deletions(-) diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index ea06cc5115..80e61eaa04 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -1905,7 +1905,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DocumentSource", "DocumentS generation\winrt\DocumentSource\winrt-DocumentSource.h = generation\winrt\DocumentSource\winrt-DocumentSource.h EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shtypes", "shtypes", "{8FE8531C-3DE6-4015-904C-853AF211050C}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "appmgmt", "appmgmt", "{33B327CA-5D79-4439-A103-2293D33D5D54}" ProjectSection(SolutionItems) = preProject generation\um\appmgmt\generate.rsp = generation\um\appmgmt\generate.rsp @@ -2606,7 +2605,6 @@ Global {84673C32-22B3-49EC-8CF3-BE5A9FEDA5EB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C763A292-7CAB-4848-80B0-151D9A58591F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {173278D7-E38F-4DE6-853E-FF76BC4AAF81} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} - {8FE8531C-3DE6-4015-904C-853AF211050C} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2DACC2E6-8B04-448D-9780-1CB4C9BDD7EF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {A68F348B-DDA4-4B37-85E2-F0936FB0ACAA} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {611800BA-4A44-4D89-8A5F-89B3926AA7DF} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} From dd74b39b87412c6fb7cba4f65c13f81dd8ebeebc Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 10 Oct 2021 19:14:33 -0400 Subject: [PATCH 34/36] Fix another incorrect merge --- generation/remap.rsp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/generation/remap.rsp b/generation/remap.rsp index 4c90898f0d..1d0b9262fa 100644 --- a/generation/remap.rsp +++ b/generation/remap.rsp @@ -1887,12 +1887,6 @@ _CYPHER_BLOCK=CYPHER_BLOCK _DAV_CALLBACK_AUTH_BLOB=DAV_CALLBACK_AUTH_BLOB _DAV_CALLBACK_AUTH_UNP=DAV_CALLBACK_AUTH_UNP _DAV_CALLBACK_CRED=DAV_CALLBACK_CRED -_D3D10_SHADER_BUFFER_DESC=D3D10_SHADER_BUFFER_DESC -_D3D10_SHADER_DESC=D3D10_SHADER_DESC -_D3D10_SHADER_INPUT_BIND_DESC=D3D10_SHADER_INPUT_BIND_DESC -_D3D10_SHADER_TYPE_DESC=D3D10_SHADER_TYPE_DESC -_D3D10_SHADER_VARIABLE_DESC=D3D10_SHADER_VARIABLE_DESC -_D3D10_SIGNATURE_PARAMETER_DESC=D3D10_SIGNATURE_PARAMETER_DESC _D3D10_DEVICE_STATE_TYPES=D3D10_DEVICE_STATE_TYPES _D3D10_EFFECT_DESC=D3D10_EFFECT_DESC _D3D10_EFFECT_SHADER_DESC=D3D10_EFFECT_SHADER_DESC From df7f91c0259b3303a37b746c4e2ade0d4a228a1d Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 10 Oct 2021 20:57:41 -0400 Subject: [PATCH 35/36] Regenerate --- .../Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs | 2 +- .../Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs | 6 +- .../Windows/shared/tbs/TPM_DEVICE_INFO.cs | 2 +- .../shared/tbs/TPM_WNF_PROVISIONING.cs | 2 +- sources/Interop/Windows/shared/tbs/Windows.cs | 2 +- .../EC_SUBSCRIPTION_CONFIGURATION_MODE.cs | 2 +- .../EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs | 2 +- .../EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs | 2 +- .../EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs | 2 +- .../um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs | 2 +- ...BSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs | 2 +- .../EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs | 2 +- .../Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs | 2 +- .../Interop/Windows/um/EvColl/EC_VARIANT.cs | 16 +- .../Windows/um/EvColl/EC_VARIANT_TYPE.cs | 2 +- sources/Interop/Windows/um/EvColl/Windows.cs | 2 +- .../Interop/Windows/um/IContact/Contact.cs | 2 +- .../Windows/um/IContact/ContactManager.cs | 2 +- .../Interop/Windows/um/IContact/IContact.cs | 11 +- .../Windows/um/IContact/IContactCollection.cs | 13 +- .../Windows/um/IContact/IContactManager.cs | 22 ++- .../Windows/um/IContact/IContactProperties.cs | 29 ++- .../um/IContact/IContactPropertyCollection.cs | 17 +- .../Interop/Windows/um/IContact/Windows.cs | 166 +++++++++++++++++- .../IMessageDispatcher/IMessageDispatcher.cs | 14 +- .../Windows/um/IMessageDispatcher/Windows.cs | 28 ++- .../um/InkPresenterDesktop/Windows.Manual.cs | 37 ---- .../Windows/um/InkPresenterDesktop/Windows.cs | 35 ++++ .../IIsolatedAppLauncher.cs | 9 +- .../IsolatedAppLauncher.cs | 2 +- .../IsolatedAppLauncherTelemetryParameters.cs | 2 +- .../Windows/um/IsolatedAppLauncher/Windows.cs | 50 +++++- .../MANAGEMENT_REGISTRATION_INFO.cs | 2 +- .../MANAGEMENT_SERVICE_INFO.cs | 2 +- .../REGISTRATION_INFORMATION_CLASS.cs | 2 +- .../Windows/um/MDMRegistration/Windows.cs | 112 +----------- .../Windows/um/MSChapp/CYPHER_BLOCK.cs | 2 +- .../um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs | 2 +- .../Windows/um/MSChapp/LM_OWF_PASSWORD.cs | 2 +- .../MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs | 2 +- sources/Interop/Windows/um/MSChapp/Windows.cs | 6 +- .../INotificationActivationCallback.cs | 9 +- .../NOTIFICATION_USER_INPUT_DATA.cs | 2 +- .../NotificationActivationCallback/Windows.cs | 28 ++- .../um/ProcessSnapshot/PSS_ALLOCATOR.cs | 3 +- .../PSS_AUXILIARY_PAGES_INFORMATION.cs | 2 +- .../PSS_AUXILIARY_PAGE_ENTRY.cs | 4 +- .../um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs | 2 +- .../um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs | 2 +- .../um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs | 20 +-- .../um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs | 2 +- .../ProcessSnapshot/PSS_HANDLE_INFORMATION.cs | 2 +- .../PSS_HANDLE_TRACE_INFORMATION.cs | 2 +- .../um/ProcessSnapshot/PSS_OBJECT_TYPE.cs | 2 +- .../PSS_PERFORMANCE_COUNTERS.cs | 2 +- .../um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs | 2 +- .../PSS_PROCESS_INFORMATION.cs | 3 +- .../PSS_QUERY_INFORMATION_CLASS.cs | 2 +- .../um/ProcessSnapshot/PSS_THREAD_ENTRY.cs | 5 +- .../um/ProcessSnapshot/PSS_THREAD_FLAGS.cs | 2 +- .../ProcessSnapshot/PSS_THREAD_INFORMATION.cs | 2 +- .../PSS_VA_CLONE_INFORMATION.cs | 2 +- .../um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs | 5 +- .../PSS_VA_SPACE_INFORMATION.cs | 2 +- .../PSS_WALK_INFORMATION_CLASS.cs | 2 +- .../Windows/um/ProcessSnapshot/Windows.cs | 6 +- .../um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs | 2 +- .../Interop/Windows/um/Psapi/MODULEINFO.cs | 2 +- .../um/Psapi/PERFORMANCE_INFORMATION.cs | 2 +- .../um/Psapi/PROCESS_MEMORY_COUNTERS.cs | 2 +- .../um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs | 2 +- .../um/Psapi/PSAPI_WORKING_SET_BLOCK.cs | 4 +- .../um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs | 8 +- .../Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs | 2 +- .../um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs | 2 +- .../um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs | 2 +- .../um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs | 2 +- sources/Interop/Windows/um/Psapi/Windows.cs | 94 +++++----- .../um/RestartManager/RM_APP_STATUS.cs | 2 +- .../Windows/um/RestartManager/RM_APP_TYPE.cs | 2 +- .../um/RestartManager/RM_FILTER_ACTION.cs | 2 +- .../um/RestartManager/RM_FILTER_INFO.cs | 4 +- .../um/RestartManager/RM_FILTER_TRIGGER.cs | 2 +- .../um/RestartManager/RM_PROCESS_INFO.cs | 2 +- .../um/RestartManager/RM_REBOOT_REASON.cs | 2 +- .../um/RestartManager/RM_SHUTDOWN_TYPE.cs | 2 +- .../um/RestartManager/RM_UNIQUE_PROCESS.cs | 2 +- .../Windows/um/RestartManager/Windows.cs | 10 +- .../Windows/um/ShObjIdl_core/Windows.cs | 19 +- .../um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs | 2 +- .../um/ShellScalingApi/MONITOR_DPI_TYPE.cs | 2 +- .../ShellScalingApi/PROCESS_DPI_AWARENESS.cs | 2 +- .../um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs | 2 +- .../um/ShellScalingApi/SHELL_UI_COMPONENT.cs | 2 +- .../Windows/um/ShellScalingApi/Windows.cs | 6 +- .../WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE.cs | 2 + ...RNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs | 2 + .../WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE.cs | 2 + ...RNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs | 2 + .../XblIdpAuthManager/IXblIdpAuthManager.cs | 16 +- .../IXblIdpAuthTokenResult.cs | 30 +++- .../IXblIdpAuthTokenResult2.cs | 11 +- .../Windows/um/XblIdpAuthManager/Windows.cs | 120 ++++++++++++- .../XBL_IDP_AUTH_TOKEN_STATUS.cs | 2 +- .../um/XblIdpAuthManager/XblIdpAuthManager.cs | 2 +- .../XblIdpAuthTokenResult.cs | 2 +- .../COMPRESS_ALLOCATION_ROUTINES.cs | 2 +- .../compressapi/COMPRESS_INFORMATION_CLASS.cs | 2 +- .../Interop/Windows/um/compressapi/Windows.cs | 2 +- .../Windows/um/davclnt/AUTHNEXTSTEP.cs | 2 +- .../um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs | 2 +- .../um/davclnt/DAV_CALLBACK_AUTH_UNP.cs | 2 +- .../Windows/um/davclnt/DAV_CALLBACK_CRED.cs | 2 +- sources/Interop/Windows/um/davclnt/Windows.cs | 2 +- .../Windows/um/dcommon/D2D_MATRIX_3X2_F.cs | 2 +- .../Windows/um/dcommon/D2D_MATRIX_4X3_F.cs | 2 +- .../Windows/um/dcommon/D2D_MATRIX_4X4_F.cs | 2 +- .../Windows/um/dcommon/D2D_MATRIX_5X4_F.cs | 2 +- .../Windows/um/ddpbackup/DDP_FILE_EXTENT.cs | 2 +- .../DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs | 2 +- .../um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs | 2 +- .../um/ddpbackup/DedupBackupSupport.cs | 2 +- .../um/ddpbackup/IDedupBackupSupport.cs | 11 +- .../um/ddpbackup/IDedupReadFileCallback.cs | 15 +- .../Interop/Windows/um/ddpbackup/Windows.cs | 74 +++++++- .../um/gamingtcui/KnownGamingPrivileges.cs | 2 +- .../Interop/Windows/um/gamingtcui/Windows.cs | 48 ++--- .../Windows/um/inkrenderer/Windows.Manual.cs | 37 ---- .../Interop/Windows/um/inkrenderer/Windows.cs | 31 ++++ .../um/manipulations/IInertiaProcessor.cs | 57 +++++- .../manipulations/IManipulationProcessor.cs | 31 +++- .../um/manipulations/InertiaProcessor.cs | 2 +- .../MANIPULATION_PROCESSOR_MANIPULATIONS.cs | 2 +- .../um/manipulations/ManipulationProcessor.cs | 2 +- .../Windows/um/manipulations/Windows.cs | 149 +++++++++++++++- .../um/manipulations/_IManipulationEvents.cs | 11 +- sources/Interop/Windows/um/msports/Windows.cs | 4 +- .../Windows/um/oobenotification/Windows.cs | 2 +- .../DRendezvousSessionEvents.cs | 16 +- .../IRendezvousApplication.cs | 11 +- .../rendezvoussession/IRendezvousSession.cs | 15 +- .../RENDEZVOUS_SESSION_FLAGS.cs | 2 +- .../RENDEZVOUS_SESSION_STATE.cs | 2 +- .../RendezvousApplication.cs | 2 +- .../Windows/um/rendezvoussession/Windows.cs | 125 ++++++++++++- .../Interop/Windows/um/shtypes/SHCOLSTATE.cs | 2 + sources/Interop/Windows/um/strmif/Windows.cs | 1 + .../Interop/Windows/um/swdevice/Windows.cs | 2 +- .../um/swdevicedef/SW_DEVICE_CAPABILITIES.cs | 2 +- .../um/swdevicedef/SW_DEVICE_CREATE_INFO.cs | 2 +- .../um/swdevicedef/SW_DEVICE_LIFETIME.cs | 2 +- .../um/wcmapi/WCM_BILLING_CYCLE_INFO.cs | 2 +- .../Windows/um/wcmapi/WCM_CONNECTION_COST.cs | 2 +- .../um/wcmapi/WCM_CONNECTION_COST_DATA.cs | 2 +- .../um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs | 2 +- .../Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs | 2 +- .../Windows/um/wcmapi/WCM_MEDIA_TYPE.cs | 2 +- .../Windows/um/wcmapi/WCM_POLICY_VALUE.cs | 2 +- .../Windows/um/wcmapi/WCM_PROFILE_INFO.cs | 2 +- .../um/wcmapi/WCM_PROFILE_INFO_LIST.cs | 2 +- .../Interop/Windows/um/wcmapi/WCM_PROPERTY.cs | 2 +- .../Windows/um/wcmapi/WCM_TIME_INTERVAL.cs | 2 +- .../Windows/um/wcmapi/WCM_USAGE_DATA.cs | 2 +- sources/Interop/Windows/um/wcmapi/Windows.cs | 12 +- .../IPrintDocumentPageSource.cs | 14 +- .../IPrintPreviewPageCollection.cs | 12 +- .../Windows/winrt/DocumentSource/Windows.cs | 51 +++++- .../winrt/MessageDispatcherApi/Windows.cs | 2 +- .../Windows/winrt/Wsdevlicensing/Windows.cs | 6 +- .../shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs | 2 +- .../shared/tbs/TBS_CONTEXT_PARAMSTests.cs | 2 +- .../shared/tbs/TPM_DEVICE_INFOTests.cs | 2 +- .../shared/tbs/TPM_WNF_PROVISIONINGTests.cs | 2 +- .../Windows/um/EvColl/EC_VARIANTTests.cs | 2 +- .../um/IContact/ContactManagerTests.cs | 2 +- .../Windows/um/IContact/ContactTests.cs | 2 +- .../um/IContact/IContactCollectionTests.cs | 2 +- .../um/IContact/IContactManagerTests.cs | 2 +- .../um/IContact/IContactPropertiesTests.cs | 2 +- .../IContactPropertyCollectionTests.cs | 2 +- .../Windows/um/IContact/IContactTests.cs | 2 +- .../IMessageDispatcherTests.cs | 2 +- .../um/InkPresenterDesktop/WindowsTests.cs | 57 ++++++ .../IIsolatedAppLauncherTests.cs | 2 +- ...atedAppLauncherTelemetryParametersTests.cs | 2 +- .../IsolatedAppLauncherTests.cs | 2 +- .../MANAGEMENT_REGISTRATION_INFOTests.cs | 2 +- .../MANAGEMENT_SERVICE_INFOTests.cs | 2 +- .../Windows/um/MSChapp/CYPHER_BLOCKTests.cs | 2 +- .../MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs | 2 +- .../um/MSChapp/LM_OWF_PASSWORDTests.cs | 2 +- .../SAMPR_ENCRYPTED_USER_PASSWORDTests.cs | 2 +- .../INotificationActivationCallbackTests.cs | 2 +- .../NOTIFICATION_USER_INPUT_DATATests.cs | 2 +- .../um/ProcessSnapshot/PSS_ALLOCATORTests.cs | 2 +- .../PSS_AUXILIARY_PAGES_INFORMATIONTests.cs | 2 +- .../PSS_AUXILIARY_PAGE_ENTRYTests.cs | 2 +- .../ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs | 2 +- .../PSS_HANDLE_INFORMATIONTests.cs | 2 +- .../PSS_HANDLE_TRACE_INFORMATIONTests.cs | 2 +- .../PSS_PERFORMANCE_COUNTERSTests.cs | 2 +- .../PSS_PROCESS_INFORMATIONTests.cs | 2 +- .../ProcessSnapshot/PSS_THREAD_ENTRYTests.cs | 2 +- .../PSS_THREAD_INFORMATIONTests.cs | 2 +- .../PSS_VA_CLONE_INFORMATIONTests.cs | 2 +- .../PSS_VA_SPACE_ENTRYTests.cs | 2 +- .../PSS_VA_SPACE_INFORMATIONTests.cs | 2 +- .../Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs | 2 +- .../Windows/um/Psapi/MODULEINFOTests.cs | 2 +- .../um/Psapi/PERFORMANCE_INFORMATIONTests.cs | 2 +- .../um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs | 2 +- .../Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs | 2 +- .../um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs | 2 +- .../Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs | 2 +- .../PSAPI_WORKING_SET_EX_INFORMATIONTests.cs | 2 +- .../PSAPI_WORKING_SET_INFORMATIONTests.cs | 2 +- .../Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs | 2 +- .../PSAPI_WS_WATCH_INFORMATION_EXTests.cs | 2 +- .../um/RestartManager/RM_FILTER_INFOTests.cs | 2 +- .../um/RestartManager/RM_PROCESS_INFOTests.cs | 2 +- .../RestartManager/RM_UNIQUE_PROCESSTests.cs | 2 +- .../IXblIdpAuthManagerTests.cs | 2 +- .../IXblIdpAuthTokenResult2Tests.cs | 2 +- .../IXblIdpAuthTokenResultTests.cs | 2 +- .../XblIdpAuthManagerTests.cs | 2 +- .../XblIdpAuthTokenResultTests.cs | 2 +- .../COMPRESS_ALLOCATION_ROUTINESTests.cs | 2 +- .../d2d1/D2D1_BITMAP_BRUSH_PROPERTIESTests.cs | 12 -- .../um/d2d1/D2D1_BITMAP_PROPERTIESTests.cs | 10 -- .../um/d2d1/D2D1_BRUSH_PROPERTIESTests.cs | 9 - .../D2D1_DRAWING_STATE_DESCRIPTIONTests.cs | 15 -- .../um/d2d1/D2D1_LAYER_PARAMETERSTests.cs | 17 -- .../D2D1_RENDER_TARGET_PROPERTIESTests.cs | 16 -- .../d2d1/D2D1_STROKE_STYLE_PROPERTIESTests.cs | 17 -- .../D2D1_BITMAP_BRUSH_PROPERTIES1Tests.cs | 13 -- .../um/d2d1_1/D2D1_BITMAP_PROPERTIES1Tests.cs | 13 -- .../D2D1_DRAWING_STATE_DESCRIPTION1Tests.cs | 19 -- .../um/d2d1_1/D2D1_LAYER_PARAMETERS1Tests.cs | 17 -- .../D2D1_PRINT_CONTROL_PROPERTIESTests.cs | 12 -- .../D2D1_STROKE_STYLE_PROPERTIES1Tests.cs | 19 -- .../Windows/um/d3d11/D3D11_BLEND_DESCTests.cs | 18 -- .../d3d11/D3D11_DEPTH_STENCILOP_DESCTests.cs | 13 -- .../um/d3d11/D3D11_DEPTH_STENCIL_DESCTests.cs | 18 -- .../um/d3d11/D3D11_RASTERIZER_DESCTests.cs | 20 --- .../D3D11_RENDER_TARGET_BLEND_DESCTests.cs | 19 -- .../um/d3d11/D3D11_SAMPLER_DESCTests.cs | 23 --- .../um/d3d11_1/D3D11_BLEND_DESC1Tests.cs | 18 -- .../um/d3d11_1/D3D11_RASTERIZER_DESC1Tests.cs | 21 --- .../D3D11_RENDER_TARGET_BLEND_DESC1Tests.cs | 22 --- .../um/d3d11_3/D3D11_RASTERIZER_DESC2Tests.cs | 23 --- .../um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs | 2 +- .../um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs | 2 +- .../um/davclnt/DAV_CALLBACK_CREDTests.cs | 2 +- .../um/dcommon/D2D1_PIXEL_FORMATTests.cs | 11 -- .../um/dcommon/D2D_MATRIX_3X2_FTests.cs | 13 -- .../um/dcommon/D2D_MATRIX_4X3_FTests.cs | 19 -- .../um/dcommon/D2D_MATRIX_4X4_FTests.cs | 23 --- .../um/dcommon/D2D_MATRIX_5X4_FTests.cs | 31 ---- .../Windows/um/dcommon/D2D_RECT_FTests.cs | 12 -- .../um/ddpbackup/DDP_FILE_EXTENTTests.cs | 2 +- .../ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs | 2 +- .../um/ddpbackup/DedupBackupSupportTests.cs | 2 +- .../um/ddpbackup/IDedupBackupSupportTests.cs | 2 +- .../ddpbackup/IDedupReadFileCallbackTests.cs | 2 +- .../Windows/um/inkrenderer/WindowsTests.cs | 43 +++++ .../manipulations/IInertiaProcessorTests.cs | 2 +- .../IManipulationProcessorTests.cs | 2 +- .../um/manipulations/InertiaProcessorTests.cs | 2 +- .../ManipulationProcessorTests.cs | 2 +- .../Windows/um/manipulations/WindowsTests.cs | 57 ++++++ .../_IManipulationEventsTests.cs | 2 +- .../DRendezvousSessionEventsTests.cs | 2 +- .../IRendezvousApplicationTests.cs | 2 +- .../IRendezvousSessionTests.cs | 2 +- .../RendezvousApplicationTests.cs | 2 +- .../um/rendezvoussession/WindowsTests.cs | 50 ++++++ .../swdevicedef/SW_DEVICE_CREATE_INFOTests.cs | 2 +- .../um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs | 2 +- .../wcmapi/WCM_CONNECTION_COST_DATATests.cs | 2 +- .../um/wcmapi/WCM_DATAPLAN_STATUSTests.cs | 2 +- .../um/wcmapi/WCM_POLICY_VALUETests.cs | 2 +- .../um/wcmapi/WCM_PROFILE_INFOTests.cs | 2 +- .../um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs | 2 +- .../um/wcmapi/WCM_TIME_INTERVALTests.cs | 2 +- .../Windows/um/wcmapi/WCM_USAGE_DATATests.cs | 2 +- .../windows.data.pdf.interop/WindowsTests.cs | 1 + .../Windows/um/x3daudio/WindowsTests.cs | 1 + .../IPrintDocumentPageSourceTests.cs | 2 +- .../IPrintPreviewPageCollectionTests.cs | 2 +- 289 files changed, 1669 insertions(+), 1134 deletions(-) delete mode 100644 sources/Interop/Windows/um/InkPresenterDesktop/Windows.Manual.cs delete mode 100644 sources/Interop/Windows/um/inkrenderer/Windows.Manual.cs create mode 100644 tests/Interop/Windows/um/InkPresenterDesktop/WindowsTests.cs create mode 100644 tests/Interop/Windows/um/inkrenderer/WindowsTests.cs create mode 100644 tests/Interop/Windows/um/manipulations/WindowsTests.cs create mode 100644 tests/Interop/Windows/um/rendezvoussession/WindowsTests.cs diff --git a/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs index 0f7677f012..80267ba89f 100644 --- a/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs +++ b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs index 5c465896ef..512b418eb3 100644 --- a/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs +++ b/sources/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.CompilerServices; @@ -13,7 +13,7 @@ public partial struct TBS_CONTEXT_PARAMS2 [NativeTypeName("UINT32")] public uint version; - [NativeTypeName("tdTBS_CONTEXT_PARAMS2::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared/tbs.h:154:5)")] + [NativeTypeName("tdTBS_CONTEXT_PARAMS2::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/tbs.h:154:5)")] public _Anonymous_e__Union Anonymous; public uint requestRaw @@ -74,7 +74,7 @@ public ref uint asUINT32 public partial struct _Anonymous_e__Union { [FieldOffset(0)] - [NativeTypeName("tdTBS_CONTEXT_PARAMS2::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared/tbs.h:156:9)")] + [NativeTypeName("tdTBS_CONTEXT_PARAMS2::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/shared/tbs.h:156:9)")] public _Anonymous_e__Struct Anonymous; [FieldOffset(0)] diff --git a/sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs b/sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs index 0c6acfdb1d..3c678a1897 100644 --- a/sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs +++ b/sources/Interop/Windows/shared/tbs/TPM_DEVICE_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs b/sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs index 84c83a57e8..43ce6763da 100644 --- a/sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs +++ b/sources/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONING.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/shared/tbs/Windows.cs b/sources/Interop/Windows/shared/tbs/Windows.cs index fceb07496d..db5b9581b8 100644 --- a/sources/Interop/Windows/shared/tbs/Windows.cs +++ b/sources/Interop/Windows/shared/tbs/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs index 9eea34c21c..eb9d5e1768 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONFIGURATION_MODE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs index 9cf61126f3..e33303644e 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CONTENT_FORMAT.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs index 0b4a397912..f8243331f5 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_CREDENTIALS_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs index a02bb7a22b..d56a5ab29e 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_DELIVERY_MODE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs index 88aff73f60..57671b2dc1 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_PROPERTY_ID.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs index 46475bc87a..4c6b97535b 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_ACTIVE_STATUS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs index 3fd9955d89..0cea349137 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_RUNTIME_STATUS_INFO_ID.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs index f0f4ca70ad..f5b5b0ebd9 100644 --- a/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs +++ b/sources/Interop/Windows/um/EvColl/EC_SUBSCRIPTION_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/EC_VARIANT.cs b/sources/Interop/Windows/um/EvColl/EC_VARIANT.cs index f6af40ab83..e45f7ee0e3 100644 --- a/sources/Interop/Windows/um/EvColl/EC_VARIANT.cs +++ b/sources/Interop/Windows/um/EvColl/EC_VARIANT.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,9 +11,15 @@ namespace TerraFX.Interop { public unsafe partial struct EC_VARIANT { - [NativeTypeName("_EC_VARIANT::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/EvColl.h:121:5)")] + [NativeTypeName("_EC_VARIANT::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/EvColl.h:121:5)")] public _Anonymous_e__Union Anonymous; + [NativeTypeName("DWORD")] + public uint Count; + + [NativeTypeName("DWORD")] + public uint Type; + public ref int BooleanVal { [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -110,12 +116,6 @@ public ref IntPtr PropertyHandleVal } } - [NativeTypeName("DWORD")] - public uint Count; - - [NativeTypeName("DWORD")] - public uint Type; - [StructLayout(LayoutKind.Explicit)] public unsafe partial struct _Anonymous_e__Union { diff --git a/sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs b/sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs index 5510ab3e2c..e6b02a46df 100644 --- a/sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs +++ b/sources/Interop/Windows/um/EvColl/EC_VARIANT_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/EvColl/Windows.cs b/sources/Interop/Windows/um/EvColl/Windows.cs index c11ee5c1b5..acc31b68f4 100644 --- a/sources/Interop/Windows/um/EvColl/Windows.cs +++ b/sources/Interop/Windows/um/EvColl/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/IContact/Contact.cs b/sources/Interop/Windows/um/IContact/Contact.cs index 370646a871..250806743b 100644 --- a/sources/Interop/Windows/um/IContact/Contact.cs +++ b/sources/Interop/Windows/um/IContact/Contact.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/IContact/ContactManager.cs b/sources/Interop/Windows/um/IContact/ContactManager.cs index 1bd110a2ba..f243519b89 100644 --- a/sources/Interop/Windows/um/IContact/ContactManager.cs +++ b/sources/Interop/Windows/um/IContact/ContactManager.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/IContact/IContact.cs b/sources/Interop/Windows/um/IContact/IContact.cs index 2dfeb3c71c..5fa5eb712a 100644 --- a/sources/Interop/Windows/um/IContact/IContact.cs +++ b/sources/Interop/Windows/um/IContact/IContact.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("F941B671-BDA7-4F77-884A-F46462F226A7")] [NativeTypeName("struct IContact : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IContact { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IContact*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int GetContactID([NativeTypeName("LPWSTR")] ushort* pszContactID, [NativeTypeName("DWORD")] uint cchContactID, [NativeTypeName("DWORD *")] uint* pdwcchContactIDRequired) { @@ -44,6 +49,7 @@ public int GetContactID([NativeTypeName("LPWSTR")] ushort* pszContactID, [Native } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int GetPath([NativeTypeName("LPWSTR")] ushort* pszPath, [NativeTypeName("DWORD")] uint cchPath, [NativeTypeName("DWORD *")] uint* pdwcchPathRequired) { @@ -51,6 +57,7 @@ public int GetPath([NativeTypeName("LPWSTR")] ushort* pszPath, [NativeTypeName(" } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int CommitChanges([NativeTypeName("DWORD")] uint dwCommitFlags) { diff --git a/sources/Interop/Windows/um/IContact/IContactCollection.cs b/sources/Interop/Windows/um/IContact/IContactCollection.cs index a65d3cd7dc..3dc6319619 100644 --- a/sources/Interop/Windows/um/IContact/IContactCollection.cs +++ b/sources/Interop/Windows/um/IContact/IContactCollection.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("B6AFA338-D779-11D9-8BDE-F66BAD1E3F3A")] [NativeTypeName("struct IContactCollection : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IContactCollection { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IContactCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int Reset() { @@ -44,6 +49,7 @@ public int Reset() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int Next() { @@ -51,8 +57,9 @@ public int Next() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] - public int GetCurrent([NativeTypeName("IContact **")] IContact** ppContact) + public int GetCurrent(IContact** ppContact) { return ((delegate* unmanaged)(lpVtbl[5]))((IContactCollection*)Unsafe.AsPointer(ref this), ppContact); } diff --git a/sources/Interop/Windows/um/IContact/IContactManager.cs b/sources/Interop/Windows/um/IContact/IContactManager.cs index 46820b08a3..c10252fbba 100644 --- a/sources/Interop/Windows/um/IContact/IContactManager.cs +++ b/sources/Interop/Windows/um/IContact/IContactManager.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("AD553D98-DEB1-474A-8E17-FC0C2075B738")] [NativeTypeName("struct IContactManager : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IContactManager { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IContactManager*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int Initialize([NativeTypeName("LPCWSTR")] ushort* pszAppName, [NativeTypeName("LPCWSTR")] ushort* pszAppVersion) { @@ -44,13 +49,15 @@ public int Initialize([NativeTypeName("LPCWSTR")] ushort* pszAppName, [NativeTyp } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] - public int Load([NativeTypeName("LPCWSTR")] ushort* pszContactID, [NativeTypeName("IContact **")] IContact** ppContact) + public int Load([NativeTypeName("LPCWSTR")] ushort* pszContactID, IContact** ppContact) { return ((delegate* unmanaged)(lpVtbl[4]))((IContactManager*)Unsafe.AsPointer(ref this), pszContactID, ppContact); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int MergeContactIDs([NativeTypeName("LPCWSTR")] ushort* pszNewContactID, [NativeTypeName("LPCWSTR")] ushort* pszOldContactID) { @@ -58,22 +65,25 @@ public int MergeContactIDs([NativeTypeName("LPCWSTR")] ushort* pszNewContactID, } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] - public int GetMeContact([NativeTypeName("IContact **")] IContact** ppMeContact) + public int GetMeContact(IContact** ppMeContact) { return ((delegate* unmanaged)(lpVtbl[6]))((IContactManager*)Unsafe.AsPointer(ref this), ppMeContact); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] - public int SetMeContact([NativeTypeName("IContact *")] IContact* pMeContact) + public int SetMeContact(IContact* pMeContact) { return ((delegate* unmanaged)(lpVtbl[7]))((IContactManager*)Unsafe.AsPointer(ref this), pMeContact); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] [return: NativeTypeName("HRESULT")] - public int GetContactCollection([NativeTypeName("IContactCollection **")] IContactCollection** ppContactCollection) + public int GetContactCollection(IContactCollection** ppContactCollection) { return ((delegate* unmanaged)(lpVtbl[8]))((IContactManager*)Unsafe.AsPointer(ref this), ppContactCollection); } diff --git a/sources/Interop/Windows/um/IContact/IContactProperties.cs b/sources/Interop/Windows/um/IContact/IContactProperties.cs index a96e8dd73f..a3a6485aa3 100644 --- a/sources/Interop/Windows/um/IContact/IContactProperties.cs +++ b/sources/Interop/Windows/um/IContact/IContactProperties.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("70DD27DD-5CBD-46E8-BEF0-23B6B346288F")] [NativeTypeName("struct IContactProperties : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IContactProperties { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IContactProperties*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int GetString([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPWSTR")] ushort* pszValue, [NativeTypeName("DWORD")] uint cchValue, [NativeTypeName("DWORD *")] uint* pdwcchPropertyValueRequired) { @@ -44,20 +49,23 @@ public int GetString([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [Nativ } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] - public int GetDate([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("FILETIME *")] FILETIME* pftDateTime) + public int GetDate([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, FILETIME* pftDateTime) { return ((delegate* unmanaged)(lpVtbl[4]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pftDateTime); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] - public int GetBinary([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPWSTR")] ushort* pszContentType, [NativeTypeName("DWORD")] uint cchContentType, [NativeTypeName("DWORD *")] uint* pdwcchContentTypeRequired, [NativeTypeName("IStream **")] IStream** ppStream) + public int GetBinary([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPWSTR")] ushort* pszContentType, [NativeTypeName("DWORD")] uint cchContentType, [NativeTypeName("DWORD *")] uint* pdwcchContentTypeRequired, IStream** ppStream) { return ((delegate* unmanaged)(lpVtbl[5]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pszContentType, cchContentType, pdwcchContentTypeRequired, ppStream); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int GetLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPWSTR")] ushort* pszLabels, [NativeTypeName("DWORD")] uint cchLabels, [NativeTypeName("DWORD *")] uint* pdwcchLabelsRequired) { @@ -65,6 +73,7 @@ public int GetLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [N } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] public int SetString([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszValue) { @@ -72,6 +81,7 @@ public int SetString([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [Nativ } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] [return: NativeTypeName("HRESULT")] public int SetDate([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, FILETIME ftDateTime) { @@ -79,13 +89,15 @@ public int SetDate([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeT } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] [return: NativeTypeName("HRESULT")] - public int SetBinary([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszContentType, [NativeTypeName("IStream *")] IStream* pStream) + public int SetBinary([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszContentType, IStream* pStream) { return ((delegate* unmanaged)(lpVtbl[9]))((IContactProperties*)Unsafe.AsPointer(ref this), pszPropertyName, dwFlags, pszContentType, pStream); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] [return: NativeTypeName("HRESULT")] public int SetLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("DWORD")] uint dwLabelCount, [NativeTypeName("LPCWSTR []")] ushort** ppszLabels) { @@ -93,6 +105,7 @@ public int SetLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [N } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] [return: NativeTypeName("HRESULT")] public int CreateArrayNode([NativeTypeName("LPCWSTR")] ushort* pszArrayName, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("BOOL")] int fAppend, [NativeTypeName("LPWSTR")] ushort* pszNewArrayElementName, [NativeTypeName("DWORD")] uint cchNewArrayElementName, [NativeTypeName("DWORD *")] uint* pdwcchNewArrayElementNameRequired) { @@ -100,6 +113,7 @@ public int CreateArrayNode([NativeTypeName("LPCWSTR")] ushort* pszArrayName, [Na } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] [return: NativeTypeName("HRESULT")] public int DeleteProperty([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint dwFlags) { @@ -107,6 +121,7 @@ public int DeleteProperty([NativeTypeName("LPCWSTR")] ushort* pszPropertyName, [ } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] [return: NativeTypeName("HRESULT")] public int DeleteArrayNode([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags) { @@ -114,6 +129,7 @@ public int DeleteArrayNode([NativeTypeName("LPCWSTR")] ushort* pszArrayElementNa } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] [return: NativeTypeName("HRESULT")] public int DeleteLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, [NativeTypeName("DWORD")] uint dwFlags) { @@ -121,8 +137,9 @@ public int DeleteLabels([NativeTypeName("LPCWSTR")] ushort* pszArrayElementName, } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] [return: NativeTypeName("HRESULT")] - public int GetPropertyCollection([NativeTypeName("IContactPropertyCollection **")] IContactPropertyCollection** ppPropertyCollection, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszMultiValueName, [NativeTypeName("DWORD")] uint dwLabelCount, [NativeTypeName("LPCWSTR []")] ushort** ppszLabels, [NativeTypeName("BOOL")] int fAnyLabelMatches) + public int GetPropertyCollection(IContactPropertyCollection** ppPropertyCollection, [NativeTypeName("DWORD")] uint dwFlags, [NativeTypeName("LPCWSTR")] ushort* pszMultiValueName, [NativeTypeName("DWORD")] uint dwLabelCount, [NativeTypeName("LPCWSTR []")] ushort** ppszLabels, [NativeTypeName("BOOL")] int fAnyLabelMatches) { return ((delegate* unmanaged)(lpVtbl[15]))((IContactProperties*)Unsafe.AsPointer(ref this), ppPropertyCollection, dwFlags, pszMultiValueName, dwLabelCount, ppszLabels, fAnyLabelMatches); } diff --git a/sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs b/sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs index 8827ffa2f2..be4da33a72 100644 --- a/sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs +++ b/sources/Interop/Windows/um/IContact/IContactPropertyCollection.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("FFD3ADF8-FA64-4328-B1B6-2E0DB509CB3C")] [NativeTypeName("struct IContactPropertyCollection : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IContactPropertyCollection { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int Reset() { @@ -44,6 +49,7 @@ public int Reset() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int Next() { @@ -51,6 +57,7 @@ public int Next() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int GetPropertyName([NativeTypeName("LPWSTR")] ushort* pszPropertyName, [NativeTypeName("DWORD")] uint cchPropertyName, [NativeTypeName("DWORD *")] uint* pdwcchPropertyNameRequired) { @@ -58,6 +65,7 @@ public int GetPropertyName([NativeTypeName("LPWSTR")] ushort* pszPropertyName, [ } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int GetPropertyType([NativeTypeName("DWORD *")] uint* pdwType) { @@ -65,6 +73,7 @@ public int GetPropertyType([NativeTypeName("DWORD *")] uint* pdwType) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] public int GetPropertyVersion([NativeTypeName("DWORD *")] uint* pdwVersion) { @@ -72,13 +81,15 @@ public int GetPropertyVersion([NativeTypeName("DWORD *")] uint* pdwVersion) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] [return: NativeTypeName("HRESULT")] - public int GetPropertyModificationDate([NativeTypeName("FILETIME *")] FILETIME* pftModificationDate) + public int GetPropertyModificationDate(FILETIME* pftModificationDate) { return ((delegate* unmanaged)(lpVtbl[8]))((IContactPropertyCollection*)Unsafe.AsPointer(ref this), pftModificationDate); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] [return: NativeTypeName("HRESULT")] public int GetPropertyArrayElementID([NativeTypeName("LPWSTR")] ushort* pszArrayElementID, [NativeTypeName("DWORD")] uint cchArrayElementID, [NativeTypeName("DWORD *")] uint* pdwcchArrayElementIDRequired) { diff --git a/sources/Interop/Windows/um/IContact/Windows.cs b/sources/Interop/Windows/um/IContact/Windows.cs index a807bf5f77..f225f0ec77 100644 --- a/sources/Interop/Windows/um/IContact/Windows.cs +++ b/sources/Interop/Windows/um/IContact/Windows.cs @@ -1,9 +1,12 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { @@ -27,18 +30,165 @@ public static partial class Windows [NativeTypeName("#define CGD_ARRAY_NODE 0x00000008")] public const int CGD_ARRAY_NODE = 0x00000008; - public static readonly Guid IID_IContactManager = new Guid(0xAD553D98, 0xDEB1, 0x474A, 0x8E, 0x17, 0xFC, 0x0C, 0x20, 0x75, 0xB7, 0x38); + public static ref readonly Guid IID_IContactManager + { + get + { + ReadOnlySpan data = new byte[] { + 0x98, 0x3D, 0x55, 0xAD, + 0xB1, 0xDE, + 0x4A, 0x47, + 0x8E, + 0x17, + 0xFC, + 0x0C, + 0x20, + 0x75, + 0xB7, + 0x38 + }; - public static readonly Guid IID_IContactCollection = new Guid(0xB6AFA338, 0xD779, 0x11D9, 0x8B, 0xDE, 0xF6, 0x6B, 0xAD, 0x1E, 0x3F, 0x3A); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } - public static readonly Guid IID_IContactProperties = new Guid(0x70DD27DD, 0x5CBD, 0x46E8, 0xBE, 0xF0, 0x23, 0xB6, 0xB3, 0x46, 0x28, 0x8F); + public static ref readonly Guid IID_IContactCollection + { + get + { + ReadOnlySpan data = new byte[] { + 0x38, 0xA3, 0xAF, 0xB6, + 0x79, 0xD7, + 0xD9, 0x11, + 0x8B, + 0xDE, + 0xF6, + 0x6B, + 0xAD, + 0x1E, + 0x3F, + 0x3A + }; - public static readonly Guid IID_IContact = new Guid(0xF941B671, 0xBDA7, 0x4F77, 0x88, 0x4A, 0xF4, 0x64, 0x62, 0xF2, 0x26, 0xA7); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } - public static readonly Guid IID_IContactPropertyCollection = new Guid(0xFFD3ADF8, 0xFA64, 0x4328, 0xB1, 0xB6, 0x2E, 0x0D, 0xB5, 0x09, 0xCB, 0x3C); + public static ref readonly Guid IID_IContactProperties + { + get + { + ReadOnlySpan data = new byte[] { + 0xDD, 0x27, 0xDD, 0x70, + 0xBD, 0x5C, + 0xE8, 0x46, + 0xBE, + 0xF0, + 0x23, + 0xB6, + 0xB3, + 0x46, + 0x28, + 0x8F + }; - public static readonly Guid CLSID_Contact = new Guid(0x61B68808, 0x8EEE, 0x4FD1, 0xAC, 0xB8, 0x3D, 0x80, 0x4C, 0x8D, 0xB0, 0x56); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } - public static readonly Guid CLSID_ContactManager = new Guid(0x7165C8AB, 0xAF88, 0x42BD, 0x86, 0xFD, 0x53, 0x10, 0xB4, 0x28, 0x5A, 0x02); + public static ref readonly Guid IID_IContact + { + get + { + ReadOnlySpan data = new byte[] { + 0x71, 0xB6, 0x41, 0xF9, + 0xA7, 0xBD, + 0x77, 0x4F, + 0x88, + 0x4A, + 0xF4, + 0x64, + 0x62, + 0xF2, + 0x26, + 0xA7 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IContactPropertyCollection + { + get + { + ReadOnlySpan data = new byte[] { + 0xF8, 0xAD, 0xD3, 0xFF, + 0x64, 0xFA, + 0x28, 0x43, + 0xB1, + 0xB6, + 0x2E, + 0x0D, + 0xB5, + 0x09, + 0xCB, + 0x3C + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid CLSID_Contact + { + get + { + ReadOnlySpan data = new byte[] { + 0x08, 0x88, 0xB6, 0x61, + 0xEE, 0x8E, + 0xD1, 0x4F, + 0xAC, + 0xB8, + 0x3D, + 0x80, + 0x4C, + 0x8D, + 0xB0, + 0x56 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid CLSID_ContactManager + { + get + { + ReadOnlySpan data = new byte[] { + 0xAB, 0xC8, 0x65, 0x71, + 0x88, 0xAF, + 0xBD, 0x42, + 0x86, + 0xFD, + 0x53, + 0x10, + 0xB4, + 0x28, + 0x5A, + 0x02 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs b/sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs index 05620222f6..f3aeff7b7e 100644 --- a/sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs +++ b/sources/Interop/Windows/um/IMessageDispatcher/IMessageDispatcher.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("F5F84C8F-CFD0-4CD6-B66B-C5D26FF1689D")] [NativeTypeName("struct IMessageDispatcher : IInspectable")] + [NativeInheritance("IInspectable")] public unsafe partial struct IMessageDispatcher { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IMessageDispatcher*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName("IID **")] Guid** iids) { @@ -44,6 +49,7 @@ public int GetIids([NativeTypeName("ULONG *")] uint* iidCount, [NativeTypeName(" } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int GetRuntimeClassName([NativeTypeName("HSTRING *")] IntPtr* className) { @@ -51,13 +57,15 @@ public int GetRuntimeClassName([NativeTypeName("HSTRING *")] IntPtr* className) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] - public int GetTrustLevel([NativeTypeName("TrustLevel *")] TrustLevel* trustLevel) + public int GetTrustLevel(TrustLevel* trustLevel) { return ((delegate* unmanaged)(lpVtbl[5]))((IMessageDispatcher*)Unsafe.AsPointer(ref this), trustLevel); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int PumpMessages() { diff --git a/sources/Interop/Windows/um/IMessageDispatcher/Windows.cs b/sources/Interop/Windows/um/IMessageDispatcher/Windows.cs index 2bb99be795..d15671a4da 100644 --- a/sources/Interop/Windows/um/IMessageDispatcher/Windows.cs +++ b/sources/Interop/Windows/um/IMessageDispatcher/Windows.cs @@ -1,14 +1,38 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { public static partial class Windows { - public static readonly Guid IID_IMessageDispatcher = new Guid(0xF5F84C8F, 0xCFD0, 0x4CD6, 0xB6, 0x6B, 0xC5, 0xD2, 0x6F, 0xF1, 0x68, 0x9D); + public static ref readonly Guid IID_IMessageDispatcher + { + get + { + ReadOnlySpan data = new byte[] { + 0x8F, 0x4C, 0xF8, 0xF5, + 0xD0, 0xCF, + 0xD6, 0x4C, + 0xB6, + 0x6B, + 0xC5, + 0xD2, + 0x6F, + 0xF1, + 0x68, + 0x9D + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/Windows.Manual.cs b/sources/Interop/Windows/um/InkPresenterDesktop/Windows.Manual.cs deleted file mode 100644 index d974583169..0000000000 --- a/sources/Interop/Windows/um/InkPresenterDesktop/Windows.Manual.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/InkPresenterDesktop.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop -{ - public static partial class Windows - { - public static ref readonly Guid LIBID_InkDesktopHostLib - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0x67, 0x09, 0xEF, 0x2A, - 0x33, 0xC8, - 0x38, 0x4F, - 0x91, - 0xF3, - 0x16, - 0xE6, - 0x7D, - 0x55, - 0xD7, - 0x17 - }; - - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - } -} diff --git a/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs b/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs index 75fe0bfce5..36a1dbc59d 100644 --- a/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs +++ b/sources/Interop/Windows/um/InkPresenterDesktop/Windows.cs @@ -12,8 +12,10 @@ namespace TerraFX.Interop { public static partial class Windows { + [NativeTypeName("const IID")] public static ref readonly Guid IID_IInkCommitRequestHandler { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { @@ -35,8 +37,10 @@ public static ref readonly Guid IID_IInkCommitRequestHandler } } + [NativeTypeName("const IID")] public static ref readonly Guid IID_IInkPresenterDesktop { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { @@ -58,8 +62,10 @@ public static ref readonly Guid IID_IInkPresenterDesktop } } + [NativeTypeName("const IID")] public static ref readonly Guid IID_IInkHostWorkItem { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { @@ -81,8 +87,10 @@ public static ref readonly Guid IID_IInkHostWorkItem } } + [NativeTypeName("const IID")] public static ref readonly Guid IID_IInkDesktopHost { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { @@ -104,8 +112,35 @@ public static ref readonly Guid IID_IInkDesktopHost } } + [NativeTypeName("const IID")] + public static ref readonly Guid LIBID_InkDesktopHostLib + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x67, 0x09, 0xEF, 0x2A, + 0x33, 0xC8, + 0x38, 0x4F, + 0x91, + 0xF3, + 0x16, + 0xE6, + 0x7D, + 0x55, + 0xD7, + 0x17 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + [NativeTypeName("const CLSID")] public static ref readonly Guid CLSID_InkDesktopHost { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs index 0026c89c3f..2984b4b9aa 100644 --- a/sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncher.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("F686878F-7B42-4CC4-96FB-F4F3B6E3D24D")] [NativeTypeName("struct IIsolatedAppLauncher : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IIsolatedAppLauncher { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IIsolatedAppLauncher*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int Launch([NativeTypeName("LPCWSTR")] ushort* appUserModelId, [NativeTypeName("LPCWSTR")] ushort* arguments, [NativeTypeName("const IsolatedAppLauncherTelemetryParameters *")] IsolatedAppLauncherTelemetryParameters* telemetryParameters) { diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs index 1741e27097..6bbbb56fba 100644 --- a/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncher.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs index bc08164b7a..c72463d7d2 100644 --- a/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParameters.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs b/sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs index 84d6e136b1..05a5c4829b 100644 --- a/sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs +++ b/sources/Interop/Windows/um/IsolatedAppLauncher/Windows.cs @@ -1,9 +1,11 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace TerraFX.Interop @@ -18,8 +20,50 @@ public static unsafe partial class Windows [return: NativeTypeName("HRESULT")] public static extern int IsProcessInIsolatedContainer([NativeTypeName("BOOL *")] int* isProcessInIsolatedContainer); - public static readonly Guid IID_IIsolatedAppLauncher = new Guid(0xF686878F, 0x7B42, 0x4CC4, 0x96, 0xFB, 0xF4, 0xF3, 0xB6, 0xE3, 0xD2, 0x4D); + public static ref readonly Guid IID_IIsolatedAppLauncher + { + get + { + ReadOnlySpan data = new byte[] { + 0x8F, 0x87, 0x86, 0xF6, + 0x42, 0x7B, + 0xC4, 0x4C, + 0x96, + 0xFB, + 0xF4, + 0xF3, + 0xB6, + 0xE3, + 0xD2, + 0x4D + }; - public static readonly Guid CLSID_IsolatedAppLauncher = new Guid(0xBC812430, 0xE75E, 0x4FD1, 0x96, 0x41, 0x1F, 0x9F, 0x1E, 0x2D, 0x9A, 0x1F); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid CLSID_IsolatedAppLauncher + { + get + { + ReadOnlySpan data = new byte[] { + 0x30, 0x24, 0x81, 0xBC, + 0x5E, 0xE7, + 0xD1, 0x4F, + 0x96, + 0x41, + 0x1F, + 0x9F, + 0x1E, + 0x2D, + 0x9A, + 0x1F + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs index 0a80b3c6a6..80025194a8 100644 --- a/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs +++ b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs index 3090f218a1..93e8337830 100644 --- a/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs +++ b/sources/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs index 2cb6ba041c..b76f5513bb 100644 --- a/sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs +++ b/sources/Interop/Windows/um/MDMRegistration/REGISTRATION_INFORMATION_CLASS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/MDMRegistration/Windows.cs b/sources/Interop/Windows/um/MDMRegistration/Windows.cs index f73cc09eb7..087081c1e3 100644 --- a/sources/Interop/Windows/um/MDMRegistration/Windows.cs +++ b/sources/Interop/Windows/um/MDMRegistration/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -71,7 +71,7 @@ public static unsafe partial class Windows public static extern int DiscoverManagementServiceEx([NativeTypeName("LPCWSTR")] ushort* pszUPN, [NativeTypeName("LPCWSTR")] ushort* pszDiscoveryServiceCandidate, [NativeTypeName("PMANAGEMENT_SERVICE_INFO *")] MANAGEMENT_SERVICE_INFO** ppMgmtInfo); [NativeTypeName("#define E_DATATYPE_MISMATCH HRESULT_FROM_WIN32(ERROR_DATATYPE_MISMATCH)")] - public static readonly int E_DATATYPE_MISMATCH = HRESULT_FROM_WIN32(1629); + public static int E_DATATYPE_MISMATCH => HRESULT_FROM_WIN32(1629); [NativeTypeName("#define MDM_REGISTRATION_FACILITY_CODE 25")] public const int MDM_REGISTRATION_FACILITY_CODE = 25; @@ -82,21 +82,12 @@ public static unsafe partial class Windows [NativeTypeName("#define MREGISTER_E_DEVICE_MESSAGE_FORMAT_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 1)")] public const int MREGISTER_E_DEVICE_MESSAGE_FORMAT_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(1)))); - [NativeTypeName("#define MENROLL_E_DEVICE_MESSAGE_FORMAT_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 1)")] - public const int MENROLL_E_DEVICE_MESSAGE_FORMAT_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(1)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_AUTHENTICATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 2)")] public const int MREGISTER_E_DEVICE_AUTHENTICATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(2)))); - [NativeTypeName("#define MENROLL_E_DEVICE_AUTHENTICATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 2)")] - public const int MENROLL_E_DEVICE_AUTHENTICATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(2)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_AUTHORIZATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 3)")] public const int MREGISTER_E_DEVICE_AUTHORIZATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(3)))); - [NativeTypeName("#define MENROLL_E_DEVICE_AUTHORIZATION_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 3)")] - public const int MENROLL_E_DEVICE_AUTHORIZATION_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(3)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_CERTIFCATEREQUEST_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 4)")] public const int MREGISTER_E_DEVICE_CERTIFCATEREQUEST_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(4)))); @@ -106,39 +97,21 @@ public static unsafe partial class Windows [NativeTypeName("#define MREGISTER_E_DEVICE_CONFIGMGRSERVER_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 5)")] public const int MREGISTER_E_DEVICE_CONFIGMGRSERVER_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(5)))); - [NativeTypeName("#define MENROLL_E_DEVICE_CONFIGMGRSERVER_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 5)")] - public const int MENROLL_E_DEVICE_CONFIGMGRSERVER_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(5)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_INTERNALSERVICE_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 6)")] public const int MREGISTER_E_DEVICE_INTERNALSERVICE_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(6)))); - [NativeTypeName("#define MENROLL_E_DEVICE_INTERNALSERVICE_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 6)")] - public const int MENROLL_E_DEVICE_INTERNALSERVICE_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(6)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_INVALIDSECURITY_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 7)")] public const int MREGISTER_E_DEVICE_INVALIDSECURITY_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(7)))); - [NativeTypeName("#define MENROLL_E_DEVICE_INVALIDSECURITY_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 7)")] - public const int MENROLL_E_DEVICE_INVALIDSECURITY_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(7)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_UNKNOWN_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 8)")] public const int MREGISTER_E_DEVICE_UNKNOWN_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(8)))); - [NativeTypeName("#define MENROLL_E_DEVICE_UNKNOWN_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 8)")] - public const int MENROLL_E_DEVICE_UNKNOWN_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(8)))); - [NativeTypeName("#define MREGISTER_E_REGISTRATION_IN_PROGRESS MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 9)")] public const int MREGISTER_E_REGISTRATION_IN_PROGRESS = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(9)))); - [NativeTypeName("#define MENROLL_E_ENROLLMENT_IN_PROGRESS MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 9)")] - public const int MENROLL_E_ENROLLMENT_IN_PROGRESS = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(9)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_ALREADY_REGISTERED MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 10)")] public const int MREGISTER_E_DEVICE_ALREADY_REGISTERED = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(10)))); - [NativeTypeName("#define MENROLL_E_DEVICE_ALREADY_ENROLLED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 10)")] - public const int MENROLL_E_DEVICE_ALREADY_ENROLLED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(10)))); - [NativeTypeName("#define MREGISTER_E_DEVICE_NOT_REGISTERED MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 11)")] public const int MREGISTER_E_DEVICE_NOT_REGISTERED = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(11)))); @@ -151,102 +124,21 @@ public static unsafe partial class Windows [NativeTypeName("#define MREGISTER_E_DEVICE_NOT_AD_REGISTERED_ERROR MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 13)")] public const int MREGISTER_E_DEVICE_NOT_AD_REGISTERED_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(13)))); - [NativeTypeName("#define MENROLL_E_DISCOVERY_SEC_CERT_DATE_INVALID MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 13)")] - public const int MENROLL_E_DISCOVERY_SEC_CERT_DATE_INVALID = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(13)))); - [NativeTypeName("#define MREGISTER_E_DISCOVERY_FAILED MAKE_HRESULT(SEVERITY_ERROR, MDM_REGISTRATION_FACILITY_CODE, 14)")] public const int MREGISTER_E_DISCOVERY_FAILED = unchecked((int)(((uint)(1) << 31) | ((uint)(25) << 16) | ((uint)(14)))); - [NativeTypeName("#define MENROLL_E_PASSWORD_NEEDED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 14)")] - public const int MENROLL_E_PASSWORD_NEEDED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(14)))); - - [NativeTypeName("#define MENROLL_E_WAB_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 15)")] - public const int MENROLL_E_WAB_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(15)))); - - [NativeTypeName("#define MENROLL_E_CONNECTIVITY MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 16)")] - public const int MENROLL_E_CONNECTIVITY = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(16)))); - - [NativeTypeName("#define MENROLL_S_ENROLLMENT_SUSPENDED MAKE_HRESULT(SEVERITY_SUCCESS, DEVICE_ENROLLER_FACILITY_CODE, 17)")] - public const int MENROLL_S_ENROLLMENT_SUSPENDED = unchecked((int)(((uint)(0) << 31) | ((uint)(24) << 16) | ((uint)(17)))); - - [NativeTypeName("#define MENROLL_E_INVALIDSSLCERT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 18)")] - public const int MENROLL_E_INVALIDSSLCERT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(18)))); - [NativeTypeName("#define MENROLL_E_DEVICECAPREACHED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 19)")] public const int MENROLL_E_DEVICECAPREACHED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(19)))); - [NativeTypeName("#define MENROLL_E_DEVICENOTSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 20)")] - public const int MENROLL_E_DEVICENOTSUPPORTED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(20)))); - [NativeTypeName("#define MENROLL_E_NOTSUPPORTED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 21)")] public const int MENROLL_E_NOTSUPPORTED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(21)))); - [NativeTypeName("#define MENROLL_E_NOTELIGIBLETORENEW MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 22)")] - public const int MENROLL_E_NOTELIGIBLETORENEW = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(22)))); - - [NativeTypeName("#define MENROLL_E_INMAINTENANCE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 23)")] - public const int MENROLL_E_INMAINTENANCE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(23)))); - [NativeTypeName("#define MENROLL_E_USERLICENSE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 24)")] public const int MENROLL_E_USERLICENSE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(24)))); - [NativeTypeName("#define MENROLL_E_ENROLLMENTDATAINVALID MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 25)")] - public const int MENROLL_E_ENROLLMENTDATAINVALID = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(25)))); - - [NativeTypeName("#define MENROLL_E_INSECUREREDIRECT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 26)")] - public const int MENROLL_E_INSECUREREDIRECT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(26)))); - - [NativeTypeName("#define MENROLL_E_PLATFORM_WRONG_STATE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 27)")] - public const int MENROLL_E_PLATFORM_WRONG_STATE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(27)))); - - [NativeTypeName("#define MENROLL_E_PLATFORM_LICENSE_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 28)")] - public const int MENROLL_E_PLATFORM_LICENSE_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(28)))); - - [NativeTypeName("#define MENROLL_E_PLATFORM_UNKNOWN_ERROR MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 29)")] - public const int MENROLL_E_PLATFORM_UNKNOWN_ERROR = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(29)))); - - [NativeTypeName("#define MENROLL_E_PROV_CSP_CERTSTORE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 30)")] - public const int MENROLL_E_PROV_CSP_CERTSTORE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(30)))); - - [NativeTypeName("#define MENROLL_E_PROV_CSP_W7 MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 31)")] - public const int MENROLL_E_PROV_CSP_W7 = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(31)))); - - [NativeTypeName("#define MENROLL_E_PROV_CSP_DMCLIENT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 32)")] - public const int MENROLL_E_PROV_CSP_DMCLIENT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(32)))); - - [NativeTypeName("#define MENROLL_E_PROV_CSP_PFW MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 33)")] - public const int MENROLL_E_PROV_CSP_PFW = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(33)))); - - [NativeTypeName("#define MENROLL_E_PROV_CSP_MISC MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 34)")] - public const int MENROLL_E_PROV_CSP_MISC = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(34)))); - - [NativeTypeName("#define MENROLL_E_PROV_UNKNOWN MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 35)")] - public const int MENROLL_E_PROV_UNKNOWN = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(35)))); - - [NativeTypeName("#define MENROLL_E_PROV_SSLCERTNOTFOUND MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 36)")] - public const int MENROLL_E_PROV_SSLCERTNOTFOUND = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(36)))); - - [NativeTypeName("#define MENROLL_E_PROV_CSP_APPMGMT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 37)")] - public const int MENROLL_E_PROV_CSP_APPMGMT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(37)))); - - [NativeTypeName("#define MENROLL_E_DEVICE_MANAGEMENT_BLOCKED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 38)")] - public const int MENROLL_E_DEVICE_MANAGEMENT_BLOCKED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(38)))); - - [NativeTypeName("#define MENROLL_E_CERTPOLICY_PRIVATEKEYCREATION_FAILED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 39)")] - public const int MENROLL_E_CERTPOLICY_PRIVATEKEYCREATION_FAILED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(39)))); - - [NativeTypeName("#define MENROLL_E_CERTAUTH_FAILED_TO_FIND_CERT MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 40)")] - public const int MENROLL_E_CERTAUTH_FAILED_TO_FIND_CERT = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(40)))); - - [NativeTypeName("#define MENROLL_E_EMPTY_MESSAGE MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 41)")] - public const int MENROLL_E_EMPTY_MESSAGE = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(41)))); - [NativeTypeName("#define MENROLL_E_USER_CANCELED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 42)")] public const int MENROLL_E_USER_CANCELED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(42)))); - [NativeTypeName("#define MENROLL_E_MDM_NOT_CONFIGURED MAKE_HRESULT(SEVERITY_ERROR, DEVICE_ENROLLER_FACILITY_CODE, 43)")] - public const int MENROLL_E_MDM_NOT_CONFIGURED = unchecked((int)(((uint)(1) << 31) | ((uint)(24) << 16) | ((uint)(43)))); - [NativeTypeName("#define DEVICEREGISTRATIONTYPE_MDM_ONLY 0")] public const int DEVICEREGISTRATIONTYPE_MDM_ONLY = 0; diff --git a/sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs b/sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs index bfec7a31af..8aa506e1e4 100644 --- a/sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs +++ b/sources/Interop/Windows/um/MSChapp/CYPHER_BLOCK.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs b/sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs index 7222d024e1..8712583643 100644 --- a/sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs +++ b/sources/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORD.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs b/sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs index e2291ffb06..b2ca942d05 100644 --- a/sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs +++ b/sources/Interop/Windows/um/MSChapp/LM_OWF_PASSWORD.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs b/sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs index b19bd1499f..383ed4fe6f 100644 --- a/sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs +++ b/sources/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORD.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/MSChapp/Windows.cs b/sources/Interop/Windows/um/MSChapp/Windows.cs index 5d135af136..d7cb291fa8 100644 --- a/sources/Interop/Windows/um/MSChapp/Windows.cs +++ b/sources/Interop/Windows/um/MSChapp/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; @@ -9,11 +9,11 @@ namespace TerraFX.Interop { public static unsafe partial class Windows { - [DllImport("advapi32", ExactSpelling = true)] + [DllImport("advapi32", EntryPoint = "?MSChapSrvChangePassword@@YGKPA_W0EPAU_LM_OWF_PASSWORD@@111@Z", ExactSpelling = true)] [return: NativeTypeName("DWORD")] public static extern uint MSChapSrvChangePassword([NativeTypeName("PWSTR")] ushort* ServerName, [NativeTypeName("PWSTR")] ushort* UserName, [NativeTypeName("BOOLEAN")] byte LmOldPresent, [NativeTypeName("PLM_OWF_PASSWORD")] LM_OWF_PASSWORD* LmOldOwfPassword, [NativeTypeName("PLM_OWF_PASSWORD")] LM_OWF_PASSWORD* LmNewOwfPassword, [NativeTypeName("PNT_OWF_PASSWORD")] LM_OWF_PASSWORD* NtOldOwfPassword, [NativeTypeName("PNT_OWF_PASSWORD")] LM_OWF_PASSWORD* NtNewOwfPassword); - [DllImport("advapi32", ExactSpelling = true)] + [DllImport("advapi32", EntryPoint = "?MSChapSrvChangePassword2@@YGKPA_W0PAU_SAMPR_ENCRYPTED_USER_PASSWORD@@PAU_ENCRYPTED_LM_OWF_PASSWORD@@E12@Z", ExactSpelling = true)] [return: NativeTypeName("DWORD")] public static extern uint MSChapSrvChangePassword2([NativeTypeName("PWSTR")] ushort* ServerName, [NativeTypeName("PWSTR")] ushort* UserName, [NativeTypeName("PSAMPR_ENCRYPTED_USER_PASSWORD")] SAMPR_ENCRYPTED_USER_PASSWORD* NewPasswordEncryptedWithOldNt, [NativeTypeName("PENCRYPTED_NT_OWF_PASSWORD")] ENCRYPTED_LM_OWF_PASSWORD* OldNtOwfPasswordEncryptedWithNewNt, [NativeTypeName("BOOLEAN")] byte LmPresent, [NativeTypeName("PSAMPR_ENCRYPTED_USER_PASSWORD")] SAMPR_ENCRYPTED_USER_PASSWORD* NewPasswordEncryptedWithOldLm, [NativeTypeName("PENCRYPTED_LM_OWF_PASSWORD")] ENCRYPTED_LM_OWF_PASSWORD* OldLmOwfPasswordEncryptedWithNewLmOrNt); diff --git a/sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs b/sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs index efb71a291f..e233f5c176 100644 --- a/sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs +++ b/sources/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallback.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("53E31837-6600-4A81-9395-75CFFE746F94")] [NativeTypeName("struct INotificationActivationCallback : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct INotificationActivationCallback { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((INotificationActivationCallback*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int Activate([NativeTypeName("LPCWSTR")] ushort* appUserModelId, [NativeTypeName("LPCWSTR")] ushort* invokedArgs, [NativeTypeName("const NOTIFICATION_USER_INPUT_DATA *")] NOTIFICATION_USER_INPUT_DATA* data, [NativeTypeName("ULONG")] uint count) { diff --git a/sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs b/sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs index e5def313a1..dfb2ae20a0 100644 --- a/sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs +++ b/sources/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATA.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs b/sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs index cabcfa47e9..b4cea55aa1 100644 --- a/sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs +++ b/sources/Interop/Windows/um/NotificationActivationCallback/Windows.cs @@ -1,14 +1,38 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { public static partial class Windows { - public static readonly Guid IID_INotificationActivationCallback = new Guid(0x53E31837, 0x6600, 0x4A81, 0x93, 0x95, 0x75, 0xCF, 0xFE, 0x74, 0x6F, 0x94); + public static ref readonly Guid IID_INotificationActivationCallback + { + get + { + ReadOnlySpan data = new byte[] { + 0x37, 0x18, 0xE3, 0x53, + 0x00, 0x66, + 0x81, 0x4A, + 0x93, + 0x95, + 0x75, + 0xCF, + 0xFE, + 0x74, + 0x6F, + 0x94 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs index 4fc7e88106..0ba1b29985 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATOR.cs @@ -1,13 +1,12 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop { public unsafe partial struct PSS_ALLOCATOR { - [NativeTypeName("void *")] public void* Context; [NativeTypeName("void *(*)(void *, DWORD) __attribute__((stdcall))")] diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs index b97e2b8a9b..0999267eca 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs index 664a2d5835..ca659dc3cc 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRY.cs @@ -1,20 +1,18 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop { public unsafe partial struct PSS_AUXILIARY_PAGE_ENTRY { - [NativeTypeName("void *")] public void* Address; public MEMORY_BASIC_INFORMATION BasicInformation; public FILETIME CaptureTime; - [NativeTypeName("void *")] public void* PageContents; [NativeTypeName("DWORD")] diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs index 8f57e8dc94..7a944b58fd 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_CAPTURE_FLAGS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs index bcfa521323..61685839ef 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_DUPLICATE_FLAGS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs index d4ebef75f8..29367c4a3f 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRY.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -51,34 +51,34 @@ public unsafe partial struct PSS_HANDLE_ENTRY [NativeTypeName("const wchar_t *")] public ushort* ObjectName; - [NativeTypeName("union (anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:258:5)")] + [NativeTypeName("union (anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h:258:5)")] public _TypeSpecificInformation_e__Union TypeSpecificInformation; [StructLayout(LayoutKind.Explicit)] public partial struct _TypeSpecificInformation_e__Union { [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:261:9)")] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h:261:9)")] public _Process_e__Struct Process; [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:272:9)")] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h:272:9)")] public _Thread_e__Struct Thread; [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:284:9)")] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h:284:9)")] public _Mutant_e__Struct Mutant; [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:292:9)")] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h:292:9)")] public _Event_e__Struct Event; [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:298:9)")] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h:298:9)")] public _Section_e__Struct Section; [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/ProcessSnapshot.h:306:9)")] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/ProcessSnapshot.h:306:9)")] public _Semaphore_e__Struct Semaphore; public unsafe partial struct _Process_e__Struct @@ -86,7 +86,6 @@ public unsafe partial struct _Process_e__Struct [NativeTypeName("DWORD")] public uint ExitStatus; - [NativeTypeName("void *")] public void* PebBaseAddress; [NativeTypeName("ULONG_PTR")] @@ -110,7 +109,6 @@ public unsafe partial struct _Thread_e__Struct [NativeTypeName("DWORD")] public uint ExitStatus; - [NativeTypeName("void *")] public void* TebBaseAddress; [NativeTypeName("DWORD")] @@ -126,7 +124,6 @@ public unsafe partial struct _Thread_e__Struct public int BasePriority; - [NativeTypeName("void *")] public void* Win32StartAddress; } @@ -156,7 +153,6 @@ public partial struct _Event_e__Struct public unsafe partial struct _Section_e__Struct { - [NativeTypeName("void *")] public void* BaseAddress; [NativeTypeName("DWORD")] diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs index 03650e489e..aa969bfc00 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_FLAGS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs index 537f33cc4e..1afe682aab 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs index aae1da8e85..d7133f261d 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs index dc31442c9c..8d8029b92f 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_OBJECT_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs index 06b15b0e42..7fe9ef8e7d 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs index e81240d5f0..5bece75fe9 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_FLAGS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs index 6d461ae9a4..6d6d1e5acd 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop @@ -10,7 +10,6 @@ public unsafe partial struct PSS_PROCESS_INFORMATION [NativeTypeName("DWORD")] public uint ExitStatus; - [NativeTypeName("void *")] public void* PebBaseAddress; [NativeTypeName("ULONG_PTR")] diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs index c2a418fd1c..716e63a082 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_QUERY_INFORMATION_CLASS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs index 5bf47377dc..0cd3db6689 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRY.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop @@ -10,7 +10,6 @@ public unsafe partial struct PSS_THREAD_ENTRY [NativeTypeName("DWORD")] public uint ExitStatus; - [NativeTypeName("void *")] public void* TebBaseAddress; [NativeTypeName("DWORD")] @@ -26,7 +25,6 @@ public unsafe partial struct PSS_THREAD_ENTRY public int BasePriority; - [NativeTypeName("void *")] public void* LastSyscallFirstArgument; [NativeTypeName("WORD")] @@ -40,7 +38,6 @@ public unsafe partial struct PSS_THREAD_ENTRY public FILETIME UserTime; - [NativeTypeName("void *")] public void* Win32StartAddress; public FILETIME CaptureTime; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs index 212dcdaea7..3d9ca84d37 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_FLAGS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs index 881f23a89c..5c4f0fa15e 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs index 7596993a8c..9ef98e0603 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs index 8667c72656..88c5ed6b39 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRY.cs @@ -1,16 +1,14 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop { public unsafe partial struct PSS_VA_SPACE_ENTRY { - [NativeTypeName("void *")] public void* BaseAddress; - [NativeTypeName("void *")] public void* AllocationBase; [NativeTypeName("DWORD")] @@ -34,7 +32,6 @@ public unsafe partial struct PSS_VA_SPACE_ENTRY [NativeTypeName("DWORD")] public uint SizeOfImage; - [NativeTypeName("void *")] public void* ImageBase; [NativeTypeName("DWORD")] diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs index f8335cd3d0..1217462aa4 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs index 2947a8cba0..74c124a55d 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/PSS_WALK_INFORMATION_CLASS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ProcessSnapshot/Windows.cs b/sources/Interop/Windows/um/ProcessSnapshot/Windows.cs index ea61c9bda1..0689227488 100644 --- a/sources/Interop/Windows/um/ProcessSnapshot/Windows.cs +++ b/sources/Interop/Windows/um/ProcessSnapshot/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -20,11 +20,11 @@ public static unsafe partial class Windows [DllImport("kernel32", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint PssQuerySnapshot([NativeTypeName("HPSS")] IntPtr SnapshotHandle, PSS_QUERY_INFORMATION_CLASS InformationClass, [NativeTypeName("void *")] void* Buffer, [NativeTypeName("DWORD")] uint BufferLength); + public static extern uint PssQuerySnapshot([NativeTypeName("HPSS")] IntPtr SnapshotHandle, PSS_QUERY_INFORMATION_CLASS InformationClass, void* Buffer, [NativeTypeName("DWORD")] uint BufferLength); [DllImport("kernel32", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint PssWalkSnapshot([NativeTypeName("HPSS")] IntPtr SnapshotHandle, PSS_WALK_INFORMATION_CLASS InformationClass, [NativeTypeName("HPSSWALK")] IntPtr WalkMarkerHandle, [NativeTypeName("void *")] void* Buffer, [NativeTypeName("DWORD")] uint BufferLength); + public static extern uint PssWalkSnapshot([NativeTypeName("HPSS")] IntPtr SnapshotHandle, PSS_WALK_INFORMATION_CLASS InformationClass, [NativeTypeName("HPSSWALK")] IntPtr WalkMarkerHandle, void* Buffer, [NativeTypeName("DWORD")] uint BufferLength); [DllImport("kernel32", ExactSpelling = true)] [return: NativeTypeName("DWORD")] diff --git a/sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs index c32238928e..29229c7257 100644 --- a/sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs +++ b/sources/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/MODULEINFO.cs b/sources/Interop/Windows/um/Psapi/MODULEINFO.cs index 667b5470c5..59100bf6ca 100644 --- a/sources/Interop/Windows/um/Psapi/MODULEINFO.cs +++ b/sources/Interop/Windows/um/Psapi/MODULEINFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs index 0af715896d..99285830d3 100644 --- a/sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs +++ b/sources/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs index 8129e79b6b..c977da7f52 100644 --- a/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs +++ b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs index 1fbfe5e2d3..397fb2ea26 100644 --- a/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs +++ b/sources/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EX.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs index cd93cecc66..ff86aa2ca3 100644 --- a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCK.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.CompilerServices; @@ -16,7 +16,7 @@ public partial struct PSAPI_WORKING_SET_BLOCK public nuint Flags; [FieldOffset(0)] - [NativeTypeName("_PSAPI_WORKING_SET_BLOCK::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:276:5)")] + [NativeTypeName("_PSAPI_WORKING_SET_BLOCK::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/Psapi.h:386:5)")] public _Anonymous_e__Struct Anonymous; public nuint Protection diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs index c129f31407..6cb47e4858 100644 --- a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCK.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.CompilerServices; @@ -16,7 +16,7 @@ public partial struct PSAPI_WORKING_SET_EX_BLOCK public nuint Flags; [FieldOffset(0)] - [NativeTypeName("_PSAPI_WORKING_SET_EX_BLOCK::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:296:5)")] + [NativeTypeName("_PSAPI_WORKING_SET_EX_BLOCK::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/Psapi.h:406:5)")] public _Anonymous_e__Union Anonymous; public nuint Valid @@ -167,11 +167,11 @@ public ref _Anonymous_e__Union._Invalid_e__Struct Invalid public partial struct _Anonymous_e__Union { [FieldOffset(0)] - [NativeTypeName("_PSAPI_WORKING_SET_EX_BLOCK::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:297:9)")] + [NativeTypeName("_PSAPI_WORKING_SET_EX_BLOCK::(anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/Psapi.h:407:9)")] public _Anonymous_e__Struct Anonymous; [FieldOffset(0)] - [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/Psapi.h:312:9)")] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/Psapi.h:422:9)")] public _Invalid_e__Struct Invalid; public partial struct _Anonymous_e__Struct diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs index 538ae7e085..9cb2d7be62 100644 --- a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs index 8f6b6037e6..6b17b72de5 100644 --- a/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs index 2939cc822d..9bdc1adb14 100644 --- a/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs index 9d62f7d7b3..f633900514 100644 --- a/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs +++ b/sources/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EX.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/Psapi/Windows.cs b/sources/Interop/Windows/um/Psapi/Windows.cs index 154b6480d1..b43d9896d5 100644 --- a/sources/Interop/Windows/um/Psapi/Windows.cs +++ b/sources/Interop/Windows/um/Psapi/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -46,14 +46,6 @@ public static unsafe partial class Windows [return: NativeTypeName("BOOL")] public static extern int K32EmptyWorkingSet([NativeTypeName("HANDLE")] IntPtr hProcess); - [DllImport("kernel32", ExactSpelling = true)] - [return: NativeTypeName("BOOL")] - public static extern int K32QueryWorkingSet([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PVOID")] void* pv, [NativeTypeName("DWORD")] uint cb); - - [DllImport("kernel32", ExactSpelling = true)] - [return: NativeTypeName("BOOL")] - public static extern int K32QueryWorkingSetEx([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PVOID")] void* pv, [NativeTypeName("DWORD")] uint cb); - [DllImport("kernel32", ExactSpelling = true)] [return: NativeTypeName("BOOL")] public static extern int K32InitializeProcessForWsWatch([NativeTypeName("HANDLE")] IntPtr hProcess); @@ -94,6 +86,14 @@ public static unsafe partial class Windows [return: NativeTypeName("DWORD")] public static extern uint K32GetDeviceDriverFileNameW([NativeTypeName("LPVOID")] void* ImageBase, [NativeTypeName("LPWSTR")] ushort* lpFilename, [NativeTypeName("DWORD")] uint nSize); + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32QueryWorkingSet([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PVOID")] void* pv, [NativeTypeName("DWORD")] uint cb); + + [DllImport("kernel32", ExactSpelling = true)] + [return: NativeTypeName("BOOL")] + public static extern int K32QueryWorkingSetEx([NativeTypeName("HANDLE")] IntPtr hProcess, [NativeTypeName("PVOID")] void* pv, [NativeTypeName("DWORD")] uint cb); + [DllImport("kernel32", ExactSpelling = true)] [return: NativeTypeName("BOOL")] public static extern int K32GetProcessMemoryInfo([NativeTypeName("HANDLE")] IntPtr Process, [NativeTypeName("PPROCESS_MEMORY_COUNTERS")] PROCESS_MEMORY_COUNTERS* ppsmemCounters, [NativeTypeName("DWORD")] uint cb); @@ -134,105 +134,105 @@ public static unsafe partial class Windows public const int PSAPI_VERSION = 2; [NativeTypeName("#define EnumProcessModules K32EnumProcessModules")] - public static readonly delegate* EnumProcessModules = &K32EnumProcessModules; + public static delegate* EnumProcessModules => &K32EnumProcessModules; [NativeTypeName("#define EnumProcessModulesEx K32EnumProcessModulesEx")] - public static readonly delegate* EnumProcessModulesEx = &K32EnumProcessModulesEx; - - [NativeTypeName("#define QueryWorkingSet K32QueryWorkingSet")] - public static readonly delegate* QueryWorkingSet = &K32QueryWorkingSet; - - [NativeTypeName("#define QueryWorkingSetEx K32QueryWorkingSetEx")] - public static readonly delegate* QueryWorkingSetEx = &K32QueryWorkingSetEx; + public static delegate* EnumProcessModulesEx => &K32EnumProcessModulesEx; [NativeTypeName("#define InitializeProcessForWsWatch K32InitializeProcessForWsWatch")] - public static readonly delegate* InitializeProcessForWsWatch = &K32InitializeProcessForWsWatch; + public static delegate* InitializeProcessForWsWatch => &K32InitializeProcessForWsWatch; [NativeTypeName("#define GetWsChanges K32GetWsChanges")] - public static readonly delegate* GetWsChanges = &K32GetWsChanges; + public static delegate* GetWsChanges => &K32GetWsChanges; [NativeTypeName("#define GetWsChangesEx K32GetWsChangesEx")] - public static readonly delegate* GetWsChangesEx = &K32GetWsChangesEx; + public static delegate* GetWsChangesEx => &K32GetWsChangesEx; [NativeTypeName("#define GetMappedFileNameW K32GetMappedFileNameW")] - public static readonly delegate* GetMappedFileNameW = &K32GetMappedFileNameW; + public static delegate* GetMappedFileNameW => &K32GetMappedFileNameW; [NativeTypeName("#define GetMappedFileNameA K32GetMappedFileNameA")] - public static readonly delegate* GetMappedFileNameA = &K32GetMappedFileNameA; + public static delegate* GetMappedFileNameA => &K32GetMappedFileNameA; [NativeTypeName("#define EnumDeviceDrivers K32EnumDeviceDrivers")] - public static readonly delegate* EnumDeviceDrivers = &K32EnumDeviceDrivers; + public static delegate* EnumDeviceDrivers => &K32EnumDeviceDrivers; [NativeTypeName("#define GetDeviceDriverBaseNameA K32GetDeviceDriverBaseNameA")] - public static readonly delegate* GetDeviceDriverBaseNameA = &K32GetDeviceDriverBaseNameA; + public static delegate* GetDeviceDriverBaseNameA => &K32GetDeviceDriverBaseNameA; [NativeTypeName("#define GetDeviceDriverBaseNameW K32GetDeviceDriverBaseNameW")] - public static readonly delegate* GetDeviceDriverBaseNameW = &K32GetDeviceDriverBaseNameW; + public static delegate* GetDeviceDriverBaseNameW => &K32GetDeviceDriverBaseNameW; [NativeTypeName("#define GetDeviceDriverFileNameA K32GetDeviceDriverFileNameA")] - public static readonly delegate* GetDeviceDriverFileNameA = &K32GetDeviceDriverFileNameA; + public static delegate* GetDeviceDriverFileNameA => &K32GetDeviceDriverFileNameA; [NativeTypeName("#define GetDeviceDriverFileNameW K32GetDeviceDriverFileNameW")] - public static readonly delegate* GetDeviceDriverFileNameW = &K32GetDeviceDriverFileNameW; + public static delegate* GetDeviceDriverFileNameW => &K32GetDeviceDriverFileNameW; [NativeTypeName("#define GetPerformanceInfo K32GetPerformanceInfo")] - public static readonly delegate* GetPerformanceInfo = &K32GetPerformanceInfo; + public static delegate* GetPerformanceInfo => &K32GetPerformanceInfo; [NativeTypeName("#define GetProcessImageFileNameA K32GetProcessImageFileNameA")] - public static readonly delegate* GetProcessImageFileNameA = &K32GetProcessImageFileNameA; + public static delegate* GetProcessImageFileNameA => &K32GetProcessImageFileNameA; [NativeTypeName("#define GetProcessImageFileNameW K32GetProcessImageFileNameW")] - public static readonly delegate* GetProcessImageFileNameW = &K32GetProcessImageFileNameW; + public static delegate* GetProcessImageFileNameW => &K32GetProcessImageFileNameW; [NativeTypeName("#define GetModuleBaseNameA K32GetModuleBaseNameA")] - public static readonly delegate* GetModuleBaseNameA = &K32GetModuleBaseNameA; + public static delegate* GetModuleBaseNameA => &K32GetModuleBaseNameA; [NativeTypeName("#define GetModuleBaseNameW K32GetModuleBaseNameW")] - public static readonly delegate* GetModuleBaseNameW = &K32GetModuleBaseNameW; + public static delegate* GetModuleBaseNameW => &K32GetModuleBaseNameW; [NativeTypeName("#define GetModuleFileNameExA K32GetModuleFileNameExA")] - public static readonly delegate* GetModuleFileNameExA = &K32GetModuleFileNameExA; + public static delegate* GetModuleFileNameExA => &K32GetModuleFileNameExA; [NativeTypeName("#define GetModuleFileNameExW K32GetModuleFileNameExW")] - public static readonly delegate* GetModuleFileNameExW = &K32GetModuleFileNameExW; + public static delegate* GetModuleFileNameExW => &K32GetModuleFileNameExW; [NativeTypeName("#define EmptyWorkingSet K32EmptyWorkingSet")] - public static readonly delegate* EmptyWorkingSet = &K32EmptyWorkingSet; + public static delegate* EmptyWorkingSet => &K32EmptyWorkingSet; [NativeTypeName("#define EnumPageFilesW K32EnumPageFilesW")] - public static readonly delegate*, void*, int> EnumPageFilesW = &K32EnumPageFilesW; + public static delegate*, void*, int> EnumPageFilesW => &K32EnumPageFilesW; [NativeTypeName("#define EnumPageFilesA K32EnumPageFilesA")] - public static readonly delegate*, void*, int> EnumPageFilesA = &K32EnumPageFilesA; + public static delegate*, void*, int> EnumPageFilesA => &K32EnumPageFilesA; [NativeTypeName("#define EnumProcesses K32EnumProcesses")] - public static readonly delegate* EnumProcesses = &K32EnumProcesses; + public static delegate* EnumProcesses => &K32EnumProcesses; [NativeTypeName("#define GetProcessMemoryInfo K32GetProcessMemoryInfo")] - public static readonly delegate* GetProcessMemoryInfo = &K32GetProcessMemoryInfo; + public static delegate* GetProcessMemoryInfo => &K32GetProcessMemoryInfo; [NativeTypeName("#define GetModuleInformation K32GetModuleInformation")] - public static readonly delegate* GetModuleInformation = &K32GetModuleInformation; + public static delegate* GetModuleInformation => &K32GetModuleInformation; + + [NativeTypeName("#define QueryWorkingSet K32QueryWorkingSet")] + public static delegate* QueryWorkingSet => &K32QueryWorkingSet; + + [NativeTypeName("#define QueryWorkingSetEx K32QueryWorkingSetEx")] + public static delegate* QueryWorkingSetEx => &K32QueryWorkingSetEx; [NativeTypeName("#define GetModuleBaseName GetModuleBaseNameW")] - public static readonly delegate* GetModuleBaseName = &K32GetModuleBaseNameW; + public static delegate* GetModuleBaseName => &K32GetModuleBaseNameW; [NativeTypeName("#define GetModuleFileNameEx GetModuleFileNameExW")] - public static readonly delegate* GetModuleFileNameEx = &K32GetModuleFileNameExW; + public static delegate* GetModuleFileNameEx => &K32GetModuleFileNameExW; [NativeTypeName("#define GetMappedFileName GetMappedFileNameW")] - public static readonly delegate* GetMappedFileName = &K32GetMappedFileNameW; + public static delegate* GetMappedFileName => &K32GetMappedFileNameW; [NativeTypeName("#define GetDeviceDriverBaseName GetDeviceDriverBaseNameW")] - public static readonly delegate* GetDeviceDriverBaseName = &K32GetDeviceDriverBaseNameW; + public static delegate* GetDeviceDriverBaseName => &K32GetDeviceDriverBaseNameW; [NativeTypeName("#define GetDeviceDriverFileName GetDeviceDriverFileNameW")] - public static readonly delegate* GetDeviceDriverFileName = &K32GetDeviceDriverFileNameW; + public static delegate* GetDeviceDriverFileName => &K32GetDeviceDriverFileNameW; [NativeTypeName("#define EnumPageFiles EnumPageFilesW")] - public static readonly delegate*, void*, int> EnumPageFiles = &K32EnumPageFilesW; + public static delegate*, void*, int> EnumPageFiles => &K32EnumPageFilesW; [NativeTypeName("#define GetProcessImageFileName GetProcessImageFileNameW")] - public static readonly delegate* GetProcessImageFileName = &K32GetProcessImageFileNameW; + public static delegate* GetProcessImageFileName => &K32GetProcessImageFileNameW; } } diff --git a/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs b/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs index fb86acbe9a..e98c079393 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_APP_STATUS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs b/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs index 6945b03ee4..def4aa6461 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_APP_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs b/sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs index 17cb4e9ede..3b1d553281 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_FILTER_ACTION.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs b/sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs index 02e749ef3e..0511db4c77 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_FILTER_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.CompilerServices; @@ -17,7 +17,7 @@ public unsafe partial struct RM_FILTER_INFO [NativeTypeName("DWORD")] public uint cbNextOffset; - [NativeTypeName("_RM_FILTER_INFO::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/RestartManager.h:124:5)")] + [NativeTypeName("_RM_FILTER_INFO::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/RestartManager.h:124:5)")] public _Anonymous_e__Union Anonymous; public ref ushort* strFilename diff --git a/sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs b/sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs index 94091ebac1..5247e84cc4 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_FILTER_TRIGGER.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs b/sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs index d0dac4bce7..b2fdb0732e 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_PROCESS_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs b/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs index f2bcbd88ef..75871523e8 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_REBOOT_REASON.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs b/sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs index b01fc2ac44..86073d55d0 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_SHUTDOWN_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs b/sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs index 2e02a3162e..16d7408061 100644 --- a/sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs +++ b/sources/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/RestartManager/Windows.cs b/sources/Interop/Windows/um/RestartManager/Windows.cs index ec3ff67a7c..aa04078472 100644 --- a/sources/Interop/Windows/um/RestartManager/Windows.cs +++ b/sources/Interop/Windows/um/RestartManager/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; @@ -43,21 +43,21 @@ public static unsafe partial class Windows [DllImport("rstrtmgr", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint RmAddFilter([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("LPCWSTR")] ushort* strModuleName, [NativeTypeName("RM_UNIQUE_PROCESS *")] RM_UNIQUE_PROCESS* pProcess, [NativeTypeName("LPCWSTR")] ushort* strServiceShortName, RM_FILTER_ACTION FilterAction); + public static extern uint RmAddFilter([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("LPCWSTR")] ushort* strModuleName, RM_UNIQUE_PROCESS* pProcess, [NativeTypeName("LPCWSTR")] ushort* strServiceShortName, RM_FILTER_ACTION FilterAction); [DllImport("rstrtmgr", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint RmRemoveFilter([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("LPCWSTR")] ushort* strModuleName, [NativeTypeName("RM_UNIQUE_PROCESS *")] RM_UNIQUE_PROCESS* pProcess, [NativeTypeName("LPCWSTR")] ushort* strServiceShortName); + public static extern uint RmRemoveFilter([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("LPCWSTR")] ushort* strModuleName, RM_UNIQUE_PROCESS* pProcess, [NativeTypeName("LPCWSTR")] ushort* strServiceShortName); [DllImport("rstrtmgr", ExactSpelling = true)] [return: NativeTypeName("DWORD")] public static extern uint RmGetFilterList([NativeTypeName("DWORD")] uint dwSessionHandle, [NativeTypeName("PBYTE")] byte* pbFilterBuf, [NativeTypeName("DWORD")] uint cbFilterBuf, [NativeTypeName("LPDWORD")] uint* cbFilterBufNeeded); [NativeTypeName("#define RM_SESSION_KEY_LEN sizeof(GUID)")] - public const uint RM_SESSION_KEY_LEN = unchecked(16); + public const uint RM_SESSION_KEY_LEN = 16; [NativeTypeName("#define CCH_RM_SESSION_KEY RM_SESSION_KEY_LEN*2")] - public const uint CCH_RM_SESSION_KEY = unchecked(16 * 2); + public const uint CCH_RM_SESSION_KEY = 16 * 2; [NativeTypeName("#define CCH_RM_MAX_APP_NAME 255")] public const int CCH_RM_MAX_APP_NAME = 255; diff --git a/sources/Interop/Windows/um/ShObjIdl_core/Windows.cs b/sources/Interop/Windows/um/ShObjIdl_core/Windows.cs index b9ee5ad446..1fa591d6cf 100644 --- a/sources/Interop/Windows/um/ShObjIdl_core/Windows.cs +++ b/sources/Interop/Windows/um/ShObjIdl_core/Windows.cs @@ -137,10 +137,7 @@ public static void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION* pKFD) [return: NativeTypeName("HRESULT")] public static int SHCreateLibrary([NativeTypeName("const IID &")] Guid* riid, void** ppv) { - fixed (Guid* rclsid = &CLSID_ShellLibrary) - { - return CoCreateInstance(rclsid, null, (uint)(CLSCTX_INPROC_SERVER), riid, ppv); - } + return CoCreateInstance(__uuidof(), null, (uint)(CLSCTX_INPROC_SERVER), riid, ppv); } [return: NativeTypeName("HRESULT")] @@ -148,12 +145,7 @@ public static int SHLoadLibraryFromItem(IShellItem* psiLibrary, [NativeTypeName( { *ppv = null; IShellLibrary* plib; - int hr; - - fixed (Guid* rclsid = &CLSID_ShellLibrary) - { - hr = CoCreateInstance(rclsid, null, (uint)(CLSCTX_INPROC_SERVER), __uuidof(), (void**)(&plib)); - } + int hr = CoCreateInstance(__uuidof(), null, (uint)(CLSCTX_INPROC_SERVER), __uuidof(), (void**)(&plib)); if ((((int)(hr)) >= 0)) { @@ -174,12 +166,7 @@ public static int SHLoadLibraryFromKnownFolder([NativeTypeName("const KNOWNFOLDE { *ppv = null; IShellLibrary* plib; - int hr; - - fixed (Guid* rclsid = &CLSID_ShellLibrary) - { - hr = CoCreateInstance(rclsid, null, (uint)(CLSCTX_INPROC_SERVER), __uuidof(), (void**)(&plib)); - } + int hr = CoCreateInstance(__uuidof(), null, (uint)(CLSCTX_INPROC_SERVER), __uuidof(), (void**)(&plib)); if ((((int)(hr)) >= 0)) { diff --git a/sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs b/sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs index 9b62242519..ae530c619f 100644 --- a/sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs +++ b/sources/Interop/Windows/um/ShellScalingApi/DISPLAY_DEVICE_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs b/sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs index 4ca82ef98a..ac3b7d5de0 100644 --- a/sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs +++ b/sources/Interop/Windows/um/ShellScalingApi/MONITOR_DPI_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs b/sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs index fb9ed7f66e..a54e96ee99 100644 --- a/sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs +++ b/sources/Interop/Windows/um/ShellScalingApi/PROCESS_DPI_AWARENESS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs b/sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs index 07ecb55aef..4608f3535d 100644 --- a/sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs +++ b/sources/Interop/Windows/um/ShellScalingApi/SCALE_CHANGE_FLAGS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs b/sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs index c950e7de89..6cc14fa60d 100644 --- a/sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs +++ b/sources/Interop/Windows/um/ShellScalingApi/SHELL_UI_COMPONENT.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ShellScalingApi/Windows.cs b/sources/Interop/Windows/um/ShellScalingApi/Windows.cs index 9c03b8be5d..d4f1fdefad 100644 --- a/sources/Interop/Windows/um/ShellScalingApi/Windows.cs +++ b/sources/Interop/Windows/um/ShellScalingApi/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ShellScalingApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -23,7 +23,7 @@ public static unsafe partial class Windows [DllImport("shcore", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int GetScaleFactorForMonitor([NativeTypeName("HMONITOR")] IntPtr hMon, [NativeTypeName("DEVICE_SCALE_FACTOR *")] DEVICE_SCALE_FACTOR* pScale); + public static extern int GetScaleFactorForMonitor([NativeTypeName("HMONITOR")] IntPtr hMon, DEVICE_SCALE_FACTOR* pScale); [DllImport("shcore", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] @@ -39,7 +39,7 @@ public static unsafe partial class Windows [DllImport("shcore", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int GetProcessDpiAwareness([NativeTypeName("HANDLE")] IntPtr hprocess, [NativeTypeName("PROCESS_DPI_AWARENESS *")] PROCESS_DPI_AWARENESS* value); + public static extern int GetProcessDpiAwareness([NativeTypeName("HANDLE")] IntPtr hprocess, PROCESS_DPI_AWARENESS* value); [DllImport("shcore", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] diff --git a/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE.cs b/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE.cs index 1113590c48..34c3b4b8d3 100644 --- a/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE.cs +++ b/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE.cs @@ -3,6 +3,8 @@ // Ported from um/WebServices.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public partial struct WS_HTTP_SSL_USERNAME_BINDING_TEMPLATE diff --git a/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs b/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs index 7967227706..0fc8ec655b 100644 --- a/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs +++ b/sources/Interop/Windows/um/WebServices/WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs @@ -3,6 +3,8 @@ // Ported from um/WebServices.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public partial struct WS_HTTP_SSL_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE diff --git a/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE.cs b/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE.cs index c2c797e7c5..6964504b21 100644 --- a/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE.cs +++ b/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE.cs @@ -3,6 +3,8 @@ // Ported from um/WebServices.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public partial struct WS_TCP_SSPI_USERNAME_BINDING_TEMPLATE diff --git a/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs b/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs index 0fe909921c..f07c49c5d3 100644 --- a/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs +++ b/sources/Interop/Windows/um/WebServices/WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE.cs @@ -3,6 +3,8 @@ // Ported from um/WebServices.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { public partial struct WS_TCP_SSPI_USERNAME_SECURITY_CONTEXT_BINDING_TEMPLATE diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs index e8ee39175a..33e596ac7e 100644 --- a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs +++ b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManager.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("EB5DDB08-8BBF-449B-AC21-B02DDEB3B136")] [NativeTypeName("struct IXblIdpAuthManager : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IXblIdpAuthManager { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int SetGamerAccount([NativeTypeName("LPCWSTR")] ushort* msaAccountId, [NativeTypeName("LPCWSTR")] ushort* xuid) { @@ -44,6 +49,7 @@ public int SetGamerAccount([NativeTypeName("LPCWSTR")] ushort* msaAccountId, [Na } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int GetGamerAccount([NativeTypeName("LPWSTR *")] ushort** msaAccountId, [NativeTypeName("LPWSTR *")] ushort** xuid) { @@ -51,6 +57,7 @@ public int GetGamerAccount([NativeTypeName("LPWSTR *")] ushort** msaAccountId, [ } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int SetAppViewInitialized([NativeTypeName("LPCWSTR")] ushort* appSid, [NativeTypeName("LPCWSTR")] ushort* msaAccountId) { @@ -58,6 +65,7 @@ public int SetAppViewInitialized([NativeTypeName("LPCWSTR")] ushort* appSid, [Na } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int GetEnvironment([NativeTypeName("LPWSTR *")] ushort** environment) { @@ -65,6 +73,7 @@ public int GetEnvironment([NativeTypeName("LPWSTR *")] ushort** environment) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] public int GetSandbox([NativeTypeName("LPWSTR *")] ushort** sandbox) { @@ -72,8 +81,9 @@ public int GetSandbox([NativeTypeName("LPWSTR *")] ushort** sandbox) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] [return: NativeTypeName("HRESULT")] - public int GetTokenAndSignatureWithTokenResult([NativeTypeName("LPCWSTR")] ushort* msaAccountId, [NativeTypeName("LPCWSTR")] ushort* appSid, [NativeTypeName("LPCWSTR")] ushort* msaTarget, [NativeTypeName("LPCWSTR")] ushort* msaPolicy, [NativeTypeName("LPCWSTR")] ushort* httpMethod, [NativeTypeName("LPCWSTR")] ushort* uri, [NativeTypeName("LPCWSTR")] ushort* headers, [NativeTypeName("BYTE *")] byte* body, [NativeTypeName("DWORD")] uint bodySize, [NativeTypeName("BOOL")] int forceRefresh, [NativeTypeName("IXblIdpAuthTokenResult **")] IXblIdpAuthTokenResult** result) + public int GetTokenAndSignatureWithTokenResult([NativeTypeName("LPCWSTR")] ushort* msaAccountId, [NativeTypeName("LPCWSTR")] ushort* appSid, [NativeTypeName("LPCWSTR")] ushort* msaTarget, [NativeTypeName("LPCWSTR")] ushort* msaPolicy, [NativeTypeName("LPCWSTR")] ushort* httpMethod, [NativeTypeName("LPCWSTR")] ushort* uri, [NativeTypeName("LPCWSTR")] ushort* headers, [NativeTypeName("BYTE *")] byte* body, [NativeTypeName("DWORD")] uint bodySize, [NativeTypeName("BOOL")] int forceRefresh, IXblIdpAuthTokenResult** result) { return ((delegate* unmanaged)(lpVtbl[8]))((IXblIdpAuthManager*)Unsafe.AsPointer(ref this), msaAccountId, appSid, msaTarget, msaPolicy, httpMethod, uri, headers, body, bodySize, forceRefresh, result); } diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs index 123c9743c9..058db3e906 100644 --- a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs +++ b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("46CE0225-F267-4D68-B299-B2762552DEC1")] [NativeTypeName("struct IXblIdpAuthTokenResult : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IXblIdpAuthTokenResult { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,13 +41,15 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] - public int GetStatus([NativeTypeName("XBL_IDP_AUTH_TOKEN_STATUS *")] XBL_IDP_AUTH_TOKEN_STATUS* status) + public int GetStatus(XBL_IDP_AUTH_TOKEN_STATUS* status) { return ((delegate* unmanaged)(lpVtbl[3]))((IXblIdpAuthTokenResult*)Unsafe.AsPointer(ref this), status); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int GetErrorCode([NativeTypeName("HRESULT *")] int* errorCode) { @@ -51,6 +57,7 @@ public int GetErrorCode([NativeTypeName("HRESULT *")] int* errorCode) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int GetToken([NativeTypeName("LPWSTR *")] ushort** token) { @@ -58,6 +65,7 @@ public int GetToken([NativeTypeName("LPWSTR *")] ushort** token) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int GetSignature([NativeTypeName("LPWSTR *")] ushort** signature) { @@ -65,6 +73,7 @@ public int GetSignature([NativeTypeName("LPWSTR *")] ushort** signature) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] public int GetSandbox([NativeTypeName("LPWSTR *")] ushort** sandbox) { @@ -72,6 +81,7 @@ public int GetSandbox([NativeTypeName("LPWSTR *")] ushort** sandbox) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] [return: NativeTypeName("HRESULT")] public int GetEnvironment([NativeTypeName("LPWSTR *")] ushort** environment) { @@ -79,6 +89,7 @@ public int GetEnvironment([NativeTypeName("LPWSTR *")] ushort** environment) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] [return: NativeTypeName("HRESULT")] public int GetMsaAccountId([NativeTypeName("LPWSTR *")] ushort** msaAccountId) { @@ -86,6 +97,7 @@ public int GetMsaAccountId([NativeTypeName("LPWSTR *")] ushort** msaAccountId) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] [return: NativeTypeName("HRESULT")] public int GetXuid([NativeTypeName("LPWSTR *")] ushort** xuid) { @@ -93,6 +105,7 @@ public int GetXuid([NativeTypeName("LPWSTR *")] ushort** xuid) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] [return: NativeTypeName("HRESULT")] public int GetGamertag([NativeTypeName("LPWSTR *")] ushort** gamertag) { @@ -100,6 +113,7 @@ public int GetGamertag([NativeTypeName("LPWSTR *")] ushort** gamertag) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] [return: NativeTypeName("HRESULT")] public int GetAgeGroup([NativeTypeName("LPWSTR *")] ushort** ageGroup) { @@ -107,6 +121,7 @@ public int GetAgeGroup([NativeTypeName("LPWSTR *")] ushort** ageGroup) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] [return: NativeTypeName("HRESULT")] public int GetPrivileges([NativeTypeName("LPWSTR *")] ushort** privileges) { @@ -114,6 +129,7 @@ public int GetPrivileges([NativeTypeName("LPWSTR *")] ushort** privileges) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] [return: NativeTypeName("HRESULT")] public int GetMsaTarget([NativeTypeName("LPWSTR *")] ushort** msaTarget) { @@ -121,6 +137,7 @@ public int GetMsaTarget([NativeTypeName("LPWSTR *")] ushort** msaTarget) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] [return: NativeTypeName("HRESULT")] public int GetMsaPolicy([NativeTypeName("LPWSTR *")] ushort** msaPolicy) { @@ -128,6 +145,7 @@ public int GetMsaPolicy([NativeTypeName("LPWSTR *")] ushort** msaPolicy) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] [return: NativeTypeName("HRESULT")] public int GetMsaAppId([NativeTypeName("LPWSTR *")] ushort** msaAppId) { @@ -135,6 +153,7 @@ public int GetMsaAppId([NativeTypeName("LPWSTR *")] ushort** msaAppId) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] [return: NativeTypeName("HRESULT")] public int GetRedirect([NativeTypeName("LPWSTR *")] ushort** redirect) { @@ -142,6 +161,7 @@ public int GetRedirect([NativeTypeName("LPWSTR *")] ushort** redirect) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] [return: NativeTypeName("HRESULT")] public int GetMessageW([NativeTypeName("LPWSTR *")] ushort** message) { @@ -149,6 +169,7 @@ public int GetMessageW([NativeTypeName("LPWSTR *")] ushort** message) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] [return: NativeTypeName("HRESULT")] public int GetHelpId([NativeTypeName("LPWSTR *")] ushort** helpId) { @@ -156,6 +177,7 @@ public int GetHelpId([NativeTypeName("LPWSTR *")] ushort** helpId) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] [return: NativeTypeName("HRESULT")] public int GetEnforcementBans([NativeTypeName("LPWSTR *")] ushort** enforcementBans) { @@ -163,6 +185,7 @@ public int GetEnforcementBans([NativeTypeName("LPWSTR *")] ushort** enforcementB } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] [return: NativeTypeName("HRESULT")] public int GetRestrictions([NativeTypeName("LPWSTR *")] ushort** restrictions) { @@ -170,6 +193,7 @@ public int GetRestrictions([NativeTypeName("LPWSTR *")] ushort** restrictions) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] [return: NativeTypeName("HRESULT")] public int GetTitleRestrictions([NativeTypeName("LPWSTR *")] ushort** titleRestrictions) { diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs index 76dd952a5e..ef525fbb09 100644 --- a/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs +++ b/sources/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("75D760B0-60B9-412D-994F-26B2CD5F7812")] [NativeTypeName("struct IXblIdpAuthTokenResult2 : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IXblIdpAuthTokenResult2 { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IXblIdpAuthTokenResult2*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int GetModernGamertag([NativeTypeName("LPWSTR *")] ushort** value) { @@ -44,6 +49,7 @@ public int GetModernGamertag([NativeTypeName("LPWSTR *")] ushort** value) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int GetModernGamertagSuffix([NativeTypeName("LPWSTR *")] ushort** value) { @@ -51,6 +57,7 @@ public int GetModernGamertagSuffix([NativeTypeName("LPWSTR *")] ushort** value) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int GetUniqueModernGamertag([NativeTypeName("LPWSTR *")] ushort** value) { diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs b/sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs index 66734ea5b7..9e37ceca69 100644 --- a/sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs +++ b/sources/Interop/Windows/um/XblIdpAuthManager/Windows.cs @@ -1,22 +1,130 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { public static partial class Windows { - public static readonly Guid IID_IXblIdpAuthManager = new Guid(0xEB5DDB08, 0x8BBF, 0x449B, 0xAC, 0x21, 0xB0, 0x2D, 0xDE, 0xB3, 0xB1, 0x36); + public static ref readonly Guid IID_IXblIdpAuthManager + { + get + { + ReadOnlySpan data = new byte[] { + 0x08, 0xDB, 0x5D, 0xEB, + 0xBF, 0x8B, + 0x9B, 0x44, + 0xAC, + 0x21, + 0xB0, + 0x2D, + 0xDE, + 0xB3, + 0xB1, + 0x36 + }; - public static readonly Guid IID_IXblIdpAuthTokenResult = new Guid(0x46CE0225, 0xF267, 0x4D68, 0xB2, 0x99, 0xB2, 0x76, 0x25, 0x52, 0xDE, 0xC1); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } - public static readonly Guid IID_IXblIdpAuthTokenResult2 = new Guid(0x75D760B0, 0x60B9, 0x412D, 0x99, 0x4F, 0x26, 0xB2, 0xCD, 0x5F, 0x78, 0x12); + public static ref readonly Guid IID_IXblIdpAuthTokenResult + { + get + { + ReadOnlySpan data = new byte[] { + 0x25, 0x02, 0xCE, 0x46, + 0x67, 0xF2, + 0x68, 0x4D, + 0xB2, + 0x99, + 0xB2, + 0x76, + 0x25, + 0x52, + 0xDE, + 0xC1 + }; - public static readonly Guid CLSID_XblIdpAuthManager = new Guid(0xCE23534B, 0x56D8, 0x4978, 0x86, 0xA2, 0x7E, 0xE5, 0x70, 0x64, 0x04, 0x68); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } - public static readonly Guid CLSID_XblIdpAuthTokenResult = new Guid(0x9F493441, 0x744A, 0x410C, 0xAE, 0x2B, 0x9A, 0x22, 0xF7, 0xC7, 0x73, 0x1F); + public static ref readonly Guid IID_IXblIdpAuthTokenResult2 + { + get + { + ReadOnlySpan data = new byte[] { + 0xB0, 0x60, 0xD7, 0x75, + 0xB9, 0x60, + 0x2D, 0x41, + 0x99, + 0x4F, + 0x26, + 0xB2, + 0xCD, + 0x5F, + 0x78, + 0x12 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid CLSID_XblIdpAuthManager + { + get + { + ReadOnlySpan data = new byte[] { + 0x4B, 0x53, 0x23, 0xCE, + 0xD8, 0x56, + 0x78, 0x49, + 0x86, + 0xA2, + 0x7E, + 0xE5, + 0x70, + 0x64, + 0x04, + 0x68 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid CLSID_XblIdpAuthTokenResult + { + get + { + ReadOnlySpan data = new byte[] { + 0x41, 0x34, 0x49, 0x9F, + 0x4A, 0x74, + 0x0C, 0x41, + 0xAE, + 0x2B, + 0x9A, + 0x22, + 0xF7, + 0xC7, + 0x73, + 0x1F + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs b/sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs index 572f1ba1e4..140f5f9da3 100644 --- a/sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs +++ b/sources/Interop/Windows/um/XblIdpAuthManager/XBL_IDP_AUTH_TOKEN_STATUS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs index 463fe792cc..9b088c310f 100644 --- a/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs +++ b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManager.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs index 3ae34ed66a..e6feb4901f 100644 --- a/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs +++ b/sources/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResult.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs b/sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs index 7ae09e78d7..f723dba93f 100644 --- a/sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs +++ b/sources/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINES.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs b/sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs index fbeed51ef4..0b44b08ca7 100644 --- a/sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs +++ b/sources/Interop/Windows/um/compressapi/COMPRESS_INFORMATION_CLASS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/compressapi/Windows.cs b/sources/Interop/Windows/um/compressapi/Windows.cs index db0f31d670..1c86732118 100644 --- a/sources/Interop/Windows/um/compressapi/Windows.cs +++ b/sources/Interop/Windows/um/compressapi/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs b/sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs index 2dcfbc3074..d86a090e4d 100644 --- a/sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs +++ b/sources/Interop/Windows/um/davclnt/AUTHNEXTSTEP.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs index 17ee7e3c79..13e149b468 100644 --- a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs +++ b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOB.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs index 27e2e9871e..19f2982154 100644 --- a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs +++ b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNP.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs index c87a4c8829..442644d887 100644 --- a/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs +++ b/sources/Interop/Windows/um/davclnt/DAV_CALLBACK_CRED.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/davclnt/Windows.cs b/sources/Interop/Windows/um/davclnt/Windows.cs index 7aed38683f..2b439013be 100644 --- a/sources/Interop/Windows/um/davclnt/Windows.cs +++ b/sources/Interop/Windows/um/davclnt/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_F.cs b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_F.cs index 562c2f611b..cdd05d13d5 100644 --- a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_F.cs +++ b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_F.cs @@ -127,7 +127,7 @@ public Span m [MethodImpl(MethodImplOptions.AggressiveInlining)] get { - return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 3 * 2); + return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 3); } } diff --git a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_F.cs b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_F.cs index c313ee09da..3709a8cbc4 100644 --- a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_F.cs +++ b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_F.cs @@ -127,7 +127,7 @@ public Span m [MethodImpl(MethodImplOptions.AggressiveInlining)] get { - return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 4 * 3); + return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 4); } } diff --git a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_F.cs b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_F.cs index 7258419899..c5fadc429d 100644 --- a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_F.cs +++ b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_F.cs @@ -163,7 +163,7 @@ public Span m [MethodImpl(MethodImplOptions.AggressiveInlining)] get { - return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 4 * 4); + return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 4); } } diff --git a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_F.cs b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_F.cs index 7bf3536392..caded3aae3 100644 --- a/sources/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_F.cs +++ b/sources/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_F.cs @@ -199,7 +199,7 @@ public Span m [MethodImpl(MethodImplOptions.AggressiveInlining)] get { - return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 5 * 4); + return MemoryMarshal.CreateSpan(ref Anonymous.m[0], 5); } } diff --git a/sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs b/sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs index d1c6946055..ea7dc6fa26 100644 --- a/sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs +++ b/sources/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENT.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs b/sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs index 7e650f6bc4..c995918ddd 100644 --- a/sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs +++ b/sources/Interop/Windows/um/ddpbackup/DEDUP_BACKUP_SUPPORT_PARAM_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs b/sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs index 2ce96658b5..e3f55c26e6 100644 --- a/sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs +++ b/sources/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENT.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs b/sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs index 65654b617f..9d409d0841 100644 --- a/sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs +++ b/sources/Interop/Windows/um/ddpbackup/DedupBackupSupport.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs b/sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs index 87e537e059..e9b8b1cc26 100644 --- a/sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs +++ b/sources/Interop/Windows/um/ddpbackup/IDedupBackupSupport.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("C719D963-2B2D-415E-ACF7-7EB7CA596FF4")] [NativeTypeName("struct IDedupBackupSupport : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IDedupBackupSupport { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IDedupBackupSupport*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,8 +41,9 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] - public int RestoreFiles([NativeTypeName("ULONG")] uint NumberOfFiles, [NativeTypeName("BSTR *")] ushort** FileFullPaths, [NativeTypeName("IDedupReadFileCallback *")] IDedupReadFileCallback* Store, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("HRESULT *")] int* FileResults) + public int RestoreFiles([NativeTypeName("ULONG")] uint NumberOfFiles, [NativeTypeName("BSTR *")] ushort** FileFullPaths, IDedupReadFileCallback* Store, [NativeTypeName("DWORD")] uint Flags, [NativeTypeName("HRESULT *")] int* FileResults) { return ((delegate* unmanaged)(lpVtbl[3]))((IDedupBackupSupport*)Unsafe.AsPointer(ref this), NumberOfFiles, FileFullPaths, Store, Flags, FileResults); } diff --git a/sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs b/sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs index 92056e5a58..0f7f6ad25a 100644 --- a/sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs +++ b/sources/Interop/Windows/um/ddpbackup/IDedupReadFileCallback.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("7BACC67A-2F1D-42D0-897E-6FF62DD533BB")] [NativeTypeName("struct IDedupReadFileCallback : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IDedupReadFileCallback { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int ReadBackupFile([NativeTypeName("BSTR")] ushort* FileFullPath, [NativeTypeName("long long")] long FileOffset, [NativeTypeName("ULONG")] uint SizeToRead, [NativeTypeName("BYTE *")] byte* FileBuffer, [NativeTypeName("ULONG *")] uint* ReturnedSize, [NativeTypeName("DWORD")] uint Flags) { @@ -44,15 +49,17 @@ public int ReadBackupFile([NativeTypeName("BSTR")] ushort* FileFullPath, [Native } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] - public int OrderContainersRestore([NativeTypeName("ULONG")] uint NumberOfContainers, [NativeTypeName("BSTR *")] ushort** ContainerPaths, [NativeTypeName("ULONG *")] uint* ReadPlanEntries, [NativeTypeName("DEDUP_CONTAINER_EXTENT **")] DEDUP_CONTAINER_EXTENT** ReadPlan) + public int OrderContainersRestore([NativeTypeName("ULONG")] uint NumberOfContainers, [NativeTypeName("BSTR *")] ushort** ContainerPaths, [NativeTypeName("ULONG *")] uint* ReadPlanEntries, DEDUP_CONTAINER_EXTENT** ReadPlan) { return ((delegate* unmanaged)(lpVtbl[4]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this), NumberOfContainers, ContainerPaths, ReadPlanEntries, ReadPlan); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] - public int PreviewContainerRead([NativeTypeName("BSTR")] ushort* FileFullPath, [NativeTypeName("ULONG")] uint NumberOfReads, [NativeTypeName("DDP_FILE_EXTENT *")] DDP_FILE_EXTENT* ReadOffsets) + public int PreviewContainerRead([NativeTypeName("BSTR")] ushort* FileFullPath, [NativeTypeName("ULONG")] uint NumberOfReads, DDP_FILE_EXTENT* ReadOffsets) { return ((delegate* unmanaged)(lpVtbl[5]))((IDedupReadFileCallback*)Unsafe.AsPointer(ref this), FileFullPath, NumberOfReads, ReadOffsets); } diff --git a/sources/Interop/Windows/um/ddpbackup/Windows.cs b/sources/Interop/Windows/um/ddpbackup/Windows.cs index 61b56390d0..f2f9151d6d 100644 --- a/sources/Interop/Windows/um/ddpbackup/Windows.cs +++ b/sources/Interop/Windows/um/ddpbackup/Windows.cs @@ -1,18 +1,84 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { public static partial class Windows { - public static readonly Guid IID_IDedupReadFileCallback = new Guid(0x7BACC67A, 0x2F1D, 0x42D0, 0x89, 0x7E, 0x6F, 0xF6, 0x2D, 0xD5, 0x33, 0xBB); + public static ref readonly Guid IID_IDedupReadFileCallback + { + get + { + ReadOnlySpan data = new byte[] { + 0x7A, 0xC6, 0xAC, 0x7B, + 0x1D, 0x2F, + 0xD0, 0x42, + 0x89, + 0x7E, + 0x6F, + 0xF6, + 0x2D, + 0xD5, + 0x33, + 0xBB + }; - public static readonly Guid IID_IDedupBackupSupport = new Guid(0xC719D963, 0x2B2D, 0x415E, 0xAC, 0xF7, 0x7E, 0xB7, 0xCA, 0x59, 0x6F, 0xF4); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } - public static readonly Guid CLSID_DedupBackupSupport = new Guid(0x73D6B2AD, 0x2984, 0x4715, 0xB2, 0xE3, 0x92, 0x4C, 0x14, 0x97, 0x44, 0xDD); + public static ref readonly Guid IID_IDedupBackupSupport + { + get + { + ReadOnlySpan data = new byte[] { + 0x63, 0xD9, 0x19, 0xC7, + 0x2D, 0x2B, + 0x5E, 0x41, + 0xAC, + 0xF7, + 0x7E, + 0xB7, + 0xCA, + 0x59, + 0x6F, + 0xF4 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid CLSID_DedupBackupSupport + { + get + { + ReadOnlySpan data = new byte[] { + 0xAD, 0xB2, 0xD6, 0x73, + 0x84, 0x29, + 0x15, 0x47, + 0xB2, + 0xE3, + 0x92, + 0x4C, + 0x14, + 0x97, + 0x44, + 0xDD + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs b/sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs index 2547749c8c..8bdd6250fc 100644 --- a/sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs +++ b/sources/Interop/Windows/um/gamingtcui/KnownGamingPrivileges.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/gamingtcui/Windows.cs b/sources/Interop/Windows/um/gamingtcui/Windows.cs index 9c0f129d48..e4a93245f3 100644 --- a/sources/Interop/Windows/um/gamingtcui/Windows.cs +++ b/sources/Interop/Windows/um/gamingtcui/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/gamingtcui.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -12,23 +12,23 @@ public static unsafe partial class Windows { [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowGameInviteUI([NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowGameInviteUI([NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowPlayerPickerUI([NativeTypeName("HSTRING")] IntPtr promptDisplayText, [NativeTypeName("const HSTRING *")] IntPtr* xuids, [NativeTypeName("size_t")] nuint xuidsCount, [NativeTypeName("const HSTRING *")] IntPtr* preSelectedXuids, [NativeTypeName("size_t")] nuint preSelectedXuidsCount, [NativeTypeName("size_t")] nuint minSelectionCount, [NativeTypeName("size_t")] nuint maxSelectionCount, [NativeTypeName("PlayerPickerUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowPlayerPickerUI([NativeTypeName("HSTRING")] IntPtr promptDisplayText, [NativeTypeName("const HSTRING *")] IntPtr* xuids, [NativeTypeName("size_t")] nuint xuidsCount, [NativeTypeName("const HSTRING *")] IntPtr* preSelectedXuids, [NativeTypeName("size_t")] nuint preSelectedXuidsCount, [NativeTypeName("size_t")] nuint minSelectionCount, [NativeTypeName("size_t")] nuint maxSelectionCount, [NativeTypeName("PlayerPickerUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowProfileCardUI([NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowProfileCardUI([NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowChangeFriendRelationshipUI([NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowChangeFriendRelationshipUI([NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowTitleAchievementsUI([NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowTitleAchievementsUI([NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] @@ -40,7 +40,7 @@ public static unsafe partial class Windows [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int CheckGamingPrivilegeWithUI([NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("HSTRING")] IntPtr friendlyMessage, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int CheckGamingPrivilegeWithUI([NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("HSTRING")] IntPtr friendlyMessage, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] @@ -48,70 +48,70 @@ public static unsafe partial class Windows [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowGameInviteUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowGameInviteUIForUser(IInspectable* user, [NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowPlayerPickerUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr promptDisplayText, [NativeTypeName("const HSTRING *")] IntPtr* xuids, [NativeTypeName("size_t")] nuint xuidsCount, [NativeTypeName("const HSTRING *")] IntPtr* preSelectedXuids, [NativeTypeName("size_t")] nuint preSelectedXuidsCount, [NativeTypeName("size_t")] nuint minSelectionCount, [NativeTypeName("size_t")] nuint maxSelectionCount, [NativeTypeName("PlayerPickerUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowPlayerPickerUIForUser(IInspectable* user, [NativeTypeName("HSTRING")] IntPtr promptDisplayText, [NativeTypeName("const HSTRING *")] IntPtr* xuids, [NativeTypeName("size_t")] nuint xuidsCount, [NativeTypeName("const HSTRING *")] IntPtr* preSelectedXuids, [NativeTypeName("size_t")] nuint preSelectedXuidsCount, [NativeTypeName("size_t")] nuint minSelectionCount, [NativeTypeName("size_t")] nuint maxSelectionCount, [NativeTypeName("PlayerPickerUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowProfileCardUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowProfileCardUIForUser(IInspectable* user, [NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowChangeFriendRelationshipUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowChangeFriendRelationshipUIForUser(IInspectable* user, [NativeTypeName("HSTRING")] IntPtr targetUserXuid, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowTitleAchievementsUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowTitleAchievementsUIForUser(IInspectable* user, [NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int CheckGamingPrivilegeWithUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("HSTRING")] IntPtr friendlyMessage, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int CheckGamingPrivilegeWithUIForUser(IInspectable* user, [NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("HSTRING")] IntPtr friendlyMessage, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int CheckGamingPrivilegeSilentlyForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("BOOL *")] int* hasPrivilege); + public static extern int CheckGamingPrivilegeSilentlyForUser(IInspectable* user, [NativeTypeName("UINT32")] uint privilegeId, [NativeTypeName("HSTRING")] IntPtr scope, [NativeTypeName("HSTRING")] IntPtr policy, [NativeTypeName("BOOL *")] int* hasPrivilege); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowGameInviteUIWithContext([NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("HSTRING")] IntPtr customActivationContext, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowGameInviteUIWithContext([NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("HSTRING")] IntPtr customActivationContext, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowGameInviteUIWithContextForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("HSTRING")] IntPtr customActivationContext, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowGameInviteUIWithContextForUser(IInspectable* user, [NativeTypeName("HSTRING")] IntPtr serviceConfigurationId, [NativeTypeName("HSTRING")] IntPtr sessionTemplateName, [NativeTypeName("HSTRING")] IntPtr sessionId, [NativeTypeName("HSTRING")] IntPtr invitationDisplayText, [NativeTypeName("HSTRING")] IntPtr customActivationContext, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowGameInfoUI([NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowGameInfoUI([NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowGameInfoUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowGameInfoUIForUser(IInspectable* user, [NativeTypeName("UINT32")] uint titleId, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowFindFriendsUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowFindFriendsUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowFindFriendsUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowFindFriendsUIForUser(IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowCustomizeUserProfileUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowCustomizeUserProfileUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowCustomizeUserProfileUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowCustomizeUserProfileUIForUser(IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowUserSettingsUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowUserSettingsUI([NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); [DllImport("gamingtcui", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int ShowUserSettingsUIForUser([NativeTypeName("IInspectable *")] IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, [NativeTypeName("void *")] void* context); + public static extern int ShowUserSettingsUIForUser(IInspectable* user, [NativeTypeName("GameUICompletionRoutine")] delegate* unmanaged completionRoutine, void* context); } } diff --git a/sources/Interop/Windows/um/inkrenderer/Windows.Manual.cs b/sources/Interop/Windows/um/inkrenderer/Windows.Manual.cs deleted file mode 100644 index 7128d97d4d..0000000000 --- a/sources/Interop/Windows/um/inkrenderer/Windows.Manual.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/inkrenderer.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop -{ - public static partial class Windows - { - public static ref readonly Guid LIBID_InkD2DRendererLib - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get - { - ReadOnlySpan data = new byte[] { - 0xB0, 0x0A, 0x0D, 0x39, - 0xE2, 0x19, - 0xBB, 0x46, - 0x86, - 0x2E, - 0xB0, - 0x9F, - 0x3C, - 0xDC, - 0xF8, - 0xB9 - }; - - return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); - } - } - } -} diff --git a/sources/Interop/Windows/um/inkrenderer/Windows.cs b/sources/Interop/Windows/um/inkrenderer/Windows.cs index e5a8b2a35f..2bb1bf3b36 100644 --- a/sources/Interop/Windows/um/inkrenderer/Windows.cs +++ b/sources/Interop/Windows/um/inkrenderer/Windows.cs @@ -12,8 +12,10 @@ namespace TerraFX.Interop { public static partial class Windows { + [NativeTypeName("const IID")] public static ref readonly Guid IID_IInkD2DRenderer { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { @@ -35,8 +37,10 @@ public static ref readonly Guid IID_IInkD2DRenderer } } + [NativeTypeName("const IID")] public static ref readonly Guid IID_IInkD2DRenderer2 { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { @@ -58,8 +62,35 @@ public static ref readonly Guid IID_IInkD2DRenderer2 } } + [NativeTypeName("const IID")] + public static ref readonly Guid LIBID_InkD2DRendererLib + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xB0, 0x0A, 0x0D, 0x39, + 0xE2, 0x19, + 0xBB, 0x46, + 0x86, + 0x2E, + 0xB0, + 0x9F, + 0x3C, + 0xDC, + 0xF8, + 0xB9 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + [NativeTypeName("const CLSID")] public static ref readonly Guid CLSID_InkD2DRenderer { + [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan data = new byte[] { diff --git a/sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs b/sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs index 8559d3b60d..db1545b236 100644 --- a/sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs +++ b/sources/Interop/Windows/um/manipulations/IInertiaProcessor.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("18B00C6D-C5EE-41B1-90A9-9D4A929095AD")] [NativeTypeName("struct IInertiaProcessor : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IInertiaProcessor { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IInertiaProcessor*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int get_InitialOriginX([NativeTypeName("FLOAT *")] float* x) { @@ -44,6 +49,7 @@ public int get_InitialOriginX([NativeTypeName("FLOAT *")] float* x) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int put_InitialOriginX([NativeTypeName("FLOAT")] float x) { @@ -51,6 +57,7 @@ public int put_InitialOriginX([NativeTypeName("FLOAT")] float x) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int get_InitialOriginY([NativeTypeName("FLOAT *")] float* y) { @@ -58,6 +65,7 @@ public int get_InitialOriginY([NativeTypeName("FLOAT *")] float* y) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int put_InitialOriginY([NativeTypeName("FLOAT")] float y) { @@ -65,6 +73,7 @@ public int put_InitialOriginY([NativeTypeName("FLOAT")] float y) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] public int get_InitialVelocityX([NativeTypeName("FLOAT *")] float* x) { @@ -72,6 +81,7 @@ public int get_InitialVelocityX([NativeTypeName("FLOAT *")] float* x) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] [return: NativeTypeName("HRESULT")] public int put_InitialVelocityX([NativeTypeName("FLOAT")] float x) { @@ -79,6 +89,7 @@ public int put_InitialVelocityX([NativeTypeName("FLOAT")] float x) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] [return: NativeTypeName("HRESULT")] public int get_InitialVelocityY([NativeTypeName("FLOAT *")] float* y) { @@ -86,6 +97,7 @@ public int get_InitialVelocityY([NativeTypeName("FLOAT *")] float* y) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] [return: NativeTypeName("HRESULT")] public int put_InitialVelocityY([NativeTypeName("FLOAT")] float y) { @@ -93,6 +105,7 @@ public int put_InitialVelocityY([NativeTypeName("FLOAT")] float y) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] [return: NativeTypeName("HRESULT")] public int get_InitialAngularVelocity([NativeTypeName("FLOAT *")] float* velocity) { @@ -100,6 +113,7 @@ public int get_InitialAngularVelocity([NativeTypeName("FLOAT *")] float* velocit } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] [return: NativeTypeName("HRESULT")] public int put_InitialAngularVelocity([NativeTypeName("FLOAT")] float velocity) { @@ -107,6 +121,7 @@ public int put_InitialAngularVelocity([NativeTypeName("FLOAT")] float velocity) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] [return: NativeTypeName("HRESULT")] public int get_InitialExpansionVelocity([NativeTypeName("FLOAT *")] float* velocity) { @@ -114,6 +129,7 @@ public int get_InitialExpansionVelocity([NativeTypeName("FLOAT *")] float* veloc } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] [return: NativeTypeName("HRESULT")] public int put_InitialExpansionVelocity([NativeTypeName("FLOAT")] float velocity) { @@ -121,6 +137,7 @@ public int put_InitialExpansionVelocity([NativeTypeName("FLOAT")] float velocity } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] [return: NativeTypeName("HRESULT")] public int get_InitialRadius([NativeTypeName("FLOAT *")] float* radius) { @@ -128,6 +145,7 @@ public int get_InitialRadius([NativeTypeName("FLOAT *")] float* radius) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] [return: NativeTypeName("HRESULT")] public int put_InitialRadius([NativeTypeName("FLOAT")] float radius) { @@ -135,6 +153,7 @@ public int put_InitialRadius([NativeTypeName("FLOAT")] float radius) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] [return: NativeTypeName("HRESULT")] public int get_BoundaryLeft([NativeTypeName("FLOAT *")] float* left) { @@ -142,6 +161,7 @@ public int get_BoundaryLeft([NativeTypeName("FLOAT *")] float* left) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] [return: NativeTypeName("HRESULT")] public int put_BoundaryLeft([NativeTypeName("FLOAT")] float left) { @@ -149,6 +169,7 @@ public int put_BoundaryLeft([NativeTypeName("FLOAT")] float left) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] [return: NativeTypeName("HRESULT")] public int get_BoundaryTop([NativeTypeName("FLOAT *")] float* top) { @@ -156,6 +177,7 @@ public int get_BoundaryTop([NativeTypeName("FLOAT *")] float* top) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] [return: NativeTypeName("HRESULT")] public int put_BoundaryTop([NativeTypeName("FLOAT")] float top) { @@ -163,6 +185,7 @@ public int put_BoundaryTop([NativeTypeName("FLOAT")] float top) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] [return: NativeTypeName("HRESULT")] public int get_BoundaryRight([NativeTypeName("FLOAT *")] float* right) { @@ -170,6 +193,7 @@ public int get_BoundaryRight([NativeTypeName("FLOAT *")] float* right) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] [return: NativeTypeName("HRESULT")] public int put_BoundaryRight([NativeTypeName("FLOAT")] float right) { @@ -177,6 +201,7 @@ public int put_BoundaryRight([NativeTypeName("FLOAT")] float right) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(23)] [return: NativeTypeName("HRESULT")] public int get_BoundaryBottom([NativeTypeName("FLOAT *")] float* bottom) { @@ -184,6 +209,7 @@ public int get_BoundaryBottom([NativeTypeName("FLOAT *")] float* bottom) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(24)] [return: NativeTypeName("HRESULT")] public int put_BoundaryBottom([NativeTypeName("FLOAT")] float bottom) { @@ -191,6 +217,7 @@ public int put_BoundaryBottom([NativeTypeName("FLOAT")] float bottom) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(25)] [return: NativeTypeName("HRESULT")] public int get_ElasticMarginLeft([NativeTypeName("FLOAT *")] float* left) { @@ -198,6 +225,7 @@ public int get_ElasticMarginLeft([NativeTypeName("FLOAT *")] float* left) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(26)] [return: NativeTypeName("HRESULT")] public int put_ElasticMarginLeft([NativeTypeName("FLOAT")] float left) { @@ -205,6 +233,7 @@ public int put_ElasticMarginLeft([NativeTypeName("FLOAT")] float left) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(27)] [return: NativeTypeName("HRESULT")] public int get_ElasticMarginTop([NativeTypeName("FLOAT *")] float* top) { @@ -212,6 +241,7 @@ public int get_ElasticMarginTop([NativeTypeName("FLOAT *")] float* top) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(28)] [return: NativeTypeName("HRESULT")] public int put_ElasticMarginTop([NativeTypeName("FLOAT")] float top) { @@ -219,6 +249,7 @@ public int put_ElasticMarginTop([NativeTypeName("FLOAT")] float top) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(29)] [return: NativeTypeName("HRESULT")] public int get_ElasticMarginRight([NativeTypeName("FLOAT *")] float* right) { @@ -226,6 +257,7 @@ public int get_ElasticMarginRight([NativeTypeName("FLOAT *")] float* right) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(30)] [return: NativeTypeName("HRESULT")] public int put_ElasticMarginRight([NativeTypeName("FLOAT")] float right) { @@ -233,6 +265,7 @@ public int put_ElasticMarginRight([NativeTypeName("FLOAT")] float right) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(31)] [return: NativeTypeName("HRESULT")] public int get_ElasticMarginBottom([NativeTypeName("FLOAT *")] float* bottom) { @@ -240,6 +273,7 @@ public int get_ElasticMarginBottom([NativeTypeName("FLOAT *")] float* bottom) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(32)] [return: NativeTypeName("HRESULT")] public int put_ElasticMarginBottom([NativeTypeName("FLOAT")] float bottom) { @@ -247,6 +281,7 @@ public int put_ElasticMarginBottom([NativeTypeName("FLOAT")] float bottom) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(33)] [return: NativeTypeName("HRESULT")] public int get_DesiredDisplacement([NativeTypeName("FLOAT *")] float* displacement) { @@ -254,6 +289,7 @@ public int get_DesiredDisplacement([NativeTypeName("FLOAT *")] float* displaceme } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(34)] [return: NativeTypeName("HRESULT")] public int put_DesiredDisplacement([NativeTypeName("FLOAT")] float displacement) { @@ -261,6 +297,7 @@ public int put_DesiredDisplacement([NativeTypeName("FLOAT")] float displacement) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(35)] [return: NativeTypeName("HRESULT")] public int get_DesiredRotation([NativeTypeName("FLOAT *")] float* rotation) { @@ -268,6 +305,7 @@ public int get_DesiredRotation([NativeTypeName("FLOAT *")] float* rotation) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(36)] [return: NativeTypeName("HRESULT")] public int put_DesiredRotation([NativeTypeName("FLOAT")] float rotation) { @@ -275,6 +313,7 @@ public int put_DesiredRotation([NativeTypeName("FLOAT")] float rotation) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(37)] [return: NativeTypeName("HRESULT")] public int get_DesiredExpansion([NativeTypeName("FLOAT *")] float* expansion) { @@ -282,6 +321,7 @@ public int get_DesiredExpansion([NativeTypeName("FLOAT *")] float* expansion) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(38)] [return: NativeTypeName("HRESULT")] public int put_DesiredExpansion([NativeTypeName("FLOAT")] float expansion) { @@ -289,6 +329,7 @@ public int put_DesiredExpansion([NativeTypeName("FLOAT")] float expansion) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(39)] [return: NativeTypeName("HRESULT")] public int get_DesiredDeceleration([NativeTypeName("FLOAT *")] float* deceleration) { @@ -296,6 +337,7 @@ public int get_DesiredDeceleration([NativeTypeName("FLOAT *")] float* decelerati } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(40)] [return: NativeTypeName("HRESULT")] public int put_DesiredDeceleration([NativeTypeName("FLOAT")] float deceleration) { @@ -303,6 +345,7 @@ public int put_DesiredDeceleration([NativeTypeName("FLOAT")] float deceleration) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(41)] [return: NativeTypeName("HRESULT")] public int get_DesiredAngularDeceleration([NativeTypeName("FLOAT *")] float* deceleration) { @@ -310,6 +353,7 @@ public int get_DesiredAngularDeceleration([NativeTypeName("FLOAT *")] float* dec } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(42)] [return: NativeTypeName("HRESULT")] public int put_DesiredAngularDeceleration([NativeTypeName("FLOAT")] float deceleration) { @@ -317,6 +361,7 @@ public int put_DesiredAngularDeceleration([NativeTypeName("FLOAT")] float decele } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(43)] [return: NativeTypeName("HRESULT")] public int get_DesiredExpansionDeceleration([NativeTypeName("FLOAT *")] float* deceleration) { @@ -324,6 +369,7 @@ public int get_DesiredExpansionDeceleration([NativeTypeName("FLOAT *")] float* d } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(44)] [return: NativeTypeName("HRESULT")] public int put_DesiredExpansionDeceleration([NativeTypeName("FLOAT")] float deceleration) { @@ -331,6 +377,7 @@ public int put_DesiredExpansionDeceleration([NativeTypeName("FLOAT")] float dece } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(45)] [return: NativeTypeName("HRESULT")] public int get_InitialTimestamp([NativeTypeName("DWORD *")] uint* timestamp) { @@ -338,6 +385,7 @@ public int get_InitialTimestamp([NativeTypeName("DWORD *")] uint* timestamp) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(46)] [return: NativeTypeName("HRESULT")] public int put_InitialTimestamp([NativeTypeName("DWORD")] uint timestamp) { @@ -345,6 +393,7 @@ public int put_InitialTimestamp([NativeTypeName("DWORD")] uint timestamp) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(47)] [return: NativeTypeName("HRESULT")] public int Reset() { @@ -352,6 +401,7 @@ public int Reset() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(48)] [return: NativeTypeName("HRESULT")] public int Process([NativeTypeName("BOOL *")] int* completed) { @@ -359,6 +409,7 @@ public int Process([NativeTypeName("BOOL *")] int* completed) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(49)] [return: NativeTypeName("HRESULT")] public int ProcessTime([NativeTypeName("DWORD")] uint timestamp, [NativeTypeName("BOOL *")] int* completed) { @@ -366,6 +417,7 @@ public int ProcessTime([NativeTypeName("DWORD")] uint timestamp, [NativeTypeName } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(50)] [return: NativeTypeName("HRESULT")] public int Complete() { @@ -373,6 +425,7 @@ public int Complete() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(51)] [return: NativeTypeName("HRESULT")] public int CompleteTime([NativeTypeName("DWORD")] uint timestamp) { diff --git a/sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs b/sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs index fd506b05cd..1180eacd5e 100644 --- a/sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs +++ b/sources/Interop/Windows/um/manipulations/IManipulationProcessor.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("A22AC519-8300-48A0-BEF4-F1BE8737DBA4")] [NativeTypeName("struct IManipulationProcessor : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IManipulationProcessor { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,13 +41,15 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] - public int get_SupportedManipulations([NativeTypeName("MANIPULATION_PROCESSOR_MANIPULATIONS *")] MANIPULATION_PROCESSOR_MANIPULATIONS* manipulations) + public int get_SupportedManipulations(MANIPULATION_PROCESSOR_MANIPULATIONS* manipulations) { return ((delegate* unmanaged)(lpVtbl[3]))((IManipulationProcessor*)Unsafe.AsPointer(ref this), manipulations); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int put_SupportedManipulations(MANIPULATION_PROCESSOR_MANIPULATIONS manipulations) { @@ -51,6 +57,7 @@ public int put_SupportedManipulations(MANIPULATION_PROCESSOR_MANIPULATIONS manip } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int get_PivotPointX([NativeTypeName("FLOAT *")] float* pivotPointX) { @@ -58,6 +65,7 @@ public int get_PivotPointX([NativeTypeName("FLOAT *")] float* pivotPointX) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int put_PivotPointX([NativeTypeName("FLOAT")] float pivotPointX) { @@ -65,6 +73,7 @@ public int put_PivotPointX([NativeTypeName("FLOAT")] float pivotPointX) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] public int get_PivotPointY([NativeTypeName("FLOAT *")] float* pivotPointY) { @@ -72,6 +81,7 @@ public int get_PivotPointY([NativeTypeName("FLOAT *")] float* pivotPointY) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] [return: NativeTypeName("HRESULT")] public int put_PivotPointY([NativeTypeName("FLOAT")] float pivotPointY) { @@ -79,6 +89,7 @@ public int put_PivotPointY([NativeTypeName("FLOAT")] float pivotPointY) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] [return: NativeTypeName("HRESULT")] public int get_PivotRadius([NativeTypeName("FLOAT *")] float* pivotRadius) { @@ -86,6 +97,7 @@ public int get_PivotRadius([NativeTypeName("FLOAT *")] float* pivotRadius) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] [return: NativeTypeName("HRESULT")] public int put_PivotRadius([NativeTypeName("FLOAT")] float pivotRadius) { @@ -93,6 +105,7 @@ public int put_PivotRadius([NativeTypeName("FLOAT")] float pivotRadius) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] [return: NativeTypeName("HRESULT")] public int CompleteManipulation() { @@ -100,6 +113,7 @@ public int CompleteManipulation() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] [return: NativeTypeName("HRESULT")] public int ProcessDown([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) { @@ -107,6 +121,7 @@ public int ProcessDown([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [N } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] [return: NativeTypeName("HRESULT")] public int ProcessMove([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) { @@ -114,6 +129,7 @@ public int ProcessMove([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [N } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] [return: NativeTypeName("HRESULT")] public int ProcessUp([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) { @@ -121,6 +137,7 @@ public int ProcessUp([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [Nat } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] [return: NativeTypeName("HRESULT")] public int ProcessDownWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("DWORD")] uint timestamp) { @@ -128,6 +145,7 @@ public int ProcessDownWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulat } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] [return: NativeTypeName("HRESULT")] public int ProcessMoveWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("DWORD")] uint timestamp) { @@ -135,6 +153,7 @@ public int ProcessMoveWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulat } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] [return: NativeTypeName("HRESULT")] public int ProcessUpWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulatorId, [NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("DWORD")] uint timestamp) { @@ -142,6 +161,7 @@ public int ProcessUpWithTime([NativeTypeName("MANIPULATOR_ID")] uint manipulator } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] [return: NativeTypeName("HRESULT")] public int GetVelocityX([NativeTypeName("FLOAT *")] float* velocityX) { @@ -149,6 +169,7 @@ public int GetVelocityX([NativeTypeName("FLOAT *")] float* velocityX) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] [return: NativeTypeName("HRESULT")] public int GetVelocityY([NativeTypeName("FLOAT *")] float* velocityY) { @@ -156,6 +177,7 @@ public int GetVelocityY([NativeTypeName("FLOAT *")] float* velocityY) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] [return: NativeTypeName("HRESULT")] public int GetExpansionVelocity([NativeTypeName("FLOAT *")] float* expansionVelocity) { @@ -163,6 +185,7 @@ public int GetExpansionVelocity([NativeTypeName("FLOAT *")] float* expansionVelo } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] [return: NativeTypeName("HRESULT")] public int GetAngularVelocity([NativeTypeName("FLOAT *")] float* angularVelocity) { @@ -170,6 +193,7 @@ public int GetAngularVelocity([NativeTypeName("FLOAT *")] float* angularVelocity } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] [return: NativeTypeName("HRESULT")] public int get_MinimumScaleRotateRadius([NativeTypeName("FLOAT *")] float* minRadius) { @@ -177,6 +201,7 @@ public int get_MinimumScaleRotateRadius([NativeTypeName("FLOAT *")] float* minRa } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(23)] [return: NativeTypeName("HRESULT")] public int put_MinimumScaleRotateRadius([NativeTypeName("FLOAT")] float minRadius) { diff --git a/sources/Interop/Windows/um/manipulations/InertiaProcessor.cs b/sources/Interop/Windows/um/manipulations/InertiaProcessor.cs index 7b1bf0db8d..2f1e226f4e 100644 --- a/sources/Interop/Windows/um/manipulations/InertiaProcessor.cs +++ b/sources/Interop/Windows/um/manipulations/InertiaProcessor.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs b/sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs index 31b7e21f5b..ddf9d2eb8e 100644 --- a/sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs +++ b/sources/Interop/Windows/um/manipulations/MANIPULATION_PROCESSOR_MANIPULATIONS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs b/sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs index 1af18c81dc..d17d9400c6 100644 --- a/sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs +++ b/sources/Interop/Windows/um/manipulations/ManipulationProcessor.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/manipulations/Windows.cs b/sources/Interop/Windows/um/manipulations/Windows.cs index 6df39e06b3..a428423ed4 100644 --- a/sources/Interop/Windows/um/manipulations/Windows.cs +++ b/sources/Interop/Windows/um/manipulations/Windows.cs @@ -1,9 +1,12 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { @@ -19,21 +22,153 @@ public static partial class Windows public const float NaN = ((float)((1e308 * 10) * 0.0)); [NativeTypeName("const IID")] - public static readonly Guid LIBID_ManipulationsLib = new Guid(0x935610b3, 0x6f81, 0x450f, 0x85, 0xd5, 0x42, 0xd3, 0xd2, 0x6c, 0x5c, 0x11); + public static ref readonly Guid LIBID_ManipulationsLib + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xB3, 0x10, 0x56, 0x93, + 0x81, 0x6F, + 0x0F, 0x45, + 0x85, + 0xD5, + 0x42, + 0xD3, + 0xD2, + 0x6C, + 0x5C, + 0x11 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const IID")] - public static readonly Guid IID__IManipulationEvents = new Guid(0x4f62c8da, 0x9c53, 0x4b22, 0x93, 0xdf, 0x92, 0x7a, 0x86, 0x2b, 0xbb, 0x03); + public static ref readonly Guid IID__IManipulationEvents + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xDA, 0xC8, 0x62, 0x4F, + 0x53, 0x9C, + 0x22, 0x4B, + 0x93, + 0xDF, + 0x92, + 0x7A, + 0x86, + 0x2B, + 0xBB, + 0x03 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const IID")] - public static readonly Guid IID_IInertiaProcessor = new Guid(0x18b00c6d, 0xc5ee, 0x41b1, 0x90, 0xa9, 0x9d, 0x4a, 0x92, 0x90, 0x95, 0xad); + public static ref readonly Guid IID_IInertiaProcessor + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x6D, 0x0C, 0xB0, 0x18, + 0xEE, 0xC5, + 0xB1, 0x41, + 0x90, + 0xA9, + 0x9D, + 0x4A, + 0x92, + 0x90, + 0x95, + 0xAD + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const IID")] - public static readonly Guid IID_IManipulationProcessor = new Guid(0xA22AC519, 0x8300, 0x48a0, 0xBE, 0xF4, 0xF1, 0xBE, 0x87, 0x37, 0xDB, 0xA4); + public static ref readonly Guid IID_IManipulationProcessor + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x19, 0xC5, 0x2A, 0xA2, + 0x00, 0x83, + 0xA0, 0x48, + 0xBE, + 0xF4, + 0xF1, + 0xBE, + 0x87, + 0x37, + 0xDB, + 0xA4 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const CLSID")] - public static readonly Guid CLSID_InertiaProcessor = new Guid(0xabb27087, 0x4ce0, 0x4e58, 0xa0, 0xcb, 0xe2, 0x4d, 0xf9, 0x68, 0x14, 0xbe); + public static ref readonly Guid CLSID_InertiaProcessor + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x87, 0x70, 0xB2, 0xAB, + 0xE0, 0x4C, + 0x58, 0x4E, + 0xA0, + 0xCB, + 0xE2, + 0x4D, + 0xF9, + 0x68, + 0x14, + 0xBE + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const CLSID")] - public static readonly Guid CLSID_ManipulationProcessor = new Guid(0x597D4FB0, 0x47FD, 0x4aff, 0x89, 0xB9, 0xC6, 0xCF, 0xAE, 0x8C, 0xF0, 0x8E); + public static ref readonly Guid CLSID_ManipulationProcessor + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xB0, 0x4F, 0x7D, 0x59, + 0xFD, 0x47, + 0xFF, 0x4A, + 0x89, + 0xB9, + 0xC6, + 0xCF, + 0xAE, + 0x8C, + 0xF0, + 0x8E + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs b/sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs index 65d00e65bc..72078219fa 100644 --- a/sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs +++ b/sources/Interop/Windows/um/manipulations/_IManipulationEvents.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("4F62C8DA-9C53-4B22-93DF-927A862BBB03")] [NativeTypeName("struct _IManipulationEvents : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct _IManipulationEvents { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged<_IManipulationEvents*, Guid*, void**, int>)(lpVtbl[0]))((_IManipulationEvents*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int ManipulationStarted([NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y) { @@ -44,6 +49,7 @@ public int ManipulationStarted([NativeTypeName("FLOAT")] float x, [NativeTypeNam } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int ManipulationDelta([NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("FLOAT")] float translationDeltaX, [NativeTypeName("FLOAT")] float translationDeltaY, [NativeTypeName("FLOAT")] float scaleDelta, [NativeTypeName("FLOAT")] float expansionDelta, [NativeTypeName("FLOAT")] float rotationDelta, [NativeTypeName("FLOAT")] float cumulativeTranslationX, [NativeTypeName("FLOAT")] float cumulativeTranslationY, [NativeTypeName("FLOAT")] float cumulativeScale, [NativeTypeName("FLOAT")] float cumulativeExpansion, [NativeTypeName("FLOAT")] float cumulativeRotation) { @@ -51,6 +57,7 @@ public int ManipulationDelta([NativeTypeName("FLOAT")] float x, [NativeTypeName( } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int ManipulationCompleted([NativeTypeName("FLOAT")] float x, [NativeTypeName("FLOAT")] float y, [NativeTypeName("FLOAT")] float cumulativeTranslationX, [NativeTypeName("FLOAT")] float cumulativeTranslationY, [NativeTypeName("FLOAT")] float cumulativeScale, [NativeTypeName("FLOAT")] float cumulativeExpansion, [NativeTypeName("FLOAT")] float cumulativeRotation) { diff --git a/sources/Interop/Windows/um/msports/Windows.cs b/sources/Interop/Windows/um/msports/Windows.cs index d7f4ea9f0e..9ffc1f4a21 100644 --- a/sources/Interop/Windows/um/msports/Windows.cs +++ b/sources/Interop/Windows/um/msports/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/msports.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/msports.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -43,7 +43,7 @@ public static unsafe partial class Windows public static extern int ComDBResizeDatabase([NativeTypeName("HCOMDB")] IntPtr HComDB, [NativeTypeName("DWORD")] uint NewSize); [NativeTypeName("#define HCOMDB_INVALID_HANDLE_VALUE ((HCOMDB) INVALID_HANDLE_VALUE)")] - public static readonly IntPtr HCOMDB_INVALID_HANDLE_VALUE = ((IntPtr)((IntPtr)((nint)(-1)))); + public static IntPtr HCOMDB_INVALID_HANDLE_VALUE => ((nint)((nint)((nint)(-1)))); [NativeTypeName("#define COMDB_MIN_PORTS_ARBITRATED 256")] public const int COMDB_MIN_PORTS_ARBITRATED = 256; diff --git a/sources/Interop/Windows/um/oobenotification/Windows.cs b/sources/Interop/Windows/um/oobenotification/Windows.cs index 85ef660fc0..df3ec3200a 100644 --- a/sources/Interop/Windows/um/oobenotification/Windows.cs +++ b/sources/Interop/Windows/um/oobenotification/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/oobenotification.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/oobenotification.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs b/sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs index dcbab29af2..069c9bad58 100644 --- a/sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs +++ b/sources/Interop/Windows/um/rendezvoussession/DRendezvousSessionEvents.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("3FA19CF8-64C4-4F53-AE60-635B3806ECA6")] [NativeTypeName("struct DRendezvousSessionEvents : IDispatch")] + [NativeInheritance("IDispatch")] public unsafe partial struct DRendezvousSessionEvents { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,6 +41,7 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] public int GetTypeInfoCount([NativeTypeName("UINT *")] uint* pctinfo) { @@ -44,13 +49,15 @@ public int GetTypeInfoCount([NativeTypeName("UINT *")] uint* pctinfo) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] - public int GetTypeInfo([NativeTypeName("UINT")] uint iTInfo, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("ITypeInfo **")] ITypeInfo** ppTInfo) + public int GetTypeInfo([NativeTypeName("UINT")] uint iTInfo, [NativeTypeName("LCID")] uint lcid, ITypeInfo** ppTInfo) { return ((delegate* unmanaged)(lpVtbl[4]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), iTInfo, lcid, ppTInfo); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int GetIDsOfNames([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPOLESTR *")] ushort** rgszNames, [NativeTypeName("UINT")] uint cNames, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("DISPID *")] int* rgDispId) { @@ -58,8 +65,9 @@ public int GetIDsOfNames([NativeTypeName("const IID &")] Guid* riid, [NativeType } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] - public int Invoke([NativeTypeName("DISPID")] int dispIdMember, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("WORD")] ushort wFlags, [NativeTypeName("DISPPARAMS *")] DISPPARAMS* pDispParams, [NativeTypeName("VARIANT *")] VARIANT* pVarResult, [NativeTypeName("EXCEPINFO *")] EXCEPINFO* pExcepInfo, [NativeTypeName("UINT *")] uint* puArgErr) + public int Invoke([NativeTypeName("DISPID")] int dispIdMember, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LCID")] uint lcid, [NativeTypeName("WORD")] ushort wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, [NativeTypeName("UINT *")] uint* puArgErr) { return ((delegate* unmanaged)(lpVtbl[6]))((DRendezvousSessionEvents*)Unsafe.AsPointer(ref this), dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } diff --git a/sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs b/sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs index 9a4215b6cb..2dfe3a96a3 100644 --- a/sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs +++ b/sources/Interop/Windows/um/rendezvoussession/IRendezvousApplication.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("4F4D070B-A275-49FB-B10D-8EC26387B50D")] [NativeTypeName("struct IRendezvousApplication : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IRendezvousApplication { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IRendezvousApplication*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,8 +41,9 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] - public int SetRendezvousSession([NativeTypeName("IUnknown *")] IUnknown* pRendezvousSession) + public int SetRendezvousSession(IUnknown* pRendezvousSession) { return ((delegate* unmanaged)(lpVtbl[3]))((IRendezvousApplication*)Unsafe.AsPointer(ref this), pRendezvousSession); } diff --git a/sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs b/sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs index f9e27b0ec9..a474678506 100644 --- a/sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs +++ b/sources/Interop/Windows/um/rendezvoussession/IRendezvousSession.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("9BA4B1DD-8B0C-48B7-9E7C-2F25857C8DF5")] [NativeTypeName("struct IRendezvousSession : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IRendezvousSession { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IRendezvousSession*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,13 +41,15 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] - public int get_State([NativeTypeName("RENDEZVOUS_SESSION_STATE *")] RENDEZVOUS_SESSION_STATE* pSessionState) + public int get_State(RENDEZVOUS_SESSION_STATE* pSessionState) { return ((delegate* unmanaged)(lpVtbl[3]))((IRendezvousSession*)Unsafe.AsPointer(ref this), pSessionState); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int get_RemoteUser([NativeTypeName("BSTR *")] ushort** bstrUserName) { @@ -51,6 +57,7 @@ public int get_RemoteUser([NativeTypeName("BSTR *")] ushort** bstrUserName) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] [return: NativeTypeName("HRESULT")] public int get_Flags([NativeTypeName("LONG *")] int* pFlags) { @@ -58,6 +65,7 @@ public int get_Flags([NativeTypeName("LONG *")] int* pFlags) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] [return: NativeTypeName("HRESULT")] public int SendContextData([NativeTypeName("BSTR")] ushort* bstrData) { @@ -65,6 +73,7 @@ public int SendContextData([NativeTypeName("BSTR")] ushort* bstrData) } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] [return: NativeTypeName("HRESULT")] public int Terminate([NativeTypeName("HRESULT")] int hr, [NativeTypeName("BSTR")] ushort* bstrAppData) { diff --git a/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs index a7b8dbb7f2..be804e9586 100644 --- a/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs +++ b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_FLAGS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs index 3b1c5ad2f0..3b28bdf9de 100644 --- a/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs +++ b/sources/Interop/Windows/um/rendezvoussession/RENDEZVOUS_SESSION_STATE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs b/sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs index 9aa176ef7e..dfb77d0151 100644 --- a/sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs +++ b/sources/Interop/Windows/um/rendezvoussession/RendezvousApplication.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/um/rendezvoussession/Windows.cs b/sources/Interop/Windows/um/rendezvoussession/Windows.cs index 7f47504c52..374453df1f 100644 --- a/sources/Interop/Windows/um/rendezvoussession/Windows.cs +++ b/sources/Interop/Windows/um/rendezvoussession/Windows.cs @@ -1,28 +1,141 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { public static partial class Windows { [NativeTypeName("const IID")] - public static readonly Guid LIBID_RendezvousSessionLib = new Guid(0xEFD856A4, 0x5A85, 0x4A1B, 0xAD, 0xD5, 0x2E, 0xAD, 0xAC, 0xE6, 0xF6, 0xA2); + public static ref readonly Guid LIBID_RendezvousSessionLib + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xA4, 0x56, 0xD8, 0xEF, + 0x85, 0x5A, + 0x1B, 0x4A, + 0xAD, + 0xD5, + 0x2E, + 0xAD, + 0xAC, + 0xE6, + 0xF6, + 0xA2 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const IID")] - public static readonly Guid IID_IRendezvousSession = new Guid(0x9BA4B1DD, 0x8B0C, 0x48B7, 0x9E, 0x7C, 0x2F, 0x25, 0x85, 0x7C, 0x8D, 0xF5); + public static ref readonly Guid IID_IRendezvousSession + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xDD, 0xB1, 0xA4, 0x9B, + 0x0C, 0x8B, + 0xB7, 0x48, + 0x9E, + 0x7C, + 0x2F, + 0x25, + 0x85, + 0x7C, + 0x8D, + 0xF5 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const IID")] - public static readonly Guid DIID_DRendezvousSessionEvents = new Guid(0x3FA19CF8, 0x64C4, 0x4F53, 0xAE, 0x60, 0x63, 0x5B, 0x38, 0x06, 0xEC, 0xA6); + public static ref readonly Guid DIID_DRendezvousSessionEvents + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xF8, 0x9C, 0xA1, 0x3F, + 0xC4, 0x64, + 0x53, 0x4F, + 0xAE, + 0x60, + 0x63, + 0x5B, + 0x38, + 0x06, + 0xEC, + 0xA6 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const IID")] - public static readonly Guid IID_IRendezvousApplication = new Guid(0x4F4D070B, 0xA275, 0x49FB, 0xB1, 0x0D, 0x8E, 0xC2, 0x63, 0x87, 0xB5, 0x0D); + public static ref readonly Guid IID_IRendezvousApplication + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x0B, 0x07, 0x4D, 0x4F, + 0x75, 0xA2, + 0xFB, 0x49, + 0xB1, + 0x0D, + 0x8E, + 0xC2, + 0x63, + 0x87, + 0xB5, + 0x0D + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("const CLSID")] - public static readonly Guid CLSID_RendezvousApplication = new Guid(0x0B7E019A, 0xB5DE, 0x47fa, 0x89, 0x66, 0x90, 0x82, 0xF8, 0x2F, 0xB1, 0x92); + public static ref readonly Guid CLSID_RendezvousApplication + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x9A, 0x01, 0x7E, 0x0B, + 0xDE, 0xB5, + 0xFA, 0x47, + 0x89, + 0x66, + 0x90, + 0x82, + 0xF8, + 0x2F, + 0xB1, + 0x92 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } [NativeTypeName("#define DISPID_EVENT_ON_STATE_CHANGED ( 5 )")] public const int DISPID_EVENT_ON_STATE_CHANGED = (5); diff --git a/sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs b/sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs index 936cc25641..48f203bdd9 100644 --- a/sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs +++ b/sources/Interop/Windows/um/shtypes/SHCOLSTATE.cs @@ -3,6 +3,8 @@ // Ported from um/shtypes.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. +using System; + namespace TerraFX.Interop { [Flags] diff --git a/sources/Interop/Windows/um/strmif/Windows.cs b/sources/Interop/Windows/um/strmif/Windows.cs index c7843b2cc2..15a28e0495 100644 --- a/sources/Interop/Windows/um/strmif/Windows.cs +++ b/sources/Interop/Windows/um/strmif/Windows.cs @@ -7,6 +7,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using static TerraFX.Interop.Windows; namespace TerraFX.Interop { diff --git a/sources/Interop/Windows/um/swdevice/Windows.cs b/sources/Interop/Windows/um/swdevice/Windows.cs index 5bc57b2d2e..fca887d9b9 100644 --- a/sources/Interop/Windows/um/swdevice/Windows.cs +++ b/sources/Interop/Windows/um/swdevice/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/swdevice.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/swdevice.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs index a7fcc8733f..a072e6569c 100644 --- a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs +++ b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CAPABILITIES.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs index 0341f945cf..1bf45f56fe 100644 --- a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs +++ b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs index 92b7beda32..4f52c8eb2b 100644 --- a/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs +++ b/sources/Interop/Windows/um/swdevicedef/SW_DEVICE_LIFETIME.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs b/sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs index fe57b88ed7..94c498df8e 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs index 969c03a4bd..b97d111cf6 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs index d827b6f3ad..ae8e49d9e9 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATA.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs index 60f3b0680a..586ba86fa4 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_SOURCE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs b/sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs index 360722d47a..450c833371 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUS.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs b/sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs index 2dd324e8c0..b8081161d5 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_MEDIA_TYPE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs b/sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs index 3efe1da03c..b4491076a4 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_POLICY_VALUE.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs index 394cd8c9bf..6ccbca76aa 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs index ee5d778006..f995637f25 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LIST.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; diff --git a/sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs b/sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs index a604a10ec8..6018851ee4 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_PROPERTY.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs b/sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs index 6de9606ea5..cdd3e62cc0 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_TIME_INTERVAL.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs b/sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs index 152a2b2afb..29a2713b27 100644 --- a/sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs +++ b/sources/Interop/Windows/um/wcmapi/WCM_USAGE_DATA.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. namespace TerraFX.Interop diff --git a/sources/Interop/Windows/um/wcmapi/Windows.cs b/sources/Interop/Windows/um/wcmapi/Windows.cs index 35de48db9c..6f35f4d83f 100644 --- a/sources/Interop/Windows/um/wcmapi/Windows.cs +++ b/sources/Interop/Windows/um/wcmapi/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -12,22 +12,22 @@ public static unsafe partial class Windows { [DllImport("wcmapi", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint WcmQueryProperty([NativeTypeName("const GUID *")] Guid* pInterface, [NativeTypeName("LPCWSTR")] ushort* strProfileName, WCM_PROPERTY Property, [NativeTypeName("PVOID")] void* pReserved, [NativeTypeName("PDWORD")] uint* pdwDataSize, [NativeTypeName("PBYTE *")] byte** ppData); + public static extern uint WcmQueryProperty([NativeTypeName("const GUID *")] Guid* pInterface, [NativeTypeName("LPCWSTR")] ushort* strProfileName, WCM_PROPERTY Property, void* pReserved, [NativeTypeName("PDWORD")] uint* pdwDataSize, [NativeTypeName("PBYTE *")] byte** ppData); [DllImport("wcmapi", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint WcmSetProperty([NativeTypeName("const GUID *")] Guid* pInterface, [NativeTypeName("LPCWSTR")] ushort* strProfileName, WCM_PROPERTY Property, [NativeTypeName("PVOID")] void* pReserved, [NativeTypeName("DWORD")] uint dwDataSize, [NativeTypeName("const BYTE *")] byte* pbData); + public static extern uint WcmSetProperty([NativeTypeName("const GUID *")] Guid* pInterface, [NativeTypeName("LPCWSTR")] ushort* strProfileName, WCM_PROPERTY Property, void* pReserved, [NativeTypeName("DWORD")] uint dwDataSize, [NativeTypeName("const BYTE *")] byte* pbData); [DllImport("wcmapi", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint WcmGetProfileList([NativeTypeName("PVOID")] void* pReserved, [NativeTypeName("WCM_PROFILE_INFO_LIST **")] WCM_PROFILE_INFO_LIST** ppProfileList); + public static extern uint WcmGetProfileList(void* pReserved, WCM_PROFILE_INFO_LIST** ppProfileList); [DllImport("wcmapi", ExactSpelling = true)] [return: NativeTypeName("DWORD")] - public static extern uint WcmSetProfileList([NativeTypeName("WCM_PROFILE_INFO_LIST *")] WCM_PROFILE_INFO_LIST* pProfileList, [NativeTypeName("DWORD")] uint dwPosition, [NativeTypeName("BOOL")] int fIgnoreUnknownProfiles, [NativeTypeName("PVOID")] void* pReserved); + public static extern uint WcmSetProfileList(WCM_PROFILE_INFO_LIST* pProfileList, [NativeTypeName("DWORD")] uint dwPosition, [NativeTypeName("BOOL")] int fIgnoreUnknownProfiles, void* pReserved); [DllImport("wcmapi", ExactSpelling = true)] - public static extern void WcmFreeMemory([NativeTypeName("PVOID")] void* pMemory); + public static extern void WcmFreeMemory(void* pMemory); [NativeTypeName("#define WCM_API_VERSION_1_0 0x00000001")] public const int WCM_API_VERSION_1_0 = 0x00000001; diff --git a/sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs b/sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs index 742e988364..e2fa0cb8c6 100644 --- a/sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs +++ b/sources/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSource.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("A96BB1DB-172E-4667-82B5-AD97A252318F")] [NativeTypeName("struct IPrintDocumentPageSource : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IPrintDocumentPageSource { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,15 +41,17 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] - public int GetPreviewPageCollection([NativeTypeName("IPrintDocumentPackageTarget *")] IPrintDocumentPackageTarget* docPackageTarget, [NativeTypeName("IPrintPreviewPageCollection **")] IPrintPreviewPageCollection** docPageCollection) + public int GetPreviewPageCollection(IPrintDocumentPackageTarget* docPackageTarget, IPrintPreviewPageCollection** docPageCollection) { return ((delegate* unmanaged)(lpVtbl[3]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this), docPackageTarget, docPageCollection); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] - public int MakeDocument([NativeTypeName("IInspectable *")] IInspectable* printTaskOptions, [NativeTypeName("IPrintDocumentPackageTarget *")] IPrintDocumentPackageTarget* docPackageTarget) + public int MakeDocument(IInspectable* printTaskOptions, IPrintDocumentPackageTarget* docPackageTarget) { return ((delegate* unmanaged)(lpVtbl[4]))((IPrintDocumentPageSource*)Unsafe.AsPointer(ref this), printTaskOptions, docPackageTarget); } diff --git a/sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs b/sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs index ace9e0a7e2..240bc1f0b9 100644 --- a/sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs +++ b/sources/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollection.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -11,18 +11,21 @@ namespace TerraFX.Interop { [Guid("0B31CC62-D7EC-4747-9D6E-F2537D870F2B")] [NativeTypeName("struct IPrintPreviewPageCollection : IUnknown")] + [NativeInheritance("IUnknown")] public unsafe partial struct IPrintPreviewPageCollection { public void** lpVtbl; [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] [return: NativeTypeName("HRESULT")] - public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject) + public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) { return ((delegate* unmanaged)(lpVtbl[0]))((IPrintPreviewPageCollection*)Unsafe.AsPointer(ref this), riid, ppvObject); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] [return: NativeTypeName("ULONG")] public uint AddRef() { @@ -30,6 +33,7 @@ public uint AddRef() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] [return: NativeTypeName("ULONG")] public uint Release() { @@ -37,13 +41,15 @@ public uint Release() } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] [return: NativeTypeName("HRESULT")] - public int Paginate([NativeTypeName("UINT32")] uint currentJobPage, [NativeTypeName("IInspectable *")] IInspectable* printTaskOptions) + public int Paginate([NativeTypeName("UINT32")] uint currentJobPage, IInspectable* printTaskOptions) { return ((delegate* unmanaged)(lpVtbl[3]))((IPrintPreviewPageCollection*)Unsafe.AsPointer(ref this), currentJobPage, printTaskOptions); } [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] [return: NativeTypeName("HRESULT")] public int MakePage([NativeTypeName("UINT32")] uint desiredJobPage, [NativeTypeName("FLOAT")] float width, [NativeTypeName("FLOAT")] float height) { diff --git a/sources/Interop/Windows/winrt/DocumentSource/Windows.cs b/sources/Interop/Windows/winrt/DocumentSource/Windows.cs index 08e36251a4..067763014d 100644 --- a/sources/Interop/Windows/winrt/DocumentSource/Windows.cs +++ b/sources/Interop/Windows/winrt/DocumentSource/Windows.cs @@ -1,9 +1,12 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace TerraFX.Interop { @@ -12,8 +15,50 @@ public static partial class Windows [NativeTypeName("#define JOB_PAGE_APPLICATION_DEFINED ( ( UINT32 )-1 )")] public const uint JOB_PAGE_APPLICATION_DEFINED = unchecked((uint)(-1)); - public static readonly Guid IID_IPrintPreviewPageCollection = new Guid(0x0B31CC62, 0xD7EC, 0x4747, 0x9D, 0x6E, 0xF2, 0x53, 0x7D, 0x87, 0x0F, 0x2B); + public static ref readonly Guid IID_IPrintPreviewPageCollection + { + get + { + ReadOnlySpan data = new byte[] { + 0x62, 0xCC, 0x31, 0x0B, + 0xEC, 0xD7, + 0x47, 0x47, + 0x9D, + 0x6E, + 0xF2, + 0x53, + 0x7D, + 0x87, + 0x0F, + 0x2B + }; - public static readonly Guid IID_IPrintDocumentPageSource = new Guid(0xA96BB1DB, 0x172E, 0x4667, 0x82, 0xB5, 0xAD, 0x97, 0xA2, 0x52, 0x31, 0x8F); + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + + public static ref readonly Guid IID_IPrintDocumentPageSource + { + get + { + ReadOnlySpan data = new byte[] { + 0xDB, 0xB1, 0x6B, 0xA9, + 0x2E, 0x17, + 0x67, 0x46, + 0x82, + 0xB5, + 0xAD, + 0x97, + 0xA2, + 0x52, + 0x31, + 0x8F + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } } } diff --git a/sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs b/sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs index 0bc2ecd59b..d2c1019bc1 100644 --- a/sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs +++ b/sources/Interop/Windows/winrt/MessageDispatcherApi/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/MessageDispatcherApi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/MessageDispatcherApi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System.Runtime.InteropServices; diff --git a/sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs b/sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs index 1f20dab545..9e468f66ca 100644 --- a/sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs +++ b/sources/Interop/Windows/winrt/Wsdevlicensing/Windows.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/Wsdevlicensing.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/Wsdevlicensing.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using System; @@ -12,11 +12,11 @@ public static unsafe partial class Windows { [DllImport("wsclient", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int CheckDeveloperLicense([NativeTypeName("FILETIME *")] FILETIME* pExpiration); + public static extern int CheckDeveloperLicense(FILETIME* pExpiration); [DllImport("wsclient", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] - public static extern int AcquireDeveloperLicense([NativeTypeName("HWND")] IntPtr hwndParent, [NativeTypeName("FILETIME *")] FILETIME* pExpiration); + public static extern int AcquireDeveloperLicense([NativeTypeName("HWND")] IntPtr hwndParent, FILETIME* pExpiration); [DllImport("wsclient", ExactSpelling = true)] [return: NativeTypeName("HRESULT")] diff --git a/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs index 678a751619..af1f93b2be 100644 --- a/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs +++ b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMS2Tests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs index de1e65b619..cd4ffaef1f 100644 --- a/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs +++ b/tests/Interop/Windows/shared/tbs/TBS_CONTEXT_PARAMSTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs b/tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs index 350510c6ca..a4fb4275ac 100644 --- a/tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs +++ b/tests/Interop/Windows/shared/tbs/TPM_DEVICE_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs b/tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs index 75a06e3489..de925c5367 100644 --- a/tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs +++ b/tests/Interop/Windows/shared/tbs/TPM_WNF_PROVISIONINGTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from shared/tbs.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs b/tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs index 0f709086f4..f78e35b65c 100644 --- a/tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs +++ b/tests/Interop/Windows/um/EvColl/EC_VARIANTTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/EvColl.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IContact/ContactManagerTests.cs b/tests/Interop/Windows/um/IContact/ContactManagerTests.cs index 173836563f..1a122c5c45 100644 --- a/tests/Interop/Windows/um/IContact/ContactManagerTests.cs +++ b/tests/Interop/Windows/um/IContact/ContactManagerTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IContact/ContactTests.cs b/tests/Interop/Windows/um/IContact/ContactTests.cs index f4e10192ff..a0d8fcc9d8 100644 --- a/tests/Interop/Windows/um/IContact/ContactTests.cs +++ b/tests/Interop/Windows/um/IContact/ContactTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IContact/IContactCollectionTests.cs b/tests/Interop/Windows/um/IContact/IContactCollectionTests.cs index dcb741ced9..1c80ac0f5c 100644 --- a/tests/Interop/Windows/um/IContact/IContactCollectionTests.cs +++ b/tests/Interop/Windows/um/IContact/IContactCollectionTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IContact/IContactManagerTests.cs b/tests/Interop/Windows/um/IContact/IContactManagerTests.cs index 6377879650..f33296df28 100644 --- a/tests/Interop/Windows/um/IContact/IContactManagerTests.cs +++ b/tests/Interop/Windows/um/IContact/IContactManagerTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs b/tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs index 960c3e2192..b3ee3eb55c 100644 --- a/tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs +++ b/tests/Interop/Windows/um/IContact/IContactPropertiesTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs b/tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs index b7defe8ad9..bbf47ea9db 100644 --- a/tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs +++ b/tests/Interop/Windows/um/IContact/IContactPropertyCollectionTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IContact/IContactTests.cs b/tests/Interop/Windows/um/IContact/IContactTests.cs index 6cb1ddd523..eb167626d1 100644 --- a/tests/Interop/Windows/um/IContact/IContactTests.cs +++ b/tests/Interop/Windows/um/IContact/IContactTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IContact.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IContact.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs b/tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs index 08ff358e0e..be0cc842cd 100644 --- a/tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs +++ b/tests/Interop/Windows/um/IMessageDispatcher/IMessageDispatcherTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IMessageDispatcher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/InkPresenterDesktop/WindowsTests.cs b/tests/Interop/Windows/um/InkPresenterDesktop/WindowsTests.cs new file mode 100644 index 0000000000..43889c233b --- /dev/null +++ b/tests/Interop/Windows/um/InkPresenterDesktop/WindowsTests.cs @@ -0,0 +1,57 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/InkPresenterDesktop.h and um/InkPresenterDesktop_i.c in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the class. + public static partial class WindowsTests + { + /// Validates that the value of the property is correct. + [Test] + public static void IID_IInkCommitRequestHandlerTest() + { + Assert.That(IID_IInkCommitRequestHandler, Is.EqualTo(new Guid(0xfabea3fc, 0xb108, 0x45b6, 0xa9, 0xfc, 0x8d, 0x08, 0xfa, 0x9f, 0x85, 0xcf))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IInkPresenterDesktopTest() + { + Assert.That(IID_IInkPresenterDesktop, Is.EqualTo(new Guid(0x73f3c0d9, 0x2e8b, 0x48f3, 0x89, 0x5e, 0x20, 0xcb, 0xd2, 0x7b, 0x72, 0x3b))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IInkHostWorkItemTest() + { + Assert.That(IID_IInkHostWorkItem, Is.EqualTo(new Guid(0xccda0a9a, 0x1b78, 0x4632, 0xbb, 0x96, 0x97, 0x80, 0x06, 0x62, 0xe2, 0x6c))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IInkDesktopHostTest() + { + Assert.That(IID_IInkDesktopHost, Is.EqualTo(new Guid(0x4ce7d875, 0xa981, 0x4140, 0xa1, 0xff, 0xad, 0x93, 0x25, 0x8e, 0x8d, 0x59))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void LIBID_InkDesktopHostLibTest() + { + Assert.That(LIBID_InkDesktopHostLib, Is.EqualTo(new Guid(0x2aef0967, 0xc833, 0x4f38, 0x91, 0xf3, 0x16, 0xe6, 0x7d, 0x55, 0xd7, 0x17))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void CLSID_InkDesktopHostTest() + { + Assert.That(CLSID_InkDesktopHost, Is.EqualTo(new Guid(0x062584a6, 0xf830, 0x4bdc, 0xa4, 0xd2, 0x0a, 0x10, 0xab, 0x06, 0x2b, 0x1d))); + } + } +} diff --git a/tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs b/tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs index 0fd9b530f4..2a1dfde598 100644 --- a/tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs +++ b/tests/Interop/Windows/um/IsolatedAppLauncher/IIsolatedAppLauncherTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs index 3db05d1238..470c19afe4 100644 --- a/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs +++ b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTelemetryParametersTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs index 581a307226..4b237f1636 100644 --- a/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs +++ b/tests/Interop/Windows/um/IsolatedAppLauncher/IsolatedAppLauncherTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/IsolatedAppLauncher.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs index 5baec5281c..28640cdd6a 100644 --- a/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs +++ b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_REGISTRATION_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs index 8844779506..dee37bedec 100644 --- a/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs +++ b/tests/Interop/Windows/um/MDMRegistration/MANAGEMENT_SERVICE_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MDMRegistration.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs b/tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs index 2dfd73f7f2..92c96c80e5 100644 --- a/tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs +++ b/tests/Interop/Windows/um/MSChapp/CYPHER_BLOCKTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs b/tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs index 54b1efd138..776c8f3792 100644 --- a/tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs +++ b/tests/Interop/Windows/um/MSChapp/ENCRYPTED_LM_OWF_PASSWORDTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs b/tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs index 03b5814f4d..527eaf943a 100644 --- a/tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs +++ b/tests/Interop/Windows/um/MSChapp/LM_OWF_PASSWORDTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs b/tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs index e3747c3812..e0cd0f3e16 100644 --- a/tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs +++ b/tests/Interop/Windows/um/MSChapp/SAMPR_ENCRYPTED_USER_PASSWORDTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/MSChapp.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs b/tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs index 9d18f74ad7..9c6bd05936 100644 --- a/tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs +++ b/tests/Interop/Windows/um/NotificationActivationCallback/INotificationActivationCallbackTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs b/tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs index 02b6676fad..be6f7a1f2c 100644 --- a/tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs +++ b/tests/Interop/Windows/um/NotificationActivationCallback/NOTIFICATION_USER_INPUT_DATATests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/NotificationActivationCallback.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs index a02b65a83e..bde4cf2319 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_ALLOCATORTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs index f4614629f0..4a157ab3c4 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGES_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs index 93f10f904b..a51691ca5c 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_AUXILIARY_PAGE_ENTRYTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs index 7e96bdac9a..a3abb0a511 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_ENTRYTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs index 9846f5c358..63180d8f5d 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs index 15497439cf..6fa9a021fc 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_HANDLE_TRACE_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs index 2268d71cd2..f3ad4941a3 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PERFORMANCE_COUNTERSTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs index b4d7f10e50..8465129235 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_PROCESS_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs index fbb440b1ca..9359b79eea 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_ENTRYTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs index dce67aff05..800e287b4a 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_THREAD_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs index 021a0f8546..1f9685ec74 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_CLONE_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs index 8077f48f35..fa3a20e302 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_ENTRYTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs index 38dc9a2248..308f6594ce 100644 --- a/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/ProcessSnapshot/PSS_VA_SPACE_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ProcessSnapshot.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs index a09fb09e66..6ab03936b3 100644 --- a/tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/Psapi/ENUM_PAGE_FILE_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs b/tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs index 5c5847f07f..4f70be2990 100644 --- a/tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs +++ b/tests/Interop/Windows/um/Psapi/MODULEINFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs index 984a645bc9..eb41fd9320 100644 --- a/tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/Psapi/PERFORMANCE_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs index 0f1d3dcfd4..17b7f147a0 100644 --- a/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs +++ b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERSTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs index 7fcd10126c..7cdc46adf6 100644 --- a/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs +++ b/tests/Interop/Windows/um/Psapi/PROCESS_MEMORY_COUNTERS_EXTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs index 7c042137d6..85996d199b 100644 --- a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_BLOCKTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs index dd7830c529..a5129214f1 100644 --- a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_BLOCKTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs index 36718f3c44..6ca685afc8 100644 --- a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_EX_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs index cd746fefd8..ed916fba8c 100644 --- a/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WORKING_SET_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs index 1f778d9224..b856e8d6e4 100644 --- a/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATIONTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs index cebf679fa2..9eeccf9108 100644 --- a/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs +++ b/tests/Interop/Windows/um/Psapi/PSAPI_WS_WATCH_INFORMATION_EXTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/Psapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs b/tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs index 0f682735c4..cd072342f6 100644 --- a/tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs +++ b/tests/Interop/Windows/um/RestartManager/RM_FILTER_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs b/tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs index c7503774ec..6bf2559088 100644 --- a/tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs +++ b/tests/Interop/Windows/um/RestartManager/RM_PROCESS_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs b/tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs index fbbd91144e..a961059ebe 100644 --- a/tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs +++ b/tests/Interop/Windows/um/RestartManager/RM_UNIQUE_PROCESSTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/RestartManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs index 7df50bd291..74efc5ef9b 100644 --- a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs +++ b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthManagerTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs index ad3cd0f5d0..57b271c37d 100644 --- a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs +++ b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResult2Tests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs index 7146ab83db..d77ddcd7da 100644 --- a/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs +++ b/tests/Interop/Windows/um/XblIdpAuthManager/IXblIdpAuthTokenResultTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs index e05b80d518..16c9475871 100644 --- a/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs +++ b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthManagerTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs index 791a8ce5ef..9d592ee434 100644 --- a/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs +++ b/tests/Interop/Windows/um/XblIdpAuthManager/XblIdpAuthTokenResultTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/XblIdpAuthManager.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs b/tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs index 39926a9743..3a67573383 100644 --- a/tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs +++ b/tests/Interop/Windows/um/compressapi/COMPRESS_ALLOCATION_ROUTINESTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/compressapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_BRUSH_PROPERTIESTests.cs b/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_BRUSH_PROPERTIESTests.cs index a03a8441b2..7185b4e9cc 100644 --- a/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_BRUSH_PROPERTIESTests.cs +++ b/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_BRUSH_PROPERTIESTests.cs @@ -5,9 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_BITMAP_BRUSH_PROPERTIES; -using static TerraFX.Interop.D2D1_BITMAP_INTERPOLATION_MODE; -using static TerraFX.Interop.D2D1_EXTEND_MODE; namespace TerraFX.Interop.UnitTests { @@ -34,14 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_BITMAP_BRUSH_PROPERTIES), Is.EqualTo(12)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.extendModeX, Is.EqualTo(D2D1_EXTEND_MODE_CLAMP)); - Assert.That(DEFAULT.extendModeY, Is.EqualTo(D2D1_EXTEND_MODE_CLAMP)); - Assert.That(DEFAULT.interpolationMode, Is.EqualTo(D2D1_BITMAP_INTERPOLATION_MODE_LINEAR)); - } } } diff --git a/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_PROPERTIESTests.cs b/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_PROPERTIESTests.cs index 0cf69b89a5..759f469253 100644 --- a/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_PROPERTIESTests.cs +++ b/tests/Interop/Windows/um/d2d1/D2D1_BITMAP_PROPERTIESTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_BITMAP_PROPERTIES; namespace TerraFX.Interop.UnitTests { @@ -32,14 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_BITMAP_PROPERTIES), Is.EqualTo(16)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.pixelFormat, Is.EqualTo(D2D1_PIXEL_FORMAT.DEFAULT)); - Assert.That(DEFAULT.dpiX, Is.EqualTo(96.0f)); - Assert.That(DEFAULT.dpiY, Is.EqualTo(96.0f)); - } } } diff --git a/tests/Interop/Windows/um/d2d1/D2D1_BRUSH_PROPERTIESTests.cs b/tests/Interop/Windows/um/d2d1/D2D1_BRUSH_PROPERTIESTests.cs index fefa999ff0..d65ff97b41 100644 --- a/tests/Interop/Windows/um/d2d1/D2D1_BRUSH_PROPERTIESTests.cs +++ b/tests/Interop/Windows/um/d2d1/D2D1_BRUSH_PROPERTIESTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_BRUSH_PROPERTIES; namespace TerraFX.Interop.UnitTests { @@ -32,13 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_BRUSH_PROPERTIES), Is.EqualTo(28)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.opacity, Is.EqualTo(1.0f)); - Assert.That(DEFAULT.transform, Is.EqualTo(D2D_MATRIX_3X2_F.Identity)); - } } } diff --git a/tests/Interop/Windows/um/d2d1/D2D1_DRAWING_STATE_DESCRIPTIONTests.cs b/tests/Interop/Windows/um/d2d1/D2D1_DRAWING_STATE_DESCRIPTIONTests.cs index d5113247ca..aa85d9e571 100644 --- a/tests/Interop/Windows/um/d2d1/D2D1_DRAWING_STATE_DESCRIPTIONTests.cs +++ b/tests/Interop/Windows/um/d2d1/D2D1_DRAWING_STATE_DESCRIPTIONTests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_ANTIALIAS_MODE; -using static TerraFX.Interop.D2D1_DRAWING_STATE_DESCRIPTION; -using static TerraFX.Interop.D2D1_TEXT_ANTIALIAS_MODE; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -35,16 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_DRAWING_STATE_DESCRIPTION), Is.EqualTo(48)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.antialiasMode, Is.EqualTo(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE)); - Assert.That(DEFAULT.textAntialiasMode, Is.EqualTo(D2D1_TEXT_ANTIALIAS_MODE_DEFAULT)); - Assert.That(DEFAULT.tag1, Is.EqualTo(0)); - Assert.That(DEFAULT.tag2, Is.EqualTo(0)); - Assert.That(DEFAULT.transform, Is.EqualTo(IdentityMatrix)); - } } } diff --git a/tests/Interop/Windows/um/d2d1/D2D1_LAYER_PARAMETERSTests.cs b/tests/Interop/Windows/um/d2d1/D2D1_LAYER_PARAMETERSTests.cs index e4680803ac..4944bcfe5c 100644 --- a/tests/Interop/Windows/um/d2d1/D2D1_LAYER_PARAMETERSTests.cs +++ b/tests/Interop/Windows/um/d2d1/D2D1_LAYER_PARAMETERSTests.cs @@ -6,10 +6,6 @@ using NUnit.Framework; using System; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_ANTIALIAS_MODE; -using static TerraFX.Interop.D2D1_LAYER_OPTIONS; -using static TerraFX.Interop.D2D1_LAYER_PARAMETERS; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -43,18 +39,5 @@ public static void SizeOfTest() Assert.That(sizeof(D2D1_LAYER_PARAMETERS), Is.EqualTo(60)); } } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.contentBounds, Is.EqualTo(InfiniteRect)); - Assert.That((nuint)DEFAULT.geometricMask, Is.EqualTo((nuint)0)); - Assert.That(DEFAULT.maskAntialiasMode, Is.EqualTo(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE)); - Assert.That(DEFAULT.maskTransform, Is.EqualTo(IdentityMatrix)); - Assert.That(DEFAULT.opacity, Is.EqualTo(1.0f)); - Assert.That((nuint)DEFAULT.opacityBrush, Is.EqualTo((nuint)0)); - Assert.That(DEFAULT.layerOptions, Is.EqualTo(D2D1_LAYER_OPTIONS_NONE)); - } } } diff --git a/tests/Interop/Windows/um/d2d1/D2D1_RENDER_TARGET_PROPERTIESTests.cs b/tests/Interop/Windows/um/d2d1/D2D1_RENDER_TARGET_PROPERTIESTests.cs index 22b8f9e6c1..ca69f31e8a 100644 --- a/tests/Interop/Windows/um/d2d1/D2D1_RENDER_TARGET_PROPERTIESTests.cs +++ b/tests/Interop/Windows/um/d2d1/D2D1_RENDER_TARGET_PROPERTIESTests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_FEATURE_LEVEL; -using static TerraFX.Interop.D2D1_RENDER_TARGET_PROPERTIES; -using static TerraFX.Interop.D2D1_RENDER_TARGET_TYPE; -using static TerraFX.Interop.D2D1_RENDER_TARGET_USAGE; namespace TerraFX.Interop.UnitTests { @@ -35,17 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_RENDER_TARGET_PROPERTIES), Is.EqualTo(28)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.type, Is.EqualTo(D2D1_RENDER_TARGET_TYPE_DEFAULT)); - Assert.That(DEFAULT.pixelFormat, Is.EqualTo(D2D1_PIXEL_FORMAT.DEFAULT)); - Assert.That(DEFAULT.dpiX, Is.EqualTo(0.0f)); - Assert.That(DEFAULT.dpiY, Is.EqualTo(0.0f)); - Assert.That(DEFAULT.usage, Is.EqualTo(D2D1_RENDER_TARGET_USAGE_NONE)); - Assert.That(DEFAULT.minLevel, Is.EqualTo(D2D1_FEATURE_LEVEL_DEFAULT)); - } } } diff --git a/tests/Interop/Windows/um/d2d1/D2D1_STROKE_STYLE_PROPERTIESTests.cs b/tests/Interop/Windows/um/d2d1/D2D1_STROKE_STYLE_PROPERTIESTests.cs index 8934448166..6b3dd7d2a3 100644 --- a/tests/Interop/Windows/um/d2d1/D2D1_STROKE_STYLE_PROPERTIESTests.cs +++ b/tests/Interop/Windows/um/d2d1/D2D1_STROKE_STYLE_PROPERTIESTests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_CAP_STYLE; -using static TerraFX.Interop.D2D1_DASH_STYLE; -using static TerraFX.Interop.D2D1_LINE_JOIN; -using static TerraFX.Interop.D2D1_STROKE_STYLE_PROPERTIES; namespace TerraFX.Interop.UnitTests { @@ -35,18 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_STROKE_STYLE_PROPERTIES), Is.EqualTo(28)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.startCap, Is.EqualTo(D2D1_CAP_STYLE_FLAT)); - Assert.That(DEFAULT.endCap, Is.EqualTo(D2D1_CAP_STYLE_FLAT)); - Assert.That(DEFAULT.dashCap, Is.EqualTo(D2D1_CAP_STYLE_FLAT)); - Assert.That(DEFAULT.lineJoin, Is.EqualTo(D2D1_LINE_JOIN_MITER)); - Assert.That(DEFAULT.miterLimit, Is.EqualTo(10.0f)); - Assert.That(DEFAULT.dashStyle, Is.EqualTo(D2D1_DASH_STYLE_SOLID)); - Assert.That(DEFAULT.dashOffset, Is.EqualTo(0.0f)); - } } } diff --git a/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_BRUSH_PROPERTIES1Tests.cs b/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_BRUSH_PROPERTIES1Tests.cs index 80a78edde7..bae0c2cd53 100644 --- a/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_BRUSH_PROPERTIES1Tests.cs +++ b/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_BRUSH_PROPERTIES1Tests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_BITMAP_BRUSH_PROPERTIES1; -using static TerraFX.Interop.D2D1_INTERPOLATION_MODE; -using static TerraFX.Interop.D2D1_EXTEND_MODE; - namespace TerraFX.Interop.UnitTests { @@ -35,14 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_BITMAP_BRUSH_PROPERTIES1), Is.EqualTo(12)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.extendModeX, Is.EqualTo(D2D1_EXTEND_MODE_CLAMP)); - Assert.That(DEFAULT.extendModeY, Is.EqualTo(D2D1_EXTEND_MODE_CLAMP)); - Assert.That(DEFAULT.interpolationMode, Is.EqualTo(D2D1_INTERPOLATION_MODE_LINEAR)); - } } } diff --git a/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_PROPERTIES1Tests.cs b/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_PROPERTIES1Tests.cs index 2890ae1aaa..483d831d43 100644 --- a/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_PROPERTIES1Tests.cs +++ b/tests/Interop/Windows/um/d2d1_1/D2D1_BITMAP_PROPERTIES1Tests.cs @@ -6,8 +6,6 @@ using NUnit.Framework; using System; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_BITMAP_OPTIONS; -using static TerraFX.Interop.D2D1_BITMAP_PROPERTIES1; namespace TerraFX.Interop.UnitTests { @@ -41,16 +39,5 @@ public static void SizeOfTest() Assert.That(sizeof(D2D1_BITMAP_PROPERTIES1), Is.EqualTo(24)); } } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.pixelFormat, Is.EqualTo(D2D1_PIXEL_FORMAT.DEFAULT)); - Assert.That(DEFAULT.dpiX, Is.EqualTo(96.0f)); - Assert.That(DEFAULT.dpiY, Is.EqualTo(96.0f)); - Assert.That(DEFAULT.bitmapOptions, Is.EqualTo(D2D1_BITMAP_OPTIONS_NONE)); - Assert.That((nuint)DEFAULT.colorContext, Is.EqualTo((nuint)0)); - } } } diff --git a/tests/Interop/Windows/um/d2d1_1/D2D1_DRAWING_STATE_DESCRIPTION1Tests.cs b/tests/Interop/Windows/um/d2d1_1/D2D1_DRAWING_STATE_DESCRIPTION1Tests.cs index 79f40d51d1..088e0607a7 100644 --- a/tests/Interop/Windows/um/d2d1_1/D2D1_DRAWING_STATE_DESCRIPTION1Tests.cs +++ b/tests/Interop/Windows/um/d2d1_1/D2D1_DRAWING_STATE_DESCRIPTION1Tests.cs @@ -5,12 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_ANTIALIAS_MODE; -using static TerraFX.Interop.D2D1_DRAWING_STATE_DESCRIPTION1; -using static TerraFX.Interop.D2D1_PRIMITIVE_BLEND; -using static TerraFX.Interop.D2D1_TEXT_ANTIALIAS_MODE; -using static TerraFX.Interop.D2D1_UNIT_MODE; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -37,18 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_DRAWING_STATE_DESCRIPTION1), Is.EqualTo(56)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.antialiasMode, Is.EqualTo(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE)); - Assert.That(DEFAULT.textAntialiasMode, Is.EqualTo(D2D1_TEXT_ANTIALIAS_MODE_DEFAULT)); - Assert.That(DEFAULT.tag1, Is.EqualTo(0)); - Assert.That(DEFAULT.tag2, Is.EqualTo(0)); - Assert.That(DEFAULT.transform, Is.EqualTo(IdentityMatrix)); - Assert.That(DEFAULT.primitiveBlend, Is.EqualTo(D2D1_PRIMITIVE_BLEND_SOURCE_OVER)); - Assert.That(DEFAULT.unitMode, Is.EqualTo(D2D1_UNIT_MODE_DIPS)); - } } } diff --git a/tests/Interop/Windows/um/d2d1_1/D2D1_LAYER_PARAMETERS1Tests.cs b/tests/Interop/Windows/um/d2d1_1/D2D1_LAYER_PARAMETERS1Tests.cs index 6e03ee02ea..1e65f0bf64 100644 --- a/tests/Interop/Windows/um/d2d1_1/D2D1_LAYER_PARAMETERS1Tests.cs +++ b/tests/Interop/Windows/um/d2d1_1/D2D1_LAYER_PARAMETERS1Tests.cs @@ -6,10 +6,6 @@ using NUnit.Framework; using System; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_ANTIALIAS_MODE; -using static TerraFX.Interop.D2D1_LAYER_OPTIONS1; -using static TerraFX.Interop.D2D1_LAYER_PARAMETERS1; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -43,18 +39,5 @@ public static void SizeOfTest() Assert.That(sizeof(D2D1_LAYER_PARAMETERS1), Is.EqualTo(60)); } } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.contentBounds, Is.EqualTo(InfiniteRect)); - Assert.That((nuint)DEFAULT.geometricMask, Is.EqualTo((nuint)0)); - Assert.That(DEFAULT.maskAntialiasMode, Is.EqualTo(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE)); - Assert.That(DEFAULT.maskTransform, Is.EqualTo(IdentityMatrix)); - Assert.That(DEFAULT.opacity, Is.EqualTo(1.0f)); - Assert.That((nuint)DEFAULT.opacityBrush, Is.EqualTo((nuint)0)); - Assert.That(DEFAULT.layerOptions, Is.EqualTo(D2D1_LAYER_OPTIONS1_NONE)); - } } } diff --git a/tests/Interop/Windows/um/d2d1_1/D2D1_PRINT_CONTROL_PROPERTIESTests.cs b/tests/Interop/Windows/um/d2d1_1/D2D1_PRINT_CONTROL_PROPERTIESTests.cs index b458b9015a..b2cdbbc604 100644 --- a/tests/Interop/Windows/um/d2d1_1/D2D1_PRINT_CONTROL_PROPERTIESTests.cs +++ b/tests/Interop/Windows/um/d2d1_1/D2D1_PRINT_CONTROL_PROPERTIESTests.cs @@ -5,9 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_COLOR_SPACE; -using static TerraFX.Interop.D2D1_PRINT_CONTROL_PROPERTIES; -using static TerraFX.Interop.D2D1_PRINT_FONT_SUBSET_MODE; namespace TerraFX.Interop.UnitTests { @@ -34,14 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_PRINT_CONTROL_PROPERTIES), Is.EqualTo(12)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.fontSubset, Is.EqualTo(D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT)); - Assert.That(DEFAULT.rasterDPI, Is.EqualTo(150.0f)); - Assert.That(DEFAULT.colorSpace, Is.EqualTo(D2D1_COLOR_SPACE_SRGB)); - } } } diff --git a/tests/Interop/Windows/um/d2d1_1/D2D1_STROKE_STYLE_PROPERTIES1Tests.cs b/tests/Interop/Windows/um/d2d1_1/D2D1_STROKE_STYLE_PROPERTIES1Tests.cs index b1fca8788e..127ed91a04 100644 --- a/tests/Interop/Windows/um/d2d1_1/D2D1_STROKE_STYLE_PROPERTIES1Tests.cs +++ b/tests/Interop/Windows/um/d2d1_1/D2D1_STROKE_STYLE_PROPERTIES1Tests.cs @@ -5,11 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_CAP_STYLE; -using static TerraFX.Interop.D2D1_DASH_STYLE; -using static TerraFX.Interop.D2D1_LINE_JOIN; -using static TerraFX.Interop.D2D1_STROKE_STYLE_PROPERTIES1; -using static TerraFX.Interop.D2D1_STROKE_TRANSFORM_TYPE; namespace TerraFX.Interop.UnitTests { @@ -36,19 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_STROKE_STYLE_PROPERTIES1), Is.EqualTo(32)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.startCap, Is.EqualTo(D2D1_CAP_STYLE_FLAT)); - Assert.That(DEFAULT.endCap, Is.EqualTo(D2D1_CAP_STYLE_FLAT)); - Assert.That(DEFAULT.dashCap, Is.EqualTo(D2D1_CAP_STYLE_FLAT)); - Assert.That(DEFAULT.lineJoin, Is.EqualTo(D2D1_LINE_JOIN_MITER)); - Assert.That(DEFAULT.miterLimit, Is.EqualTo(10.0f)); - Assert.That(DEFAULT.dashStyle, Is.EqualTo(D2D1_DASH_STYLE_SOLID)); - Assert.That(DEFAULT.dashOffset, Is.EqualTo(0.0f)); - Assert.That(DEFAULT.transformType, Is.EqualTo(D2D1_STROKE_TRANSFORM_TYPE_NORMAL)); - } } } diff --git a/tests/Interop/Windows/um/d3d11/D3D11_BLEND_DESCTests.cs b/tests/Interop/Windows/um/d3d11/D3D11_BLEND_DESCTests.cs index 9db6f9d863..5987e78425 100644 --- a/tests/Interop/Windows/um/d3d11/D3D11_BLEND_DESCTests.cs +++ b/tests/Interop/Windows/um/d3d11/D3D11_BLEND_DESCTests.cs @@ -5,8 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_BLEND_DESC; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -33,21 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_BLEND_DESC), Is.EqualTo(264)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.AlphaToCoverageEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.IndependentBlendEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.RenderTarget[0], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[1], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[2], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[3], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[4], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[5], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[6], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[7], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC.DEFAULT)); - } } } diff --git a/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCILOP_DESCTests.cs b/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCILOP_DESCTests.cs index 5edb4864eb..af63ad515e 100644 --- a/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCILOP_DESCTests.cs +++ b/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCILOP_DESCTests.cs @@ -5,9 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_COMPARISON_FUNC; -using static TerraFX.Interop.D3D11_DEPTH_STENCILOP_DESC; -using static TerraFX.Interop.D3D11_STENCIL_OP; namespace TerraFX.Interop.UnitTests { @@ -34,15 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_DEPTH_STENCILOP_DESC), Is.EqualTo(16)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.StencilFailOp, Is.EqualTo(D3D11_STENCIL_OP_KEEP)); - Assert.That(DEFAULT.StencilDepthFailOp, Is.EqualTo(D3D11_STENCIL_OP_KEEP)); - Assert.That(DEFAULT.StencilPassOp, Is.EqualTo(D3D11_STENCIL_OP_KEEP)); - Assert.That(DEFAULT.StencilFunc, Is.EqualTo(D3D11_COMPARISON_ALWAYS)); - } } } diff --git a/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCIL_DESCTests.cs b/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCIL_DESCTests.cs index 5f53a0b625..f0b72208f5 100644 --- a/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCIL_DESCTests.cs +++ b/tests/Interop/Windows/um/d3d11/D3D11_DEPTH_STENCIL_DESCTests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_DEPTH_STENCIL_DESC; -using static TerraFX.Interop.D3D11_DEPTH_WRITE_MASK; -using static TerraFX.Interop.D3D11_COMPARISON_FUNC; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -35,19 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_DEPTH_STENCIL_DESC), Is.EqualTo(52)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.DepthEnable, Is.EqualTo(TRUE)); - Assert.That(DEFAULT.DepthWriteMask, Is.EqualTo(D3D11_DEPTH_WRITE_MASK_ALL)); - Assert.That(DEFAULT.DepthFunc, Is.EqualTo(D3D11_COMPARISON_LESS)); - Assert.That(DEFAULT.StencilEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.StencilReadMask, Is.EqualTo((byte)D3D12_DEFAULT_STENCIL_READ_MASK)); - Assert.That(DEFAULT.StencilWriteMask, Is.EqualTo((byte)D3D12_DEFAULT_STENCIL_WRITE_MASK)); - Assert.That(DEFAULT.FrontFace, Is.EqualTo(D3D11_DEPTH_STENCILOP_DESC.DEFAULT)); - Assert.That(DEFAULT.BackFace, Is.EqualTo(D3D11_DEPTH_STENCILOP_DESC.DEFAULT)); - } } } diff --git a/tests/Interop/Windows/um/d3d11/D3D11_RASTERIZER_DESCTests.cs b/tests/Interop/Windows/um/d3d11/D3D11_RASTERIZER_DESCTests.cs index a46a83adcd..6bac9c71e7 100644 --- a/tests/Interop/Windows/um/d3d11/D3D11_RASTERIZER_DESCTests.cs +++ b/tests/Interop/Windows/um/d3d11/D3D11_RASTERIZER_DESCTests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_CULL_MODE; -using static TerraFX.Interop.D3D11_FILL_MODE; -using static TerraFX.Interop.D3D11_RASTERIZER_DESC; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -35,21 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_RASTERIZER_DESC), Is.EqualTo(40)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.FillMode, Is.EqualTo(D3D11_FILL_SOLID)); - Assert.That(DEFAULT.CullMode, Is.EqualTo(D3D11_CULL_BACK)); - Assert.That(DEFAULT.FrontCounterClockwise, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.DepthBias, Is.EqualTo(D3D11_DEFAULT_DEPTH_BIAS)); - Assert.That(DEFAULT.DepthBiasClamp, Is.EqualTo(D3D11_DEFAULT_DEPTH_BIAS_CLAMP)); - Assert.That(DEFAULT.SlopeScaledDepthBias, Is.EqualTo(D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS)); - Assert.That(DEFAULT.DepthClipEnable, Is.EqualTo(TRUE)); - Assert.That(DEFAULT.ScissorEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.MultisampleEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.AntialiasedLineEnable, Is.EqualTo(FALSE)); - } } } diff --git a/tests/Interop/Windows/um/d3d11/D3D11_RENDER_TARGET_BLEND_DESCTests.cs b/tests/Interop/Windows/um/d3d11/D3D11_RENDER_TARGET_BLEND_DESCTests.cs index 61dd229624..7f01e74e17 100644 --- a/tests/Interop/Windows/um/d3d11/D3D11_RENDER_TARGET_BLEND_DESCTests.cs +++ b/tests/Interop/Windows/um/d3d11/D3D11_RENDER_TARGET_BLEND_DESCTests.cs @@ -5,11 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_BLEND; -using static TerraFX.Interop.D3D11_BLEND_OP; -using static TerraFX.Interop.D3D11_COLOR_WRITE_ENABLE; -using static TerraFX.Interop.D3D11_RENDER_TARGET_BLEND_DESC; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -36,19 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_RENDER_TARGET_BLEND_DESC), Is.EqualTo(32)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.BlendEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.SrcBlend, Is.EqualTo(D3D11_BLEND_ONE)); - Assert.That(DEFAULT.DestBlend, Is.EqualTo(D3D11_BLEND_ZERO)); - Assert.That(DEFAULT.BlendOp, Is.EqualTo(D3D11_BLEND_OP_ADD)); - Assert.That(DEFAULT.SrcBlendAlpha, Is.EqualTo(D3D11_BLEND_ONE)); - Assert.That(DEFAULT.DestBlendAlpha, Is.EqualTo(D3D11_BLEND_ZERO)); - Assert.That(DEFAULT.BlendOpAlpha, Is.EqualTo(D3D11_BLEND_OP_ADD)); - Assert.That(DEFAULT.RenderTargetWriteMask, Is.EqualTo((byte)D3D11_COLOR_WRITE_ENABLE_ALL)); - } } } diff --git a/tests/Interop/Windows/um/d3d11/D3D11_SAMPLER_DESCTests.cs b/tests/Interop/Windows/um/d3d11/D3D11_SAMPLER_DESCTests.cs index b7b96966d7..f032727db7 100644 --- a/tests/Interop/Windows/um/d3d11/D3D11_SAMPLER_DESCTests.cs +++ b/tests/Interop/Windows/um/d3d11/D3D11_SAMPLER_DESCTests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_COMPARISON_FUNC; -using static TerraFX.Interop.D3D11_FILTER; -using static TerraFX.Interop.D3D11_SAMPLER_DESC; -using static TerraFX.Interop.D3D11_TEXTURE_ADDRESS_MODE; namespace TerraFX.Interop.UnitTests { @@ -35,24 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_SAMPLER_DESC), Is.EqualTo(52)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.Filter, Is.EqualTo(D3D11_FILTER_MIN_MAG_MIP_LINEAR)); - Assert.That(DEFAULT.AddressU, Is.EqualTo(D3D11_TEXTURE_ADDRESS_CLAMP)); - Assert.That(DEFAULT.AddressV, Is.EqualTo(D3D11_TEXTURE_ADDRESS_CLAMP)); - Assert.That(DEFAULT.AddressW, Is.EqualTo(D3D11_TEXTURE_ADDRESS_CLAMP)); - Assert.That(DEFAULT.MipLODBias, Is.EqualTo(0)); - Assert.That(DEFAULT.MaxAnisotropy, Is.EqualTo(1)); - Assert.That(DEFAULT.ComparisonFunc, Is.EqualTo(D3D11_COMPARISON_NEVER)); - Assert.That(DEFAULT.BorderColor[0], Is.EqualTo(1.0f)); - Assert.That(DEFAULT.BorderColor[1], Is.EqualTo(1.0f)); - Assert.That(DEFAULT.BorderColor[2], Is.EqualTo(1.0f)); - Assert.That(DEFAULT.BorderColor[3], Is.EqualTo(1.0f)); - Assert.That(DEFAULT.MinLOD, Is.EqualTo(float.MinValue)); - Assert.That(DEFAULT.MaxLOD, Is.EqualTo(float.MaxValue)); - } } } diff --git a/tests/Interop/Windows/um/d3d11_1/D3D11_BLEND_DESC1Tests.cs b/tests/Interop/Windows/um/d3d11_1/D3D11_BLEND_DESC1Tests.cs index 7a224be022..445bebb8bf 100644 --- a/tests/Interop/Windows/um/d3d11_1/D3D11_BLEND_DESC1Tests.cs +++ b/tests/Interop/Windows/um/d3d11_1/D3D11_BLEND_DESC1Tests.cs @@ -5,8 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_BLEND_DESC1; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -33,21 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_BLEND_DESC1), Is.EqualTo(328)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.AlphaToCoverageEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.IndependentBlendEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.RenderTarget[0], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[1], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[2], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[3], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[4], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[5], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[6], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - Assert.That(DEFAULT.RenderTarget[7], Is.EqualTo(D3D11_RENDER_TARGET_BLEND_DESC1.DEFAULT)); - } } } diff --git a/tests/Interop/Windows/um/d3d11_1/D3D11_RASTERIZER_DESC1Tests.cs b/tests/Interop/Windows/um/d3d11_1/D3D11_RASTERIZER_DESC1Tests.cs index ff09ef3535..4eaabdeade 100644 --- a/tests/Interop/Windows/um/d3d11_1/D3D11_RASTERIZER_DESC1Tests.cs +++ b/tests/Interop/Windows/um/d3d11_1/D3D11_RASTERIZER_DESC1Tests.cs @@ -5,10 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_CULL_MODE; -using static TerraFX.Interop.D3D11_FILL_MODE; -using static TerraFX.Interop.D3D11_RASTERIZER_DESC1; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -35,22 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_RASTERIZER_DESC1), Is.EqualTo(44)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.FillMode, Is.EqualTo(D3D11_FILL_SOLID)); - Assert.That(DEFAULT.CullMode, Is.EqualTo(D3D11_CULL_BACK)); - Assert.That(DEFAULT.FrontCounterClockwise, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.DepthBias, Is.EqualTo(D3D11_DEFAULT_DEPTH_BIAS)); - Assert.That(DEFAULT.DepthBiasClamp, Is.EqualTo(D3D11_DEFAULT_DEPTH_BIAS_CLAMP)); - Assert.That(DEFAULT.SlopeScaledDepthBias, Is.EqualTo(D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS)); - Assert.That(DEFAULT.DepthClipEnable, Is.EqualTo(TRUE)); - Assert.That(DEFAULT.ScissorEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.MultisampleEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.AntialiasedLineEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.ForcedSampleCount, Is.EqualTo(0)); - } } } diff --git a/tests/Interop/Windows/um/d3d11_1/D3D11_RENDER_TARGET_BLEND_DESC1Tests.cs b/tests/Interop/Windows/um/d3d11_1/D3D11_RENDER_TARGET_BLEND_DESC1Tests.cs index 36fbd3301d..5345c4dd9b 100644 --- a/tests/Interop/Windows/um/d3d11_1/D3D11_RENDER_TARGET_BLEND_DESC1Tests.cs +++ b/tests/Interop/Windows/um/d3d11_1/D3D11_RENDER_TARGET_BLEND_DESC1Tests.cs @@ -5,12 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_BLEND; -using static TerraFX.Interop.D3D11_BLEND_OP; -using static TerraFX.Interop.D3D11_COLOR_WRITE_ENABLE; -using static TerraFX.Interop.D3D11_LOGIC_OP; -using static TerraFX.Interop.D3D11_RENDER_TARGET_BLEND_DESC1; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -37,21 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_RENDER_TARGET_BLEND_DESC1), Is.EqualTo(40)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.BlendEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.LogicOpEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.SrcBlend, Is.EqualTo(D3D11_BLEND_ONE)); - Assert.That(DEFAULT.DestBlend, Is.EqualTo(D3D11_BLEND_ZERO)); - Assert.That(DEFAULT.BlendOp, Is.EqualTo(D3D11_BLEND_OP_ADD)); - Assert.That(DEFAULT.SrcBlendAlpha, Is.EqualTo(D3D11_BLEND_ONE)); - Assert.That(DEFAULT.DestBlendAlpha, Is.EqualTo(D3D11_BLEND_ZERO)); - Assert.That(DEFAULT.BlendOpAlpha, Is.EqualTo(D3D11_BLEND_OP_ADD)); - Assert.That(DEFAULT.LogicOp, Is.EqualTo(D3D11_LOGIC_OP_NOOP)); - Assert.That(DEFAULT.RenderTargetWriteMask, Is.EqualTo((byte)D3D11_COLOR_WRITE_ENABLE_ALL)); - } } } diff --git a/tests/Interop/Windows/um/d3d11_3/D3D11_RASTERIZER_DESC2Tests.cs b/tests/Interop/Windows/um/d3d11_3/D3D11_RASTERIZER_DESC2Tests.cs index 32e3cefaa7..f7855a357b 100644 --- a/tests/Interop/Windows/um/d3d11_3/D3D11_RASTERIZER_DESC2Tests.cs +++ b/tests/Interop/Windows/um/d3d11_3/D3D11_RASTERIZER_DESC2Tests.cs @@ -5,11 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D3D11_CONSERVATIVE_RASTERIZATION_MODE; -using static TerraFX.Interop.D3D11_CULL_MODE; -using static TerraFX.Interop.D3D11_FILL_MODE; -using static TerraFX.Interop.D3D11_RASTERIZER_DESC2; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -36,23 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D3D11_RASTERIZER_DESC2), Is.EqualTo(48)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.FillMode, Is.EqualTo(D3D11_FILL_SOLID)); - Assert.That(DEFAULT.CullMode, Is.EqualTo(D3D11_CULL_BACK)); - Assert.That(DEFAULT.FrontCounterClockwise, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.DepthBias, Is.EqualTo(D3D11_DEFAULT_DEPTH_BIAS)); - Assert.That(DEFAULT.DepthBiasClamp, Is.EqualTo(D3D11_DEFAULT_DEPTH_BIAS_CLAMP)); - Assert.That(DEFAULT.SlopeScaledDepthBias, Is.EqualTo(D3D11_DEFAULT_SLOPE_SCALED_DEPTH_BIAS)); - Assert.That(DEFAULT.DepthClipEnable, Is.EqualTo(TRUE)); - Assert.That(DEFAULT.ScissorEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.MultisampleEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.AntialiasedLineEnable, Is.EqualTo(FALSE)); - Assert.That(DEFAULT.ForcedSampleCount, Is.EqualTo(0)); - Assert.That(DEFAULT.ConservativeRaster, Is.EqualTo(D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF)); - } } } diff --git a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs index f7be7e8ac5..f3d373cac9 100644 --- a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs +++ b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_BLOBTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs index b9d80909e6..35f251357b 100644 --- a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs +++ b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_AUTH_UNPTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs index 4e2f4be4f1..e32da114b2 100644 --- a/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs +++ b/tests/Interop/Windows/um/davclnt/DAV_CALLBACK_CREDTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/davclnt.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/dcommon/D2D1_PIXEL_FORMATTests.cs b/tests/Interop/Windows/um/dcommon/D2D1_PIXEL_FORMATTests.cs index 7fa92e1107..de1a353b96 100644 --- a/tests/Interop/Windows/um/dcommon/D2D1_PIXEL_FORMATTests.cs +++ b/tests/Interop/Windows/um/dcommon/D2D1_PIXEL_FORMATTests.cs @@ -5,9 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D1_ALPHA_MODE; -using static TerraFX.Interop.D2D1_PIXEL_FORMAT; -using static TerraFX.Interop.DXGI_FORMAT; namespace TerraFX.Interop.UnitTests { @@ -34,13 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D1_PIXEL_FORMAT), Is.EqualTo(8)); } - - /// Validates that the value of the property is correct. - [Test] - public static void DEFAULTTest() - { - Assert.That(DEFAULT.format, Is.EqualTo(DXGI_FORMAT_UNKNOWN)); - Assert.That(DEFAULT.alphaMode, Is.EqualTo(D2D1_ALPHA_MODE_UNKNOWN)); - } } } diff --git a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_FTests.cs b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_FTests.cs index 32ce803cd5..3d02238c24 100644 --- a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_FTests.cs +++ b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_3X2_FTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D_MATRIX_3X2_F; namespace TerraFX.Interop.UnitTests { @@ -32,17 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D_MATRIX_3X2_F), Is.EqualTo(24)); } - - /// Validates that the value of the property is correct. - [Test] - public static void IdentityTest() - { - Assert.That(Identity._11, Is.EqualTo(1.0f)); - Assert.That(Identity._12, Is.EqualTo(0.0f)); - Assert.That(Identity._21, Is.EqualTo(0.0f)); - Assert.That(Identity._22, Is.EqualTo(1.0f)); - Assert.That(Identity._31, Is.EqualTo(0.0f)); - Assert.That(Identity._32, Is.EqualTo(0.0f)); - } } } diff --git a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_FTests.cs b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_FTests.cs index a5d9635eea..f716128798 100644 --- a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_FTests.cs +++ b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X3_FTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D_MATRIX_4X3_F; namespace TerraFX.Interop.UnitTests { @@ -32,23 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D_MATRIX_4X3_F), Is.EqualTo(48)); } - - /// Validates that the value of the property is correct. - [Test] - public static void IdentityTest() - { - Assert.That(Identity._11, Is.EqualTo(1.0f)); - Assert.That(Identity._12, Is.EqualTo(0.0f)); - Assert.That(Identity._13, Is.EqualTo(0.0f)); - Assert.That(Identity._21, Is.EqualTo(0.0f)); - Assert.That(Identity._22, Is.EqualTo(1.0f)); - Assert.That(Identity._23, Is.EqualTo(0.0f)); - Assert.That(Identity._31, Is.EqualTo(0.0f)); - Assert.That(Identity._32, Is.EqualTo(0.0f)); - Assert.That(Identity._33, Is.EqualTo(1.0f)); - Assert.That(Identity._41, Is.EqualTo(0.0f)); - Assert.That(Identity._42, Is.EqualTo(0.0f)); - Assert.That(Identity._43, Is.EqualTo(0.0f)); - } } } diff --git a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_FTests.cs b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_FTests.cs index d66b027962..5692ced696 100644 --- a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_FTests.cs +++ b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_4X4_FTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D_MATRIX_4X4_F; namespace TerraFX.Interop.UnitTests { @@ -32,27 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D_MATRIX_4X4_F), Is.EqualTo(64)); } - - /// Validates that the value of the property is correct. - [Test] - public static void IdentityTest() - { - Assert.That(Identity._11, Is.EqualTo(1.0f)); - Assert.That(Identity._12, Is.EqualTo(0.0f)); - Assert.That(Identity._13, Is.EqualTo(0.0f)); - Assert.That(Identity._14, Is.EqualTo(0.0f)); - Assert.That(Identity._21, Is.EqualTo(0.0f)); - Assert.That(Identity._22, Is.EqualTo(1.0f)); - Assert.That(Identity._23, Is.EqualTo(0.0f)); - Assert.That(Identity._24, Is.EqualTo(0.0f)); - Assert.That(Identity._31, Is.EqualTo(0.0f)); - Assert.That(Identity._32, Is.EqualTo(0.0f)); - Assert.That(Identity._33, Is.EqualTo(1.0f)); - Assert.That(Identity._34, Is.EqualTo(0.0f)); - Assert.That(Identity._41, Is.EqualTo(0.0f)); - Assert.That(Identity._42, Is.EqualTo(0.0f)); - Assert.That(Identity._43, Is.EqualTo(0.0f)); - Assert.That(Identity._44, Is.EqualTo(1.0f)); - } } } diff --git a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_FTests.cs b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_FTests.cs index ab3afb3288..dd3ba33617 100644 --- a/tests/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_FTests.cs +++ b/tests/Interop/Windows/um/dcommon/D2D_MATRIX_5X4_FTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D_MATRIX_5X4_F; namespace TerraFX.Interop.UnitTests { @@ -32,35 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D_MATRIX_5X4_F), Is.EqualTo(80)); } - - /// Validates that the value of the property is correct. - [Test] - public static void IdentityTest() - { - Assert.That(Identity._11, Is.EqualTo(1.0f)); - Assert.That(Identity._12, Is.EqualTo(0.0f)); - Assert.That(Identity._13, Is.EqualTo(0.0f)); - Assert.That(Identity._14, Is.EqualTo(0.0f)); - - Assert.That(Identity._21, Is.EqualTo(0.0f)); - Assert.That(Identity._22, Is.EqualTo(1.0f)); - Assert.That(Identity._23, Is.EqualTo(0.0f)); - Assert.That(Identity._24, Is.EqualTo(0.0f)); - - Assert.That(Identity._31, Is.EqualTo(0.0f)); - Assert.That(Identity._32, Is.EqualTo(0.0f)); - Assert.That(Identity._33, Is.EqualTo(1.0f)); - Assert.That(Identity._34, Is.EqualTo(0.0f)); - - Assert.That(Identity._41, Is.EqualTo(0.0f)); - Assert.That(Identity._42, Is.EqualTo(0.0f)); - Assert.That(Identity._43, Is.EqualTo(0.0f)); - Assert.That(Identity._44, Is.EqualTo(1.0f)); - - Assert.That(Identity._51, Is.EqualTo(0.0f)); - Assert.That(Identity._52, Is.EqualTo(0.0f)); - Assert.That(Identity._53, Is.EqualTo(0.0f)); - Assert.That(Identity._54, Is.EqualTo(0.0f)); - } } } diff --git a/tests/Interop/Windows/um/dcommon/D2D_RECT_FTests.cs b/tests/Interop/Windows/um/dcommon/D2D_RECT_FTests.cs index 76ac36f5ab..e260e16c12 100644 --- a/tests/Interop/Windows/um/dcommon/D2D_RECT_FTests.cs +++ b/tests/Interop/Windows/um/dcommon/D2D_RECT_FTests.cs @@ -5,8 +5,6 @@ using NUnit.Framework; using System.Runtime.InteropServices; -using static TerraFX.Interop.D2D_RECT_F; -using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests { @@ -33,15 +31,5 @@ public static void SizeOfTest() { Assert.That(sizeof(D2D_RECT_F), Is.EqualTo(16)); } - - /// Validates that the value of the property is correct. - [Test] - public static void InfiniteTest() - { - Assert.That(Infinite.left, Is.EqualTo(-FloatMax)); - Assert.That(Infinite.top, Is.EqualTo(-FloatMax)); - Assert.That(Infinite.right, Is.EqualTo(FloatMax)); - Assert.That(Infinite.bottom, Is.EqualTo(FloatMax)); - } } } diff --git a/tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs b/tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs index c1888cc8d8..f0da88c53c 100644 --- a/tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs +++ b/tests/Interop/Windows/um/ddpbackup/DDP_FILE_EXTENTTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs b/tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs index 3b88d7b81e..6046f8857b 100644 --- a/tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs +++ b/tests/Interop/Windows/um/ddpbackup/DEDUP_CONTAINER_EXTENTTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs b/tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs index f1fad7d30b..bd338fa059 100644 --- a/tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs +++ b/tests/Interop/Windows/um/ddpbackup/DedupBackupSupportTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs b/tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs index d49e19eca8..75c15dc721 100644 --- a/tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs +++ b/tests/Interop/Windows/um/ddpbackup/IDedupBackupSupportTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs b/tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs index 2e18934fe7..45560ad1b8 100644 --- a/tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs +++ b/tests/Interop/Windows/um/ddpbackup/IDedupReadFileCallbackTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/ddpbackup.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/inkrenderer/WindowsTests.cs b/tests/Interop/Windows/um/inkrenderer/WindowsTests.cs new file mode 100644 index 0000000000..f4c4c81c6f --- /dev/null +++ b/tests/Interop/Windows/um/inkrenderer/WindowsTests.cs @@ -0,0 +1,43 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/inkrenderer.h and um/inkrenderer_i.c in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the class. + public static partial class WindowsTests + { + /// Validates that the value of the property is correct. + [Test] + public static void IID_IInkD2DRendererTest() + { + Assert.That(IID_IInkD2DRenderer, Is.EqualTo(new Guid(0x407fb1de, 0xf85a, 0x4150, 0x97, 0xcf, 0xb7, 0xfb, 0x27, 0x4f, 0xb4, 0xf8))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IInkD2DRenderer2Test() + { + Assert.That(IID_IInkD2DRenderer2, Is.EqualTo(new Guid(0x0a95dcd9, 0x4578, 0x4b71, 0xb2, 0x0b, 0xbf, 0x66, 0x4d, 0x4b, 0xfe, 0xee))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void LIBID_InkD2DRendererLibTest() + { + Assert.That(LIBID_InkD2DRendererLib, Is.EqualTo(new Guid(0x390d0ab0, 0x19e2, 0x46bb, 0x86, 0x2e, 0xb0, 0x9f, 0x3c, 0xdc, 0xf8, 0xb9))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void CLSID_InkD2DRendererTest() + { + Assert.That(CLSID_InkD2DRenderer, Is.EqualTo(new Guid(0x4044e60c, 0x7b01, 0x4671, 0xa9, 0x7c, 0x04, 0xe0, 0x21, 0x0a, 0x07, 0xa5))); + } + } +} diff --git a/tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs b/tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs index 9403c6867d..dd72bdddc9 100644 --- a/tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs +++ b/tests/Interop/Windows/um/manipulations/IInertiaProcessorTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs b/tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs index 357291dc2a..e9222725fa 100644 --- a/tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs +++ b/tests/Interop/Windows/um/manipulations/IManipulationProcessorTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs b/tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs index 731d8f0dde..40d8faac70 100644 --- a/tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs +++ b/tests/Interop/Windows/um/manipulations/InertiaProcessorTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs b/tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs index 531b945038..be9b512b09 100644 --- a/tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs +++ b/tests/Interop/Windows/um/manipulations/ManipulationProcessorTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/manipulations/WindowsTests.cs b/tests/Interop/Windows/um/manipulations/WindowsTests.cs new file mode 100644 index 0000000000..8a745925ad --- /dev/null +++ b/tests/Interop/Windows/um/manipulations/WindowsTests.cs @@ -0,0 +1,57 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the class. + public static partial class WindowsTests + { + /// Validates that the value of the property is correct. + [Test] + public static void LIBID_ManipulationsLibTest() + { + Assert.That(LIBID_ManipulationsLib, Is.EqualTo(new Guid(0x935610b3, 0x6f81, 0x450f, 0x85, 0xd5, 0x42, 0xd3, 0xd2, 0x6c, 0x5c, 0x11))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID__IManipulationEventsTest() + { + Assert.That(IID__IManipulationEvents, Is.EqualTo(new Guid(0x4f62c8da, 0x9c53, 0x4b22, 0x93, 0xdf, 0x92, 0x7a, 0x86, 0x2b, 0xbb, 0x03))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IInertiaProcessorTest() + { + Assert.That(IID_IInertiaProcessor, Is.EqualTo(new Guid(0x18b00c6d, 0xc5ee, 0x41b1, 0x90, 0xa9, 0x9d, 0x4a, 0x92, 0x90, 0x95, 0xad))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IManipulationProcessorTest() + { + Assert.That(IID_IManipulationProcessor, Is.EqualTo(new Guid(0xA22AC519, 0x8300, 0x48a0, 0xBE, 0xF4, 0xF1, 0xBE, 0x87, 0x37, 0xDB, 0xA4))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void CLSID_InertiaProcessorTest() + { + Assert.That(CLSID_InertiaProcessor, Is.EqualTo(new Guid(0xabb27087, 0x4ce0, 0x4e58, 0xa0, 0xcb, 0xe2, 0x4d, 0xf9, 0x68, 0x14, 0xbe))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void CLSID_ManipulationProcessorTest() + { + Assert.That(CLSID_ManipulationProcessor, Is.EqualTo(new Guid(0x597D4FB0, 0x47FD, 0x4aff, 0x89, 0xB9, 0xC6, 0xCF, 0xAE, 0x8C, 0xF0, 0x8E))); + } + } +} diff --git a/tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs b/tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs index df463dd0f3..b66c26a450 100644 --- a/tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs +++ b/tests/Interop/Windows/um/manipulations/_IManipulationEventsTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/manipulations.h and um/manipulations_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs b/tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs index a7020ff682..380ad1b2d1 100644 --- a/tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs +++ b/tests/Interop/Windows/um/rendezvoussession/DRendezvousSessionEventsTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs b/tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs index 1234128b20..fd999f8ef4 100644 --- a/tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs +++ b/tests/Interop/Windows/um/rendezvoussession/IRendezvousApplicationTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs b/tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs index 2a9130e993..7d81ea60a1 100644 --- a/tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs +++ b/tests/Interop/Windows/um/rendezvoussession/IRendezvousSessionTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs b/tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs index 734960b76f..3b33c5ad29 100644 --- a/tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs +++ b/tests/Interop/Windows/um/rendezvoussession/RendezvousApplicationTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/rendezvoussession/WindowsTests.cs b/tests/Interop/Windows/um/rendezvoussession/WindowsTests.cs new file mode 100644 index 0000000000..1c7b38fd12 --- /dev/null +++ b/tests/Interop/Windows/um/rendezvoussession/WindowsTests.cs @@ -0,0 +1,50 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/rendezvoussession.h and um/rendezvoussession_i.c in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System; +using static TerraFX.Interop.Windows; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the class. + public static partial class WindowsTests + { + /// Validates that the value of the property is correct. + [Test] + public static void LIBID_RendezvousSessionLibTest() + { + Assert.That(LIBID_RendezvousSessionLib, Is.EqualTo(new Guid(0xEFD856A4, 0x5A85, 0x4A1B, 0xAD, 0xD5, 0x2E, 0xAD, 0xAC, 0xE6, 0xF6, 0xA2))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IRendezvousSessionTest() + { + Assert.That(IID_IRendezvousSession, Is.EqualTo(new Guid(0x9BA4B1DD, 0x8B0C, 0x48B7, 0x9E, 0x7C, 0x2F, 0x25, 0x85, 0x7C, 0x8D, 0xF5))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void DIID_DRendezvousSessionEventsTest() + { + Assert.That(DIID_DRendezvousSessionEvents, Is.EqualTo(new Guid(0x3FA19CF8, 0x64C4, 0x4F53, 0xAE, 0x60, 0x63, 0x5B, 0x38, 0x06, 0xEC, 0xA6))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void IID_IRendezvousApplicationTest() + { + Assert.That(IID_IRendezvousApplication, Is.EqualTo(new Guid(0x4F4D070B, 0xA275, 0x49FB, 0xB1, 0x0D, 0x8E, 0xC2, 0x63, 0x87, 0xB5, 0x0D))); + } + + /// Validates that the value of the property is correct. + [Test] + public static void CLSID_RendezvousApplicationTest() + { + Assert.That(CLSID_RendezvousApplication, Is.EqualTo(new Guid(0x0B7E019A, 0xB5DE, 0x47fa, 0x89, 0x66, 0x90, 0x82, 0xF8, 0x2F, 0xB1, 0x92))); + } + } +} diff --git a/tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs b/tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs index 829dc7ce50..706aaa37ee 100644 --- a/tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs +++ b/tests/Interop/Windows/um/swdevicedef/SW_DEVICE_CREATE_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/swdevicedef.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs index dacc809c44..80378a57cc 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_BILLING_CYCLE_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs b/tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs index a1eb19b0f2..bcfff8e3ce 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_CONNECTION_COST_DATATests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs index e25af23904..61556bafe4 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_DATAPLAN_STATUSTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs b/tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs index 72b8cfccd9..0690cf7863 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_POLICY_VALUETests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs index 346359faa1..3edf999164 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFOTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs index b113cee456..4738e08ab0 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_PROFILE_INFO_LISTTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs b/tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs index 3c5ab60d43..2a277b33df 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_TIME_INTERVALTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs b/tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs index 7f3df60806..df46c52290 100644 --- a/tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs +++ b/tests/Interop/Windows/um/wcmapi/WCM_USAGE_DATATests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from um/wcmapi.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/um/windows.data.pdf.interop/WindowsTests.cs b/tests/Interop/Windows/um/windows.data.pdf.interop/WindowsTests.cs index 9c685bd923..961bf7487d 100644 --- a/tests/Interop/Windows/um/windows.data.pdf.interop/WindowsTests.cs +++ b/tests/Interop/Windows/um/windows.data.pdf.interop/WindowsTests.cs @@ -4,6 +4,7 @@ // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; +using System; using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests diff --git a/tests/Interop/Windows/um/x3daudio/WindowsTests.cs b/tests/Interop/Windows/um/x3daudio/WindowsTests.cs index ed0fcdfe1c..ac0139ddbd 100644 --- a/tests/Interop/Windows/um/x3daudio/WindowsTests.cs +++ b/tests/Interop/Windows/um/x3daudio/WindowsTests.cs @@ -4,6 +4,7 @@ // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; +using System; using static TerraFX.Interop.Windows; namespace TerraFX.Interop.UnitTests diff --git a/tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs b/tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs index bded86ea67..287d35cf60 100644 --- a/tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs +++ b/tests/Interop/Windows/winrt/DocumentSource/IPrintDocumentPageSourceTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; diff --git a/tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs b/tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs index 714a331561..a3d3d045cd 100644 --- a/tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs +++ b/tests/Interop/Windows/winrt/DocumentSource/IPrintPreviewPageCollectionTests.cs @@ -1,6 +1,6 @@ // Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.19041.0 +// Ported from winrt/DocumentSource.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; From 9819aa5f67002606e6efb95138dff0b71c8ea328 Mon Sep 17 00:00:00 2001 From: reflectronic Date: Sun, 10 Oct 2021 21:04:47 -0400 Subject: [PATCH 36/36] Add audioclientactivationparams.h --- TerraFX.Interop.Windows.sln | 42 ++++++++++--------- .../audioclientactivationparams/generate.rsp | 10 +++++ .../um/audioclientactivationparams/header.txt | 4 ++ .../um-audioclientactivationparams.h | 2 + .../AUDIOCLIENT_ACTIVATION_PARAMS.cs | 34 +++++++++++++++ .../AUDIOCLIENT_ACTIVATION_TYPE.cs | 13 ++++++ .../AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS.cs | 15 +++++++ .../PROCESS_LOOPBACK_MODE.cs | 13 ++++++ .../um/audioclientactivationparams/Windows.cs | 13 ++++++ .../AUDIOCLIENT_ACTIVATION_PARAMSTests.cs | 35 ++++++++++++++++ ...UDIOCLIENT_PROCESS_LOOPBACK_PARAMSTests.cs | 35 ++++++++++++++++ 11 files changed, 197 insertions(+), 19 deletions(-) create mode 100644 generation/um/audioclientactivationparams/generate.rsp create mode 100644 generation/um/audioclientactivationparams/header.txt create mode 100644 generation/um/audioclientactivationparams/um-audioclientactivationparams.h create mode 100644 sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMS.cs create mode 100644 sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_TYPE.cs create mode 100644 sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS.cs create mode 100644 sources/Interop/Windows/um/audioclientactivationparams/PROCESS_LOOPBACK_MODE.cs create mode 100644 sources/Interop/Windows/um/audioclientactivationparams/Windows.cs create mode 100644 tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMSTests.cs create mode 100644 tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMSTests.cs diff --git a/TerraFX.Interop.Windows.sln b/TerraFX.Interop.Windows.sln index 80e61eaa04..f55cdf9b64 100644 --- a/TerraFX.Interop.Windows.sln +++ b/TerraFX.Interop.Windows.sln @@ -2116,11 +2116,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EvColl", "EvColl", "{C7DE84 EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XblIdpAuthManager", "XblIdpAuthManager", "{EAAB8DAC-A628-425F-ACC2-E3DBC2130C4B}" - ProjectSection(SolutionItems) = preProject - generation\um\XblIdpAuthManager\generate.rsp = generation\um\XblIdpAuthManager\generate.rsp - generation\um\XblIdpAuthManager\header.txt = generation\um\XblIdpAuthManager\header.txt - generation\um\XblIdpAuthManager\um-XblIdpAuthManager.h = generation\um\XblIdpAuthManager\um-XblIdpAuthManager.h -======= +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shlwapi", "shlwapi", "{9842510D-DBF2-4327-9720-B1408A1B0383}" ProjectSection(SolutionItems) = preProject generation\um\shlwapi\generate.rsp = generation\um\shlwapi\generate.rsp @@ -2305,6 +2301,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "D3D12Downlevel", "D3D12Down generation\other\D3D12Downlevel\other-d3d12downlevel.h = generation\other\D3D12Downlevel\other-d3d12downlevel.h EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "audioclientactivationparams", "audioclientactivationparams", "{B3FD7D49-F8E3-4364-B84F-5706600E2825}" + ProjectSection(SolutionItems) = preProject + generation\um\audioclientactivationparams\generate.rsp = generation\um\audioclientactivationparams\generate.rsp + generation\um\audioclientactivationparams\header.txt = generation\um\audioclientactivationparams\header.txt + generation\um\audioclientactivationparams\um-audioclientactivationparams.h = generation\um\audioclientactivationparams\um-audioclientactivationparams.h + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -2605,6 +2608,20 @@ Global {84673C32-22B3-49EC-8CF3-BE5A9FEDA5EB} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C763A292-7CAB-4848-80B0-151D9A58591F} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {173278D7-E38F-4DE6-853E-FF76BC4AAF81} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} + {33B327CA-5D79-4439-A103-2293D33D5D54} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {E8C255FA-AF8E-4892-BEB0-A653F3046CEE} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {B8588673-BA76-4076-B924-4B7398E15BD6} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {7210C238-D3BE-4F85-953D-B67995C784C7} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {DAAA7A49-B0AA-4347-8353-1905E40149E0} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {4DA8F7C1-3A46-455E-8169-62D1FD1F1E0C} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {5A6C04CB-56B3-4CBD-861F-7DE34B04B0D6} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {5B1D2CFE-E46A-4809-A8D9-598FF743E683} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {95722363-30D8-4E31-8A2F-3CB85ED6E3BE} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {CE835F53-F217-4295-82A4-A4D1EA7DDF36} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {9486A079-7024-44CC-8A27-0CA4AB141E53} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {3F5BE8A1-2368-4E7C-B751-CC8D82EEF69A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {EE285FEB-DBDD-4D97-895A-9438C49FDF07} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} + {BA55521C-15B9-48AD-8948-D58CA529386A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {2DACC2E6-8B04-448D-9780-1CB4C9BDD7EF} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {A68F348B-DDA4-4B37-85E2-F0936FB0ACAA} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} {611800BA-4A44-4D89-8A5F-89B3926AA7DF} = {030D5AC2-A56E-4C79-AD45-5BD6093C8D9A} @@ -2622,20 +2639,6 @@ Global {1F5573A8-15AF-43CC-8879-F20398695556} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {C7DE8450-50ED-487C-B1DF-B0ADE5F55F09} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {EAAB8DAC-A628-425F-ACC2-E3DBC2130C4B} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {33B327CA-5D79-4439-A103-2293D33D5D54} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {E8C255FA-AF8E-4892-BEB0-A653F3046CEE} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {B8588673-BA76-4076-B924-4B7398E15BD6} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {7210C238-D3BE-4F85-953D-B67995C784C7} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {DAAA7A49-B0AA-4347-8353-1905E40149E0} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {4DA8F7C1-3A46-455E-8169-62D1FD1F1E0C} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {5A6C04CB-56B3-4CBD-861F-7DE34B04B0D6} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {5B1D2CFE-E46A-4809-A8D9-598FF743E683} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {95722363-30D8-4E31-8A2F-3CB85ED6E3BE} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {CE835F53-F217-4295-82A4-A4D1EA7DDF36} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {9486A079-7024-44CC-8A27-0CA4AB141E53} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {3F5BE8A1-2368-4E7C-B751-CC8D82EEF69A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {EE285FEB-DBDD-4D97-895A-9438C49FDF07} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} - {BA55521C-15B9-48AD-8948-D58CA529386A} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {9842510D-DBF2-4327-9720-B1408A1B0383} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {CA57B5BA-E29F-4CD1-8F56-34807700AED7} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {685EAB59-3B30-41C8-8A19-EA4979B365B3} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} @@ -2662,6 +2665,7 @@ Global {DCBBC643-78B5-411C-8001-5FE4F3F7C36E} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} {7FFDCE64-7E80-4123-92FC-F44B71568D6E} = {B09A774C-A2CD-4E0D-8DE8-AC48459E1699} {22E814D7-5FDA-4484-BA70-78E6CDFEAFE7} = {B09A774C-A2CD-4E0D-8DE8-AC48459E1699} + {B3FD7D49-F8E3-4364-B84F-5706600E2825} = {67311E5E-FA9C-43A6-B431-9EF10047A0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {2FE36DF8-2D9C-4F20-8787-45DC74B57461} diff --git a/generation/um/audioclientactivationparams/generate.rsp b/generation/um/audioclientactivationparams/generate.rsp new file mode 100644 index 0000000000..2008237a51 --- /dev/null +++ b/generation/um/audioclientactivationparams/generate.rsp @@ -0,0 +1,10 @@ +@../../settings.rsp +@../../remap.rsp +--file +um-audioclientactivationparams.h +--output +../../../sources/Interop/Windows/um/audioclientactivationparams +--test-output +../../../tests/Interop/Windows/um/audioclientactivationparams +--traverse +C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/audioclientactivationparams.h diff --git a/generation/um/audioclientactivationparams/header.txt b/generation/um/audioclientactivationparams/header.txt new file mode 100644 index 0000000000..e0f5153cf9 --- /dev/null +++ b/generation/um/audioclientactivationparams/header.txt @@ -0,0 +1,4 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. diff --git a/generation/um/audioclientactivationparams/um-audioclientactivationparams.h b/generation/um/audioclientactivationparams/um-audioclientactivationparams.h new file mode 100644 index 0000000000..b6d86f678a --- /dev/null +++ b/generation/um/audioclientactivationparams/um-audioclientactivationparams.h @@ -0,0 +1,2 @@ +#include +#include diff --git a/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMS.cs b/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMS.cs new file mode 100644 index 0000000000..a1fe01fe8d --- /dev/null +++ b/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMS.cs @@ -0,0 +1,34 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop +{ + public partial struct AUDIOCLIENT_ACTIVATION_PARAMS + { + public AUDIOCLIENT_ACTIVATION_TYPE ActivationType; + + [NativeTypeName("AUDIOCLIENT_ACTIVATION_PARAMS::(anonymous union at C:/Program Files (x86)/Windows Kits/10/Include/10.0.20348.0/um/audioclientactivationparams.h:94:5)")] + public _Anonymous_e__Union Anonymous; + + public ref AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS ProcessLoopbackParams + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.ProcessLoopbackParams, 1)); + } + } + + [StructLayout(LayoutKind.Explicit)] + public partial struct _Anonymous_e__Union + { + [FieldOffset(0)] + public AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS ProcessLoopbackParams; + } + } +} diff --git a/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_TYPE.cs b/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_TYPE.cs new file mode 100644 index 0000000000..702f61ba01 --- /dev/null +++ b/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_TYPE.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum AUDIOCLIENT_ACTIVATION_TYPE + { + AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT = 0, + AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK = 1, + } +} diff --git a/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS.cs b/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS.cs new file mode 100644 index 0000000000..44376b048a --- /dev/null +++ b/sources/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS.cs @@ -0,0 +1,15 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public partial struct AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS + { + [NativeTypeName("DWORD")] + public uint TargetProcessId; + + public PROCESS_LOOPBACK_MODE ProcessLoopbackMode; + } +} diff --git a/sources/Interop/Windows/um/audioclientactivationparams/PROCESS_LOOPBACK_MODE.cs b/sources/Interop/Windows/um/audioclientactivationparams/PROCESS_LOOPBACK_MODE.cs new file mode 100644 index 0000000000..6a4edf12b5 --- /dev/null +++ b/sources/Interop/Windows/um/audioclientactivationparams/PROCESS_LOOPBACK_MODE.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public enum PROCESS_LOOPBACK_MODE + { + PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE = 0, + PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE = 1, + } +} diff --git a/sources/Interop/Windows/um/audioclientactivationparams/Windows.cs b/sources/Interop/Windows/um/audioclientactivationparams/Windows.cs new file mode 100644 index 0000000000..48eb9a9e57 --- /dev/null +++ b/sources/Interop/Windows/um/audioclientactivationparams/Windows.cs @@ -0,0 +1,13 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop +{ + public static partial class Windows + { + [NativeTypeName("#define VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK L\"VAD\\\\Process_Loopback\"")] + public const string VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK = "VAD\\Process_Loopback"; + } +} diff --git a/tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMSTests.cs b/tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMSTests.cs new file mode 100644 index 0000000000..73a6f9847c --- /dev/null +++ b/tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_ACTIVATION_PARAMSTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class AUDIOCLIENT_ACTIVATION_PARAMSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(AUDIOCLIENT_ACTIVATION_PARAMS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(AUDIOCLIENT_ACTIVATION_PARAMS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(AUDIOCLIENT_ACTIVATION_PARAMS), Is.EqualTo(12)); + } + } +} diff --git a/tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMSTests.cs b/tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMSTests.cs new file mode 100644 index 0000000000..e51a02b659 --- /dev/null +++ b/tests/Interop/Windows/um/audioclientactivationparams/AUDIOCLIENT_PROCESS_LOOPBACK_PARAMSTests.cs @@ -0,0 +1,35 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/audioclientactivationparams.h in the Windows SDK for Windows 10.0.20348.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using NUnit.Framework; +using System.Runtime.InteropServices; + +namespace TerraFX.Interop.UnitTests +{ + /// Provides validation of the struct. + public static unsafe class AUDIOCLIENT_PROCESS_LOOPBACK_PARAMSTests + { + /// Validates that the struct is blittable. + [Test] + public static void IsBlittableTest() + { + Assert.That(Marshal.SizeOf(), Is.EqualTo(sizeof(AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS))); + } + + /// Validates that the struct has the right . + [Test] + public static void IsLayoutSequentialTest() + { + Assert.That(typeof(AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS).IsLayoutSequential, Is.True); + } + + /// Validates that the struct has the correct size. + [Test] + public static void SizeOfTest() + { + Assert.That(sizeof(AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS), Is.EqualTo(8)); + } + } +}