Skip to content

Add shift-left header annotations to the C# toolchain - #2363

Draft
Jevan Saks (jevansaks) wants to merge 49 commits into
mainfrom
jevansaks-header-annotation-migration
Draft

Jevan Saks (jevansaks) wants to merge 49 commits into
mainfrom
jevansaks-header-annotation-migration

Conversation

@jevansaks

@jevansaks Jevan Saks (jevansaks) commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Current status

Published head: 5eadc50ab621781dde163bbb1718fa1978d3d467, a normal fast-forward with sole parent 4eb822fed6ffda21221c05eaa68433317018ffbc. Ordinary PR Validation 40465006414 is running for this exact head. Its three architecture scrapes and complete build/test/package result are not yet qualified.

The exact combined source compiled all BuildTools with zero warnings/errors and passed 576 local tests, zero failures/skips: 166 ordinary utility tests, 16 diagnostic-collection tests and 394 affected managed-composition tests. This is focused tooling qualification, not complete DoTests.ps1, the 600-second/four-processor full-run gate, or fresh SDK image qualification. Independent source review and five reproduced failure-fixture rechecks passed before publication. SDK integration can consume the reviewed local commit without waiting for remote CI.

The preceding ordinary run 40405262585 passed exact 4eb: 825 tests with zero failures/skips and a 209-second complete hosted test step. That older result does not qualify the changed head. Prior descriptions, source pins, failed attempts, logs and raw results were retained before this update.

Tooling-only scope

Generic SDK-header annotation tooling with legacy/default inputs retained. SDK/header migration remains separate in #2365. No API header/IDL pilot patches, SDK mirror replacement, migration recipes, API-specific workaround or mass sidecar retirement are included. Canonical shared/win32metadata_annotations.h, SAL bootstrap and metadata vocabulary remain shared infrastructure.

This successor adds strict retained-native-input relocation, production diagnostic accumulation and the independently reviewed constant-comparison correction. It changes no dependency versions, SDK inputs, native test-call budget or workflow timeout. The normal runner retains utility, emitter, Python coverage-auditor, scraper and WinMD-integrity suites and built-in console/TRX logging. Python audits authored inputs; it is not another production generator.

See the specification, constants contracts, migration playbook, native-const contracts, generation diagnostics and decisions/evidence.

Native identity and failure handling

Prepared-SDK inputs are validated before direct-path or legacy relocation shortcuts. Relocation requires the recorded complete SDK/source/recipe/preparation/prepared-payload identity, exact SDK-relative header and actual selected bytes, profile source proof and architecture provenance. An exact architecture manifest is preferred; only the designated crossarch producer is an allowed alternative. Equal header bytes, matching basenames or arbitrary SDK/configuration facts cannot authorize reuse. Windows cache-key spelling and .cs suffixes are case-insensitive; native symbol identity and the owner-ambiguity guard are unchanged. Missing or mismatched bindings retain contextual typed errors rather than falling into legacy selection.

Known recoverable failures accumulate at independent input/declaration/job boundaries. Invalid inputs remain ineligible for selection; later readable/header-bound facts still receive independent proof checks. Production failure bridges run read-only constants/emitter preflights and write generation-failures.json with complete typed errors, causes, retained-report references and explicitly blocked dependent stages. Raw native JSON is retained with path/length/hash references. Unexpected infrastructure failures remain fatal and explicit.

Only supported Version 1/completed producer receipts authorize transformations. Blocked, rejected, unknown, unsupported, malformed and contradictory completed receipts fail without publishing an image. Legacy completed native-selection receipts remain valid without diagnostic arrays; present Errors/BlockedStages must be empty arrays. Independent reference/source checks continue after malformed receipts. Final output is replaced only after successful serialization; no partial declarations, ambiguous fallback values, replacement references or incomplete-success WinMD are emitted.

WinmdUtils now compares declared type, literal/default presence, ConstantTypeCode, raw bytes and invariant decoded values independently. It exposes simultaneous type/value differences and same-bits/different-interpretation changes. The production qualified-reference comparer is unchanged; this does not establish physical callback equivalence.

Preserved API contracts

  • --config parse-win32-annotations remains opt-in; native field-array inference is separately default-off. Unselected recipes retain RSP/JSON facts, manual C# inputs and optional documentation mapping. Explicit missing recipes, conflicting facts, invalid syntax and ambiguous expressions reject.
  • The shared names file is a query index, not an all-name value-probe list. The original parse records active definitions/provenance; existing scanner helpers handle supported simple values. Unresolved genuine expressions use a separate optional Clang value translation unit. Structural fragments are not probed, and value-only declarations/types do not enter the ordinary binding AST. Probe survival and exact initializer/type-reference ownership checks remain; incomplete-record missing-GUID recovery retains its narrow native-error boundary. No blacklist, custom complex evaluator, recursive retry, reparse, PCH or diagnostic waiver is introduced.
  • Native identities remain case-sensitive. Logical groups, ordinary unscoped enums and projected names retain exact ownership. Capitalization aliases require genuine native alias provenance. Scoped native enums remain scoped; synthetic constant groups remain unscoped. Compiler-primitive dependency storage stays distinct from projected group storage, and independent legacy declarations retain their own expressions/policies. Storage conflicts reject explicitly; legacy rules and native-versus-legacy provenance remain distinct.
  • Typedef/function-pointer composition preserves qualified identity, compiler proofs, qualifiers and pointer depth. Bare-function typedefs receive only their first pointer reduction. Complete/empty records, annotated forward-only void-pointer storage, raw pointers and exact DECLARE_HANDLE/opaque-wrapper intent remain distinct. No synthetic backing record, blanket pointer equivalence, API-name exemption, per-API override or source/WinMD fallback is added.
  • PreserveResult lowers to CLR PreserveSig on free functions, interface methods and callback Invoke without changing ordinary methods or callback constructors. Method annotations use an excluded compiler-parsed sizeof carrier, empty for ordinary consumers. Original-IDL limitations remain explicit; no generic SetLastError or blanket packing/PreserveSig restoration is included.
  • Authoritative SDK import discovery precedes DLL overrides. Manual recovery/forwards, complete providers, legacy enum ownership and architecture overlaps remain. ___ reversion coalesces only with an exact compatible manual provider; SEC_WINNT_AUTH_IDENTITY/Rpc ownership remains deferred.
  • UNICODE is shared across parsing, binding, constants and recovery; a later explicit -UUNICODE wins. A/W exports remain authoritative. ANSI recovery remains limited to the proven 59 LDAP and 13 WinInet exports with import/source/compiler-skipped-range/unique-declaration/recursive-native proof. Alternate records/constants are not merged.
  • Authored member remaps win. Otherwise-unconfigured macro-selected members preserve compiler-proven OLD identity at the same declaration, kind and semantic parent; this is not an ABI rule or encoding inference. Valueless Flags applies only to an existing EnumDecl; FlagsEnum remains a separate integral-typedef contract. Existing-enum projected storage and character projection remain deferred; the VARENUM=ushort fixture is not header-only projected-storage proof.
  • MIDL producer paths retain lowercase identity; staging-prefix substitution is ordinal-ignore-case and generated text is not case-folded. Changed tools require fresh preparation. Established SAL, explicit-local/plain-pointer and authored SAL/metadata composition remain intact. MIDL2495 diagnostics are retained without suppression or a /WX change.

Remaining qualification and PR state

Fresh current-tooling SDK native/managed generation and the complete default test/budget gate remain pending in the SDK integration. No old SDK census, physical control or full image was replayed for this correction. The expanded per-case native matrix was previously consolidated/deleted rather than hidden with filters, skips or timeout changes; identical historical-matrix coverage is not claimed. The workflow consumer limit remains one hour, and the complete default test-run acceptance limit remains 600 seconds.

The separate native-production-cost issue is not declared closed. The separate architecture-aware callback physical-equivalence blocker also remains unresolved: retained images disagree on the callback TypeDef targeted by Windows.Win32.System.Environment.VBS_BASIC_ENCLAVE_SYSCALL_PAGE.ReturnFromException (a606/unmodified mask 2/X64 versus instrumented mask 5/X86|Arm64), despite identical printed VBS_BASIC_ENCLAVE_BASIC_CALL_RETURN_FROM_EXCEPTION names. Correct native selection, physical ABI equivalence and an introducing commit remain unestablished. Green ordinary CI or matching declaration dumps do not close this finding; no callback repair is bundled here.

Broader OLD-to-NEW/native/API grading, original-IDL gaps, owner-specific SAL/native comparison, native-const carriers, explicit ANSI differences, projected enum storage and authored ImageHlp corrections remain in the migration layer.

Publication preserved native stack 2385 (#2363 below #2365), both drafts, existing bases, upper head 435d9ecdf0d82dd96f4795b09fc7b05eb30beb2e, no auto-merge and the held physical checkout/index. No restack, rebase, force-push, merge, draft conversion or Agent merge was performed.

Detect positional and qualified signature changes, sequential field order, interface slot order and inheritance changes. Compare repeated attributes as a bag and cover the behavior with compiled metadata fixtures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jevansaks Jevan Saks (jevansaks) changed the title Upgrade the C# toolchain to Clang 23: phase 1 Add shift-left header annotations to the C# toolchain Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

📋 API Surface Diff

+1752 additions / -1138 deletions vs main branch (full validation run)

Click to expand API diff
diff --git "a/bin\\baseline.apidump.cs" "b/bin\\current.apidump.cs"
index bc6e749a..1a20d2ad 100644
--- "a/bin\\baseline.apidump.cs"
+++ "b/bin\\current.apidump.cs"
@@ -5985,15 +5985,15 @@ public struct HH_AKLINK
 
 	public BOOL fReserved;
 
-	public unsafe sbyte* pszKeywords;
+	public unsafe ushort* pszKeywords;
 
-	public unsafe sbyte* pszUrl;
+	public unsafe ushort* pszUrl;
 
-	public unsafe sbyte* pszMsgText;
+	public unsafe ushort* pszMsgText;
 
-	public unsafe sbyte* pszMsgTitle;
+	public unsafe ushort* pszMsgTitle;
 
-	public unsafe sbyte* pszWindow;
+	public unsafe ushort* pszWindow;
 
 	public BOOL fIndexOnFail;
 }
@@ -6047,7 +6047,7 @@ public struct HH_FTS_QUERY
 
 	public BOOL fUniCodeStrings;
 
-	public unsafe sbyte* pszSearchQuery;
+	public unsafe ushort* pszSearchQuery;
 
 	public int iProximity;
 
@@ -6057,7 +6057,7 @@ public struct HH_FTS_QUERY
 
 	public BOOL fExecute;
 
-	public unsafe sbyte* pszWindow;
+	public unsafe ushort* pszWindow;
 }
 
 using Windows.Win32.System.Variant;
@@ -6096,7 +6096,7 @@ public struct HH_POPUP
 
 	public uint idString;
 
-	public unsafe sbyte* pszText;
+	public unsafe ushort* pszText;
 
 	public POINT pt;
 
@@ -6106,7 +6106,7 @@ public struct HH_POPUP
 
 	public RECT rcMargins;
 
-	public unsafe sbyte* pszFont;
+	public unsafe ushort* pszFont;
 }
 
 using Windows.Win32.Foundation;
@@ -6137,13 +6137,13 @@ public struct HH_WINTYPE
 
 	public BOOL fUniCodeStrings;
 
-	public unsafe sbyte* pszType;
+	public unsafe ushort* pszType;
 
 	public uint fsValidMembers;
 
 	public uint fsWinProperties;
 
-	public unsafe sbyte* pszCaption;
+	public unsafe ushort* pszCaption;
 
 	public uint dwStyles;
 
@@ -6169,13 +6169,13 @@ public struct HH_WINTYPE
 
 	public RECT rcHTML;
 
-	public unsafe sbyte* pszToc;
+	public unsafe ushort* pszToc;
 
-	public unsafe sbyte* pszIndex;
+	public unsafe ushort* pszIndex;
 
-	public unsafe sbyte* pszFile;
+	public unsafe ushort* pszFile;
 
-	public unsafe sbyte* pszHome;
+	public unsafe ushort* pszHome;
 
 	public uint fsToolBarFlags;
 
@@ -6191,19 +6191,19 @@ public struct HH_WINTYPE
 
 	public int cHistory;
 
-	public unsafe sbyte* pszJump1;
+	public unsafe ushort* pszJump1;
 
-	public unsafe sbyte* pszJump2;
+	public unsafe ushort* pszJump2;
 
-	public unsafe sbyte* pszUrlJump1;
+	public unsafe ushort* pszUrlJump1;
 
-	public unsafe sbyte* pszUrlJump2;
+	public unsafe ushort* pszUrlJump2;
 
 	public RECT rcMinSize;
 
 	public int cbInfoTypes;
 
-	public unsafe sbyte* pszCustomTabs;
+	public unsafe ushort* pszCustomTabs;
 }
 
 namespace Windows.Win32.Data.HtmlHelp;
@@ -11385,18 +11385,18 @@ public interface IXmlReader : IUnknown
 
 	HRESULT SetProperty ([In] uint nProperty, [Optional][In] IntPtr pValue);
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	unsafe HRESULT Read ([Optional][Out] XmlNodeType* pNodeType);
 
 	unsafe HRESULT GetNodeType ([Out] XmlNodeType* pNodeType);
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	HRESULT MoveToFirstAttribute ();
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	HRESULT MoveToNextAttribute ();
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	HRESULT MoveToAttributeByName ([In][Const] PWSTR pwszLocalName, [Optional][In][Const] PWSTR pwszNamespaceUri);
 
 	HRESULT MoveToElement ();
@@ -11411,7 +11411,7 @@ public interface IXmlReader : IUnknown
 
 	unsafe HRESULT GetValue ([Out][Const] PWSTR* ppwszValue, [Optional][Out] uint* pcwchValue);
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	unsafe HRESULT ReadValueChunk ([Out][NativeArrayInfo (CountParamIndex = 1)] PWSTR pwchBuffer, [In] uint cwchChunkSize, [In][Out] uint* pcwchRead);
 
 	unsafe HRESULT GetBaseUri ([Out][Const] PWSTR* ppwszBaseUri, [Optional][Out] uint* pcwchBaseUri);
@@ -15286,6 +15286,15 @@ public static class Apis
 
 	public const ushort WINBIO_ANSI_381_IMP_TYPE_LIVE_SCAN_CONTACTLESS = 9;
 
+	[NativeEncoding ("ansi")]
+	public const string WINBIO_QUERY_SENSOR_INTERFACE_FN_NAME = "WbioQuerySensorInterface";
+
+	[NativeEncoding ("ansi")]
+	public const string WINBIO_QUERY_ENGINE_INTERFACE_FN_NAME = "WbioQueryEngineInterface";
+
+	[NativeEncoding ("ansi")]
+	public const string WINBIO_QUERY_STORAGE_INTERFACE_FN_NAME = "WbioQueryStorageInterface";
+
 	public const uint FACILITY_WINBIO = 9u;
 
 	public const uint FACILITY_NONE = 0u;
@@ -15474,17 +15483,17 @@ public static class Apis
 	[DllImport ("winbio.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows6.1")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winbio/nf-winbio-winbioenumserviceproviders")]
-	public unsafe static extern HRESULT WinBioEnumServiceProviders ([In] uint Factor, [Out] WINBIO_BSP_SCHEMA** BspSchemaArray, [Out] UIntPtr* BspCount);
+	public unsafe static extern HRESULT WinBioEnumServiceProviders ([In] uint Factor, [Out][NativeArrayInfo (CountParamIndex = 2)] WINBIO_BSP_SCHEMA** BspSchemaArray, [Out] UIntPtr* BspCount);
 
 	[DllImport ("winbio.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows6.1")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winbio/nf-winbio-winbioenumbiometricunits")]
-	public unsafe static extern HRESULT WinBioEnumBiometricUnits ([In] uint Factor, [Out] WINBIO_UNIT_SCHEMA** UnitSchemaArray, [Out] UIntPtr* UnitCount);
+	public unsafe static extern HRESULT WinBioEnumBiometricUnits ([In] uint Factor, [Out][NativeArrayInfo (CountParamIndex = 2)] WINBIO_UNIT_SCHEMA** UnitSchemaArray, [Out] UIntPtr* UnitCount);
 
 	[DllImport ("winbio.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows6.1")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winbio/nf-winbio-winbioenumdatabases")]
-	public unsafe static extern HRESULT WinBioEnumDatabases ([In] uint Factor, [Out] WINBIO_STORAGE_SCHEMA** StorageSchemaArray, [Out] UIntPtr* StorageCount);
+	public unsafe static extern HRESULT WinBioEnumDatabases ([In] uint Factor, [Out][NativeArrayInfo (CountParamIndex = 2)] WINBIO_STORAGE_SCHEMA** StorageSchemaArray, [Out] UIntPtr* StorageCount);
 
 	[DllImport ("winbio.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows8.0")]
@@ -15604,7 +15613,7 @@ public static class Apis
 	[DllImport ("winbio.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows6.1")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winbio/nf-winbio-winbioenumenrollments")]
-	public unsafe static extern HRESULT WinBioEnumEnrollments ([In] uint SessionHandle, [In] uint UnitId, [In] WINBIO_IDENTITY* Identity, [Out] byte** SubFactorArray, [Optional][Out] UIntPtr* SubFactorCount);
+	public unsafe static extern HRESULT WinBioEnumEnrollments ([In] uint SessionHandle, [In] uint UnitId, [In] WINBIO_IDENTITY* Identity, [Out][NativeArrayInfo (CountParamIndex = 4)] byte** SubFactorArray, [Optional][Out] UIntPtr* SubFactorCount);
 
 	[DllImport ("winbio.dll", ExactSpelling = true, PreserveSig = false)]
 	public static extern HRESULT WinBioImproveBegin ([In] uint SessionHandle, [In] uint UnitId);
@@ -16292,12 +16301,13 @@ public unsafe delegate HRESULT PIBIO_FRAMEWORK_VSM_DECRYPT_SAMPLE_FN ([In][Out]
 using System;
 using System.Runtime.InteropServices;
 using Windows.Win32.Foundation;
+using Windows.Win32.Foundation.Metadata;
 
 namespace Windows.Win32.Devices.BiometricFramework;
 
 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
 [UnmanagedFunctionPointer (CallingConvention.Winapi)]
-public unsafe delegate HRESULT PIBIO_FRAMEWORK_VSM_QUERY_AUTHORIZED_ENROLLMENTS_FN ([In][Out] WINBIO_PIPELINE* Pipeline, [In] WINBIO_IDENTITY* Identity, [Out] UIntPtr* SecureIdentityCount, [Out] WINBIO_IDENTITY** SecureIdentities);
+public unsafe delegate HRESULT PIBIO_FRAMEWORK_VSM_QUERY_AUTHORIZED_ENROLLMENTS_FN ([In][Out] WINBIO_PIPELINE* Pipeline, [In] WINBIO_IDENTITY* Identity, [Out] UIntPtr* SecureIdentityCount, [Out][NativeArrayInfo (CountParamIndex = 2)] WINBIO_IDENTITY** SecureIdentities);
 
 using System;
 using System.Runtime.InteropServices;
@@ -26549,13 +26559,13 @@ public static class Apis
 	[SupportedOSPlatform ("windows5.1.2600")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/setupapi/nf-setupapi-setupquerysourcelista")]
-	public unsafe static extern BOOL SetupQuerySourceListA ([In] uint Flags, [Out][Const] PSTR** List, [Out] uint* Count);
+	public unsafe static extern BOOL SetupQuerySourceListA ([In] uint Flags, [Out][Const][NativeArrayInfo (CountParamIndex = 2)] PSTR** List, [Out] uint* Count);
 
 	[DllImport ("SETUPAPI.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows5.1.2600")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/setupapi/nf-setupapi-setupquerysourcelistw")]
-	public unsafe static extern BOOL SetupQuerySourceListW ([In] uint Flags, [Out][Const] PWSTR** List, [Out] uint* Count);
+	public unsafe static extern BOOL SetupQuerySourceListW ([In] uint Flags, [Out][Const][NativeArrayInfo (CountParamIndex = 2)] PWSTR** List, [Out] uint* Count);
 
 	[DllImport ("SETUPAPI.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows5.1.2600")]
@@ -34147,19 +34157,19 @@ public static class Apis
 	public static extern void DevCloseObjectQuery ([In] HDEVQUERY hDevQuery);
 
 	[DllImport ("api-ms-win-devices-query-l1-1-0.dll", ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern HRESULT DevGetObjects ([In] DEV_OBJECT_TYPE ObjectType, [In] uint QueryFlags, [In] uint cRequestedProperties, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 2)] DEVPROPCOMPKEY* pRequestedProperties, [In] uint cFilterExpressionCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 4)] DEVPROP_FILTER_EXPRESSION* pFilter, [Out] uint* pcObjectCount, [Out][Const] DEV_OBJECT** ppObjects);
+	public unsafe static extern HRESULT DevGetObjects ([In] DEV_OBJECT_TYPE ObjectType, [In] uint QueryFlags, [In] uint cRequestedProperties, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 2)] DEVPROPCOMPKEY* pRequestedProperties, [In] uint cFilterExpressionCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 4)] DEVPROP_FILTER_EXPRESSION* pFilter, [Out] uint* pcObjectCount, [Out][Const][NativeArrayInfo (CountParamIndex = 6)] DEV_OBJECT** ppObjects);
 
 	[DllImport ("api-ms-win-devices-query-l1-1-1.dll", ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern HRESULT DevGetObjectsEx ([In] DEV_OBJECT_TYPE ObjectType, [In] uint QueryFlags, [In] uint cRequestedProperties, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 2)] DEVPROPCOMPKEY* pRequestedProperties, [In] uint cFilterExpressionCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 4)] DEVPROP_FILTER_EXPRESSION* pFilter, [In] uint cExtendedParameterCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 6)] DEV_QUERY_PARAMETER* pExtendedParameters, [Out] uint* pcObjectCount, [Out][Const] DEV_OBJECT** ppObjects);
+	public unsafe static extern HRESULT DevGetObjectsEx ([In] DEV_OBJECT_TYPE ObjectType, [In] uint QueryFlags, [In] uint cRequestedProperties, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 2)] DEVPROPCOMPKEY* pRequestedProperties, [In] uint cFilterExpressionCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 4)] DEVPROP_FILTER_EXPRESSION* pFilter, [In] uint cExtendedParameterCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 6)] DEV_QUERY_PARAMETER* pExtendedParameters, [Out] uint* pcObjectCount, [Out][Const][NativeArrayInfo (CountParamIndex = 8)] DEV_OBJECT** ppObjects);
 
 	[DllImport ("api-ms-win-devices-query-l1-1-0.dll", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern void DevFreeObjects ([In] uint cObjectCount, [In][Const][NativeArrayInfo (CountParamIndex = 0)] DEV_OBJECT* pObjects);
 
 	[DllImport ("api-ms-win-devices-query-l1-1-0.dll", ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern HRESULT DevGetObjectProperties ([In] DEV_OBJECT_TYPE ObjectType, [In][Const] PWSTR pszObjectId, [In] uint QueryFlags, [In] uint cRequestedProperties, [In][Const][NativeArrayInfo (CountParamIndex = 3)] DEVPROPCOMPKEY* pRequestedProperties, [Out] uint* pcPropertyCount, [Out][Const] DEVPROPERTY** ppProperties);
+	public unsafe static extern HRESULT DevGetObjectProperties ([In] DEV_OBJECT_TYPE ObjectType, [In][Const] PWSTR pszObjectId, [In] uint QueryFlags, [In] uint cRequestedProperties, [In][Const][NativeArrayInfo (CountParamIndex = 3)] DEVPROPCOMPKEY* pRequestedProperties, [Out] uint* pcPropertyCount, [Out][Const][NativeArrayInfo (CountParamIndex = 5)] DEVPROPERTY** ppProperties);
 
 	[DllImport ("api-ms-win-devices-query-l1-1-1.dll", ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern HRESULT DevGetObjectPropertiesEx ([In] DEV_OBJECT_TYPE ObjectType, [In][Const] PWSTR pszObjectId, [In] uint QueryFlags, [In] uint cRequestedProperties, [In][Const][NativeArrayInfo (CountParamIndex = 3)] DEVPROPCOMPKEY* pRequestedProperties, [In] uint cExtendedParameterCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 5)] DEV_QUERY_PARAMETER* pExtendedParameters, [Out] uint* pcPropertyCount, [Out][Const] DEVPROPERTY** ppProperties);
+	public unsafe static extern HRESULT DevGetObjectPropertiesEx ([In] DEV_OBJECT_TYPE ObjectType, [In][Const] PWSTR pszObjectId, [In] uint QueryFlags, [In] uint cRequestedProperties, [In][Const][NativeArrayInfo (CountParamIndex = 3)] DEVPROPCOMPKEY* pRequestedProperties, [In] uint cExtendedParameterCount, [Optional][In][Const][NativeArrayInfo (CountParamIndex = 5)] DEV_QUERY_PARAMETER* pExtendedParameters, [Out] uint* pcPropertyCount, [Out][Const][NativeArrayInfo (CountParamIndex = 7)] DEVPROPERTY** ppProperties);
 
 	[DllImport ("api-ms-win-devices-query-l1-1-0.dll", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern void DevFreeObjectProperties ([In] uint cPropertyCount, [In][Const][NativeArrayInfo (CountParamIndex = 0)] DEVPROPERTY* pProperties);
@@ -35940,6 +35950,12 @@ public static class Apis
 
 	public const uint SETCONFIGURATION_STATUS_OVERRIDDEN = 2u;
 
+	public const uint FO_TYPE_RASTER = 1u;
+
+	public const uint FO_TYPE_DEVICE = 2u;
+
+	public const uint FO_TYPE_TRUETYPE = 4u;
+
 	[DllImport ("dxva2.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/physicalmonitorenumerationapi/nf-physicalmonitorenumerationapi-getnumberofphysicalmonitorsfromhmonitor")]
@@ -43903,10 +43919,10 @@ public static class Apis
 	public const string STI_REMOVE_DEVICE_BROADCAST_ACTION = "Removal";
 
 	[NativeEncoding ("ansi")]
-	public const string STI_ADD_DEVICE_BROADCAST_STRING = "STI\\";
+	public const string STI_ADD_DEVICE_BROADCAST_STRING = "STI\\Arrival\\%s";
 
 	[NativeEncoding ("ansi")]
-	public const string STI_REMOVE_DEVICE_BROADCAST_STRING = "STI\\";
+	public const string STI_REMOVE_DEVICE_BROADCAST_STRING = "STI\\Removal\\%s";
 
 	public const uint STI_DEVICE_CREATE_STATUS = 1u;
 
@@ -44067,6 +44083,10 @@ public static class Apis
 
 	public const uint STI_DEVICE_CREATE_FOR_MONITOR = 16777216u;
 
+	public const uint FAXSRV_MAX_SERVER_NAME = 260u;
+
+	public const uint FAXSRV_MAX_ROUTEEXT_NAME_LEN = 260u;
+
 	public const int lDEFAULT_PREFETCH_SIZE = 100;
 
 	public const ushort wcharREASSIGN_RECIPIENTS_DELIMITER = 59;
@@ -51505,6 +51525,8 @@ public static class Apis
 
 	public const string FD_SUBKEY = "SOFTWARE\\Microsoft\\Function Discovery\\";
 
+	public const string FD_SUBKEY_CATEGORIES = "SOFTWARE\\Microsoft\\Function Discovery\\Categories\\";
+
 	public const string FCTN_CATEGORY_PNP = "Provider\\Microsoft.Base.PnP";
 
 	public const string FCTN_CATEGORY_REGISTRY = "Provider\\Microsoft.Base.Registry";
@@ -51613,6 +51635,30 @@ public static class Apis
 
 	public const string SSDP_CONSTRAINTVALUE_TYPE_SVC_PREFIX = "urn:schemas-upnp-org:service:";
 
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_LIGHTING = "urn:schemas-upnp-org:device:Lighting:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_REMINDER = "urn:schemas-upnp-org:device:Reminder:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_POWERDEVICE = "urn:schemas-upnp-org:device:PowerDevice:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_IGD = "urn:schemas-upnp-org:device:InternetGatewayDevice:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_WANDEVICE = "urn:schemas-upnp-org:device:WANDevice:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_LANDEVICE = "urn:schemas-upnp-org:device:LANDevice:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_WANCONNDEVICE = "urn:schemas-upnp-org:device:WANConnectionDevice:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_LUXMETER = "urn:schemas-upnp-org:device:Luxmeter:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_MDARNDR = "urn:schemas-upnp-org:device:MediaRenderer:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_DEV_MDASRVR = "urn:schemas-upnp-org:device:MediaServer:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_SVC_SCANNER = "urn:schemas-upnp-org:service:Scanner:1";
+
+	public const string SSDP_CONSTRAINTVALUE_TYPE_SVC_DIMMING = "urn:schemas-upnp-org:service:DimmingService:1";
+
 	public const string PROVIDERWSD_QUERYCONSTRAINT_DIRECTEDADDRESS = "RemoteAddress";
 
 	public const string PROVIDERWSD_QUERYCONSTRAINT_TYPE = "Type";
@@ -63514,6 +63560,8 @@ public static class Apis
 
 	public const uint IOCTL_BUTTON_GET_ENABLED_ON_IDLE = 721580u;
 
+	public const uint DEV_STS_EFFECT_RUNNING = 1u;
+
 	[DllImport ("DINPUT8.dll", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern HRESULT DirectInput8Create ([In] HINSTANCE hinst, [In] uint dwVersion, [In][Const] Guid* riidltf, [In][Out] void** ppvOut, [In] IUnknown punkOuter);
 
@@ -68482,6 +68530,54 @@ public static class Apis
 
 	public const string WIA_EVENT_DEVICE_CONNECTED_STR = "Device Connected";
 
+	public const string WIA_ICON_DEVICE_DISCONNECTED = "sti.dll,-1001";
+
+	public const string WIA_ICON_DEVICE_CONNECTED = "sti.dll,-1001";
+
+	public const string WIA_ICON_ITEM_DELETED = "sti.dll,-1001";
+
+	public const string WIA_ICON_ITEM_CREATED = "sti.dll,-1001";
+
+	public const string WIA_ICON_TREE_UPDATED = "sti.dll,-1001";
+
+	public const string WIA_ICON_VOLUME_INSERT = "sti.dll,-1001";
+
+	public const string WIA_ICON_SCAN_BUTTON_PRESS = "sti.dll,-1001";
+
+	public const string WIA_ICON_DEVICE_NOT_READY = "sti.dll,-1001";
+
+	public const string WIA_ICON_DEVICE_READY = "sti.dll,-1001";
+
+	public const string WIA_ICON_FLATBED_LID_OPEN = "sti.dll,-1001";
+
+	public const string WIA_ICON_FLATBED_LID_CLOSED = "sti.dll,-1001";
+
+	public const string WIA_ICON_FEEDER_LOADED = "sti.dll,-1001";
+
+	public const string WIA_ICON_FEEDER_EMPTIED = "sti.dll,-1001";
+
+	public const string WIA_ICON_COVER_OPEN = "sti.dll,-1001";
+
+	public const string WIA_ICON_COVER_CLOSED = "sti.dll,-1001";
+
+	public const string WIA_ICON_START_FEEDER = "sti.dll,-1001";
+
+	public const string WIA_ICON_STOP_FEEDER = "sti.dll,-1001";
+
+	public const string WIA_ICON_SYNCHRONIZE = "sti.dll,-2000";
+
+	public const string WIA_ICON_TAKE_PICTURE = "sti.dll,-2001";
+
+	public const string WIA_ICON_DELETE_ALL_ITEMS = "sti.dll,-2002";
+
+	public const string WIA_ICON_CHANGE_DOCUMENT = "sti.dll,-2003";
+
+	public const string WIA_ICON_UNLOAD_DOCUMENT = "sti.dll,-2004";
+
+	public const string WIA_ICON_DELETE_DEVICE_TREE = "sti.dll,-2005";
+
+	public const string WIA_ICON_BUILD_DEVICE_TREE = "sti.dll,-2006";
+
 	public const uint TYMED_CALLBACK = 128u;
 
 	public const uint TYMED_MULTIPAGE_FILE = 256u;
@@ -69798,7 +69894,7 @@ public interface IWiaItem2 : IUnknown
 	unsafe HRESULT GetItemType ([Out] int* pItemType);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/wia/-wia-iwiaitem2-devicedlg")]
-	unsafe HRESULT DeviceDlg ([In] int lFlags, [In] HWND hwndParent, [In] BSTR bstrFolderName, [In] BSTR bstrFilename, [Out] int* plNumFiles, [Out] BSTR** ppbstrFilePaths, [Optional][Out] IWiaItem2* ppItem);
+	unsafe HRESULT DeviceDlg ([In] int lFlags, [In] HWND hwndParent, [In] BSTR bstrFolderName, [In] BSTR bstrFilename, [Out] int* plNumFiles, [Out][NativeArrayInfo (CountParamIndex = 4)] BSTR** ppbstrFilePaths, [Optional][Out] IWiaItem2* ppItem);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/wia/-wia-iwiaitem2-devicecommand")]
 	unsafe HRESULT DeviceCommand ([In] int lFlags, [In][Const] Guid* pCmdGUID, [In][Out] IWiaItem2* ppIWiaItem2);
@@ -75333,6 +75429,8 @@ public static class Apis
 
 	public const string NAME_FullEnumSyncSvc_EndSync = "EndSync";
 
+	public const string NAME_CalendarSvc_SyncInWindowOnly = "FilterType";
+
 	[DllImport ("DMProcessXMLFiltered.dll", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern HRESULT DMProcessConfigXMLFiltered ([In][Const] PWSTR pszXmlIn, [In][Const][NativeArrayInfo (CountParamIndex = 2)] PWSTR* rgszAllowedCspNodes, [In] uint dwNumAllowedCspNodes, [Out] BSTR* pbstrXmlOut);
 }
@@ -75421,11 +75519,11 @@ namespace Windows.Win32.Devices.PortableDevices;
 [Documentation ("https://learn.microsoft.com/windows/win32/api/portabledeviceapi/nn-portabledeviceapi-ienumportabledeviceobjectids")]
 public interface IEnumPortableDeviceObjectIDs : IUnknown
 {
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/portabledeviceapi/nf-portabledeviceapi-ienumportabledeviceobjectids-next")]
 	unsafe HRESULT Next ([In] uint cObjects, [Out][NativeArrayInfo (CountParamIndex = 0)] PWSTR* pObjIDs, [In][Out] uint* pcFetched);
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/portabledeviceapi/nf-portabledeviceapi-ienumportabledeviceobjectids-skip")]
 	HRESULT Skip ([In] uint cObjects);
 
@@ -78884,7 +78982,7 @@ public interface ISensor : IUnknown
 	unsafe HRESULT SupportsEvent ([In][Const] Guid* eventGuid, [Out] VARIANT_BOOL* pIsSupported);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/sensorsapi/nf-sensorsapi-isensor-geteventinterest")]
-	unsafe HRESULT GetEventInterest ([Out] Guid** ppValues, [Out] uint* pCount);
+	unsafe HRESULT GetEventInterest ([Out][NativeArrayInfo (CountParamIndex = 1)] Guid** ppValues, [Out] uint* pCount);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/sensorsapi/nf-sensorsapi-isensor-seteventinterest")]
 	unsafe HRESULT SetEventInterest ([Optional][In][NativeArrayInfo (CountParamIndex = 1)] Guid* pValues, [In] uint count);
@@ -81836,6 +81934,12 @@ public static class Apis
 
 	public const uint TAPIMEDIATYPE_MULTITRACK = 65536u;
 
+	public const string CLSID_String_VideoSuperclass = "{714C6F8C-6244-4685-87B3-B91F3F9EADA7}";
+
+	public const string CLSID_String_StreamingSuperclass = "{214F4ACC-AE0B-4464-8405-07029003F8E2}";
+
+	public const string CLSID_String_FileSuperclass = "{B4790031-56DB-4d3e-88C8-6FFAAFA08A91}";
+
 	public const uint TSPI_MESSAGE_BASE = 500u;
 
 	public const uint LINETSPIOPTION_NONREENTRANT = 1u;
@@ -83501,11 +83605,11 @@ public static class Apis
 
 	[DllImport ("MAPI32.dll", ExactSpelling = true, PreserveSig = false)]
 	[Documentation ("https://learn.microsoft.com/office/client-developer/outlook/mapi/opentnefstream")]
-	public unsafe static extern HRESULT OpenTnefStream ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] sbyte* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [Out] ITnef* lppTNEF);
+	public unsafe static extern HRESULT OpenTnefStream ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] ushort* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [Out] ITnef* lppTNEF);
 
 	[DllImport ("MAPI32.dll", ExactSpelling = true, PreserveSig = false)]
 	[Documentation ("https://learn.microsoft.com/office/client-developer/outlook/mapi/opentnefstreamex")]
-	public unsafe static extern HRESULT OpenTnefStreamEx ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] sbyte* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [In] IAddrBook lpAdressBook, [Out] ITnef* lppTNEF);
+	public unsafe static extern HRESULT OpenTnefStreamEx ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] ushort* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [In] IAddrBook lpAdressBook, [Out] ITnef* lppTNEF);
 
 	[DllImport ("MAPI32.dll", ExactSpelling = true, PreserveSig = false)]
 	[Documentation ("https://learn.microsoft.com/office/client-developer/outlook/mapi/gettnefstreamcodepage")]
@@ -89848,7 +89952,7 @@ namespace Windows.Win32.Devices.Tapi;
 
 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
 [UnmanagedFunctionPointer (CallingConvention.Winapi)]
-public unsafe delegate HRESULT LPOPENTNEFSTREAM ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] sbyte* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [Out] ITnef* lppTNEF);
+public unsafe delegate HRESULT LPOPENTNEFSTREAM ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] ushort* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [Out] ITnef* lppTNEF);
 
 using System.Runtime.InteropServices;
 using Windows.Win32.Foundation;
@@ -89859,7 +89963,7 @@ namespace Windows.Win32.Devices.Tapi;
 
 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
 [UnmanagedFunctionPointer (CallingConvention.Winapi)]
-public unsafe delegate HRESULT LPOPENTNEFSTREAMEX ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] sbyte* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [In] IAddrBook lpAdressBook, [Out] ITnef* lppTNEF);
+public unsafe delegate HRESULT LPOPENTNEFSTREAMEX ([In][Out] void* lpvSupport, [In] IStream lpStream, [In] ushort* lpszStreamName, [In] uint ulFlags, [In] IMessage lpMessage, [In] ushort wKeyVal, [In] IAddrBook lpAdressBook, [Out] ITnef* lppTNEF);
 
 using Windows.Win32.Foundation.Metadata;
 
@@ -113233,9 +113337,8 @@ public static class Apis
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-globalfree")]
 	public static extern HGLOBAL GlobalFree ([Optional][In] HGLOBAL hMem);
 
-	[DllImport ("KERNEL32.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
+	[DllImport ("KERNEL32.dll", ExactSpelling = true, SetLastError = true)]
 	[SupportedOSPlatform ("windows5.1.2600")]
-	[CanReturnErrorsAsSuccess]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-localfree")]
 	public static extern HLOCAL LocalFree ([Optional][In] HLOCAL hMem);
 
@@ -113666,6 +113769,7 @@ using System;
 namespace Windows.Win32.Foundation.Metadata;
 
 [Flags]
+[ScopedEnum]
 public enum Architecture
 {
 	None = 0,
@@ -113855,7 +113959,7 @@ using System.Runtime.InteropServices;
 namespace Windows.Win32.Foundation.Metadata;
 
 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
-[AttributeUsage (AttributeTargets.Struct, AllowMultiple = true, Inherited = true)]
+[AttributeUsage (AttributeTargets.Struct | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = true)]
 public sealed class InvalidHandleValueAttribute : Attribute
 {
 	public extern InvalidHandleValueAttribute ([In] long Value);
@@ -114084,7 +114188,7 @@ using System.Runtime.InteropServices;
 namespace Windows.Win32.Foundation.Metadata;
 
 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
-[AttributeUsage (AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface, AllowMultiple = false)]
+[AttributeUsage (AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false)]
 public sealed class SupportedOSPlatformAttribute : Attribute
 {
 	public extern SupportedOSPlatformAttribute ([In] string platform);
@@ -121063,7 +121167,7 @@ public static class Apis
 	[DllImport ("USP10.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/usp10/nf-usp10-scriptgetproperties")]
-	public unsafe static extern HRESULT ScriptGetProperties ([Out][Const] SCRIPT_PROPERTIES*** ppSp, [Out] int* piNumScripts);
+	public unsafe static extern HRESULT ScriptGetProperties ([Out][Const][NativeArrayInfo (CountParamIndex = 1)] SCRIPT_PROPERTIES*** ppSp, [Out] int* piNumScripts);
 
 	[DllImport ("USP10.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
@@ -121133,9 +121237,8 @@ public static class Apis
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/usp10/nf-usp10-scriptstringout")]
 	public unsafe static extern HRESULT ScriptStringOut ([In] void* ssa, [In] int iX, [In] int iY, [In] ETO_OPTIONS uOptions, [Optional][In][Const] RECT* prc, [In] int iMinSel, [In] int iMaxSel, [In] BOOL fDisabled);
 
-	[DllImport ("USP10.dll", ExactSpelling = true, PreserveSig = false)]
+	[DllImport ("USP10.dll", ExactSpelling = true)]
 	[SupportedOSPlatform ("windows5.0")]
-	[CanReturnMultipleSuccessValues]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/usp10/nf-usp10-scriptiscomplex")]
 	public static extern HRESULT ScriptIsComplex ([In][Const][NativeArrayInfo (CountParamIndex = 1)] PWSTR pwcInChars, [In] int cInChars, [In] SCRIPT_IS_COMPLEX_FLAGS dwFlags);
 
@@ -121648,7 +121751,7 @@ public static class Apis
 	public unsafe static extern uint ucpmap_get ([In][Const] UCPMap* map, [In] int c);
 
 	[DllImport ("icu.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern int ucpmap_getRange ([In][Const] UCPMap* map, [In] int start, [In] UCPMapRangeOption option, [In] uint surrogateValue, [In][Out] UCPMapValueFilter* filter, [In][Const] void* context, [In][Out] uint* pValue);
+	public unsafe static extern int ucpmap_getRange ([In][Const] UCPMap* map, [In] int start, [In] UCPMapRangeOption option, [In] uint surrogateValue, [In] UCPMapValueFilter filter, [In][Const] void* context, [In][Out] uint* pValue);
 
 	[DllImport ("icu.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern UCPTrie* ucptrie_openFromBinary ([In] UCPTrieType type, [In] UCPTrieValueWidth valueWidth, [In][Const] void* data, [In] int length, [In][Out] int* pActualLength, [In][Out] UErrorCode* pErrorCode);
@@ -121666,7 +121769,7 @@ public static class Apis
 	public unsafe static extern uint ucptrie_get ([In][Const] UCPTrie* trie, [In] int c);
 
 	[DllImport ("icu.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern int ucptrie_getRange ([In][Const] UCPTrie* trie, [In] int start, [In] UCPMapRangeOption option, [In] uint surrogateValue, [In][Out] UCPMapValueFilter* filter, [In][Const] void* context, [In][Out] uint* pValue);
+	public unsafe static extern int ucptrie_getRange ([In][Const] UCPTrie* trie, [In] int start, [In] UCPMapRangeOption option, [In] uint surrogateValue, [In] UCPMapValueFilter filter, [In][Const] void* context, [In][Out] uint* pValue);
 
 	[DllImport ("icu.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern int ucptrie_toBinary ([In][Const] UCPTrie* trie, [In][Out] void* data, [In] int capacity, [In][Out] UErrorCode* pErrorCode);
@@ -121699,7 +121802,7 @@ public static class Apis
 	public unsafe static extern uint umutablecptrie_get ([In][Const] UMutableCPTrie* trie, [In] int c);
 
 	[DllImport ("icu.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern int umutablecptrie_getRange ([In][Const] UMutableCPTrie* trie, [In] int start, [In] UCPMapRangeOption option, [In] uint surrogateValue, [In][Out] UCPMapValueFilter* filter, [In][Const] void* context, [In][Out] uint* pValue);
+	public unsafe static extern int umutablecptrie_getRange ([In][Const] UMutableCPTrie* trie, [In] int start, [In] UCPMapRangeOption option, [In] uint surrogateValue, [In] UCPMapValueFilter filter, [In][Const] void* context, [In][Out] uint* pValue);
 
 	[DllImport ("icu.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern void umutablecptrie_set ([In][Out] UMutableCPTrie* trie, [In] int c, [In] uint value, [In][Out] UErrorCode* pErrorCode);
@@ -121944,7 +122047,7 @@ public static class Apis
 	public static extern void u_cleanup ();
 
 	[DllImport ("icuuc.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern void u_setMemoryFunctions ([In][Const] void* context, [In][Out] UMemAllocFn* a, [In][Out] UMemReallocFn* r, [In][Out] UMemFreeFn* f, [In][Out] UErrorCode* status);
+	public unsafe static extern void u_setMemoryFunctions ([In][Const] void* context, [In] UMemAllocFn a, [In] UMemReallocFn r, [In] UMemFreeFn f, [In][Out] UErrorCode* status);
 
 	[DllImport ("icuuc.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern UResourceBundle* u_catopen ([In][Const] PSTR name, [In][Const] PSTR locale, [In][Out] UErrorCode* ec);
@@ -122064,7 +122167,7 @@ public static class Apis
 	public static extern sbyte u_charType ([In] int c);
 
 	[DllImport ("icuuc.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern void u_enumCharTypes ([In][Out] UCharEnumTypeRange* enumRange, [In][Const] void* context);
+	public unsafe static extern void u_enumCharTypes ([In] UCharEnumTypeRange enumRange, [In][Const] void* context);
 
 	[DllImport ("icuuc.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	public static extern byte u_getCombiningClass ([In] int c);
@@ -122082,7 +122185,7 @@ public static class Apis
 	public unsafe static extern int u_charFromName ([In] UCharNameChoice nameChoice, [In][Const] PSTR name, [In][Out] UErrorCode* pErrorCode);
 
 	[DllImport ("icuuc.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern void u_enumCharNames ([In] int start, [In] int limit, [In][Out] UEnumCharNamesFn* fn, [In][Out] void* context, [In] UCharNameChoice nameChoice, [In][Out] UErrorCode* pErrorCode);
+	public unsafe static extern void u_enumCharNames ([In] int start, [In] int limit, [In] UEnumCharNamesFn fn, [In][Out] void* context, [In] UCharNameChoice nameChoice, [In][Out] UErrorCode* pErrorCode);
 
 	[DllImport ("icuuc.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	[return: Const]
@@ -125200,7 +125303,7 @@ namespace Windows.Win32.Globalization;
 [Documentation ("https://learn.microsoft.com/windows/win32/api/spellcheck/nn-spellcheck-ienumspellingerror")]
 public interface IEnumSpellingError : IUnknown
 {
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/spellcheck/nf-spellcheck-ienumspellingerror-next")]
 	unsafe HRESULT Next ([Out][RetVal] ISpellingError* value);
 }
@@ -125347,7 +125450,7 @@ public interface IMLangStringAStr : IMLangString
 
 	unsafe HRESULT GetStrBufA ([In] int lSrcPos, [In] int lSrcMaxLen, [Optional][Out] uint* puDestCodePage, [Out] IMLangStringBufA* ppDestBuf, [Optional][Out] int* plDestLen);
 
-	unsafe HRESULT LockAStr ([In] int lSrcPos, [In] int lSrcLen, [In] int lFlags, [In] uint uCodePageIn, [In] int cchRequest, [Optional][Out] uint* puCodePageOut, [Optional][Out] PSTR* ppszDest, [Optional][Out] int* pcchDest, [Optional][Out] int* plDestLen);
+	unsafe HRESULT LockAStr ([In] int lSrcPos, [In] int lSrcLen, [In] int lFlags, [In] uint uCodePageIn, [In] int cchRequest, [Optional][Out] uint* puCodePageOut, [Optional][Out][NativeArrayInfo (CountParamIndex = 7)] PSTR* ppszDest, [Optional][Out] int* pcchDest, [Optional][Out] int* plDestLen);
 
 	unsafe HRESULT UnlockAStr ([In][Const][NativeArrayInfo (CountParamIndex = 1)] PSTR pszSrc, [In] int cchSrc, [Optional][Out] int* pcchActual, [Optional][Out] int* plActualLen);
 
@@ -125369,7 +125472,7 @@ public interface IMLangStringBufA : IUnknown
 {
 	unsafe HRESULT GetStatus ([Optional][Out] int* plFlags, [Optional][Out] int* pcchBuf);
 
-	unsafe HRESULT LockBuf ([In] int cchOffset, [In] int cchMaxLock, [Out] CHAR** ppszBuf, [Optional][Out] int* pcchBuf);
+	unsafe HRESULT LockBuf ([In] int cchOffset, [In] int cchMaxLock, [Out][NativeArrayInfo (CountParamIndex = 3)] CHAR** ppszBuf, [Optional][Out] int* pcchBuf);
 
 	HRESULT UnlockBuf ([In][Const] PSTR pszBuf, [In] int cchOffset, [In] int cchWrite);
 
@@ -125391,7 +125494,7 @@ public interface IMLangStringBufW : IUnknown
 {
 	unsafe HRESULT GetStatus ([Optional][Out] int* plFlags, [Optional][Out] int* pcchBuf);
 
-	unsafe HRESULT LockBuf ([In] int cchOffset, [In] int cchMaxLock, [Out] ushort** ppszBuf, [Optional][Out] int* pcchBuf);
+	unsafe HRESULT LockBuf ([In] int cchOffset, [In] int cchMaxLock, [Out][NativeArrayInfo (CountParamIndex = 3)] ushort** ppszBuf, [Optional][Out] int* pcchBuf);
 
 	HRESULT UnlockBuf ([In][Const] PWSTR pszBuf, [In] int cchOffset, [In] int cchWrite);
 
@@ -125417,7 +125520,7 @@ public interface IMLangStringWStr : IMLangString
 
 	unsafe HRESULT GetStrBufW ([In] int lSrcPos, [In] int lSrcMaxLen, [Out] IMLangStringBufW* ppDestBuf, [Optional][Out] int* plDestLen);
 
-	unsafe HRESULT LockWStr ([In] int lSrcPos, [In] int lSrcLen, [In] int lFlags, [In] int cchRequest, [Optional][Out] PWSTR* ppszDest, [Optional][Out] int* pcchDest, [Optional][Out] int* plDestLen);
+	unsafe HRESULT LockWStr ([In] int lSrcPos, [In] int lSrcLen, [In] int lFlags, [In] int cchRequest, [Optional][Out][NativeArrayInfo (CountParamIndex = 5)] PWSTR* ppszDest, [Optional][Out] int* pcchDest, [Optional][Out] int* plDestLen);
 
 	unsafe HRESULT UnlockWStr ([In][Const][NativeArrayInfo (CountParamIndex = 1)] PWSTR pszSrc, [In] int cchSrc, [Optional][Out] int* pcchActual, [Optional][Out] int* plActualLen);
 
@@ -131953,6 +132056,8 @@ public static class Apis
 
 	public const uint FACILITY_D2D = 2201u;
 
+	public const int D2DERR_UNSUPPORTED_PIXEL_FORMAT = -2003292288;
+
 	[DllImport ("d2d1.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows6.1")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/d2d1/nf-d2d1-d2d1createfactory")]
@@ -138058,7 +138163,7 @@ public interface ID2D1RenderTarget : ID2D1Resource
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-begindraw")]
 	void BeginDraw ();
 
-	[CanReturnErrorsAsSuccess]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/d2d1/nf-d2d1-id2d1rendertarget-enddraw")]
 	unsafe HRESULT EndDraw ([Optional][Out] ulong* tag1, [Optional][Out] ulong* tag2);
 
@@ -171936,6 +172041,12 @@ public static class Apis
 
 	public const uint D3DDEVINFOID_TEXTURING = 3u;
 
+	public const int D3D_OK = 0;
+
+	public const uint D3DENUMRET_CANCEL = 0u;
+
+	public const uint D3DENUMRET_OK = 1u;
+
 	[DllImport ("d3d9.dll", ExactSpelling = true, PreserveSig = false)]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/d3d9/nf-d3d9-direct3dcreate9")]
 	public static extern IDirect3D9 Direct3DCreate9 ([In] uint SDKVersion);
@@ -180659,6 +180770,18 @@ public static class Apis
 
 	public const uint DXAPI_HALVERSION = 1u;
 
+	public const int DD_OK = 0;
+
+	public const int DD_FALSE = 1;
+
+	public const int DDERR_GENERIC = -2147467259;
+
+	public const int DDERR_INVALIDPARAMS = -2147024809;
+
+	public const int DDERR_OUTOFMEMORY = -2147024882;
+
+	public const int DDERR_UNSUPPORTED = -2147467263;
+
 	[DllImport ("DDRAW.dll", ExactSpelling = true, PreserveSig = false)]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/ddraw/nf-ddraw-directdrawenumeratew")]
@@ -194659,7 +194782,7 @@ public interface IDWriteGdiInterop1 : IDWriteGdiInterop
 	unsafe HRESULT GetFontSignature ([In] IDWriteFont font, [Out] FONTSIGNATURE* fontSignature);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dwrite_3/nf-dwrite_3-idwritegdiinterop1-getmatchingfontsbylogfont")]
-	unsafe HRESULT GetMatchingFontsByLOGFONT ([In][Const] LOGFONTA* logFont, [In] IDWriteFontSet fontSet, [Out][ComOutPtr] IDWriteFontSet* filteredSet);
+	unsafe HRESULT GetMatchingFontsByLOGFONT ([In][Const] LOGFONTW* logFont, [In] IDWriteFontSet fontSet, [Out][ComOutPtr] IDWriteFontSet* filteredSet);
 }
 
 using System.Runtime.InteropServices;
@@ -195047,10 +195170,10 @@ namespace Windows.Win32.Graphics.DirectWrite;
 public interface IDWriteTextAnalysisSource : IUnknown
 {
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dwrite/nf-dwrite-idwritetextanalysissource-gettextatposition")]
-	unsafe HRESULT GetTextAtPosition ([In] uint textPosition, [Out][Const] ushort** textString, [Out] uint* textLength);
+	unsafe HRESULT GetTextAtPosition ([In] uint textPosition, [Out][Const][NativeArrayInfo (CountParamIndex = 2)] ushort** textString, [Out] uint* textLength);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dwrite/nf-dwrite-idwritetextanalysissource-gettextbeforeposition")]
-	unsafe HRESULT GetTextBeforePosition ([In] uint textPosition, [Out][Const] ushort** textString, [Out] uint* textLength);
+	unsafe HRESULT GetTextBeforePosition ([In] uint textPosition, [Out][Const][NativeArrayInfo (CountParamIndex = 2)] ushort** textString, [Out] uint* textLength);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dwrite/nf-dwrite-idwritetextanalysissource-getparagraphreadingdirection")]
 	DWRITE_READING_DIRECTION GetParagraphReadingDirection ();
@@ -198283,7 +198406,7 @@ namespace Windows.Win32.Graphics.Dxgi;
 [Agile]
 public interface IDXGIAdapter : IDXGIObject
 {
-	[CanReturnErrorsAsSuccess]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi/nf-dxgi-idxgiadapter-enumoutputs")]
 	unsafe HRESULT EnumOutputs ([In] uint Output, [Out][ComOutPtr] IDXGIOutput* ppOutput);
 
@@ -198440,7 +198563,7 @@ namespace Windows.Win32.Graphics.Dxgi;
 [Agile]
 public interface IDXGIDecodeSwapChain : IUnknown
 {
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi1_3/nf-dxgi1_3-idxgidecodeswapchain-presentbuffer")]
 	HRESULT PresentBuffer ([In] uint BufferToPresent, [In] uint SyncInterval, [In] DXGI_PRESENT Flags);
 
@@ -198627,7 +198750,7 @@ public interface IDXGIFactory : IDXGIObject
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi/nf-dxgi-idxgifactory-getwindowassociation")]
 	unsafe HRESULT GetWindowAssociation ([Out] HWND* pWindowHandle);
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi/nf-dxgi-idxgifactory-createswapchain")]
 	unsafe HRESULT CreateSwapChain ([In] IUnknown pDevice, [In] DXGI_SWAP_CHAIN_DESC* pDesc, [Out][ComOutPtr] IDXGISwapChain* ppSwapChain);
 
@@ -198647,7 +198770,7 @@ namespace Windows.Win32.Graphics.Dxgi;
 [Agile]
 public interface IDXGIFactory1 : IDXGIFactory
 {
-	[CanReturnErrorsAsSuccess]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi/nf-dxgi-idxgifactory1-enumadapters1")]
 	unsafe HRESULT EnumAdapters1 ([In] uint Adapter, [Out][ComOutPtr] IDXGIAdapter1* ppAdapter);
 
@@ -199325,7 +199448,7 @@ namespace Windows.Win32.Graphics.Dxgi;
 [Agile]
 public interface IDXGISwapChain : IDXGIDeviceSubObject
 {
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi/nf-dxgi-idxgiswapchain-present")]
 	HRESULT Present ([In] uint SyncInterval, [In] DXGI_PRESENT Flags);
 
@@ -199383,7 +199506,7 @@ public interface IDXGISwapChain1 : IDXGISwapChain
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgiswapchain1-getcorewindow")]
 	unsafe HRESULT GetCoreWindow ([In][Const] Guid* refiid, [Out][ComOutPtr] void** ppUnk);
 
-	[CanReturnMultipleSuccessValues]
+	[PreserveSig]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgiswapchain1-present1")]
 	unsafe HRESULT Present1 ([In] uint SyncInterval, [In] DXGI_PRESENT PresentFlags, [In][Const] DXGI_PRESENT_PARAMETERS* pPresentParameters);
 
@@ -201300,6 +201423,10 @@ public static class Apis
 
 	public const int E_EXCEPTIONINCOMPRESSION = 522;
 
+	public const uint DMPAPER_FIRST = 1u;
+
+	public const uint DMBIN_FIRST = 1u;
+
 	[DllImport ("GDI32.dll", ExactSpelling = true, PreserveSig = false)]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-getobjecta")]
@@ -207069,7 +207196,7 @@ namespace Windows.Win32.Graphics.Gdi;
 
 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
 [UnmanagedFunctionPointer (CallingConvention.Winapi)]
-public unsafe delegate uint LPFNDEVCAPS ([In] PSTR param0, [In] PSTR param1, [In] uint param2, [In] PSTR param3, [In][Out] DEVMODEA* param4);
+public unsafe delegate uint LPFNDEVCAPS ([In] PSTR param0, [In] PSTR param1, [In] uint param2, [In] PSTR param3, [In][Out] DEVMODEW* param4);
 
 using System.Runtime.InteropServices;
 using Windows.Win32.Foundation;
@@ -207078,7 +207205,7 @@ namespace Windows.Win32.Graphics.Gdi;
 
 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
 [UnmanagedFunctionPointer (CallingConvention.Winapi)]
-public unsafe delegate uint LPFNDEVMODE ([In] HWND param0, [In] HMODULE param1, [In][Out] DEVMODEA* param2, [In] PSTR param3, [In] PSTR param4, [In][Out] DEVMODEA* param5, [In] PSTR param6, [In] uint param7);
+public unsafe delegate uint LPFNDEVMODE ([In] HWND param0, [In] HMODULE param1, [In][Out] DEVMODEW* param2, [In] PSTR param3, [In] PSTR param4, [In][Out] DEVMODEW* param5, [In] PSTR param6, [In] uint param7);
 
 using Windows.Win32.Foundation.Metadata;
 
@@ -209352,7 +209479,7 @@ public static class Apis
 	public unsafe static extern Status GdipPathIterEnumerate ([In][Out] GpPathIterator* iterator, [Out] int* resultCount, [Out][NativeArrayInfo (CountParamIndex = 4)] PointF* points, [Out][NativeArrayInfo (CountParamIndex = 4)] byte* types, [In] int count);
 
 	[DllImport ("gdiplus.dll", ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern Status GdipPathIterCopyData ([In][Out] GpPathIterator* iterator, [Out] int* resultCount, [Out] PointF* points, [Out] byte* types, [In] int startIndex, [In] int endIndex);
+	public unsafe static extern Status GdipPathIterCopyData ([In][Out] GpPathIterator* iterator, [Out] int* resultCount, [Out][NativeArrayInfo (CountParamIndex = 1)] PointF* points, [Out][NativeArrayInfo (CountParamIndex = 1)] byte* types, [In] int startIndex, [In] int endIndex);
 
 	[DllImport ("gdiplus.dll", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern Status GdipCreateMatrix ([In][Out] Matrix** matrix);
@@ -222034,6 +222161,16 @@ public static class Apis
 
 	public const string XPS_FP_FAX_JOB_PROPERTIES = "JobFaxProperties";
 
+	public const string MXDC_IMAGEABLE_AREA_PROP_NAME_WSTR = "MxdcImageableArea";
+
+	public const string MXDC_IMAGE_COMPRESSION_TYPE_PROP_NAME_WSTR = "MxdcImageCompressionType";
+
+	public const string MXDC_DOTS_PER_INCH_PROP_NAME_WSTR = "MxdcDotsPerInch";
+
+	public const string MXDC_LANDSCAPE_ROTATION_PROP_NAME_WSTR = "MxdcLandscapeRotation";
+
+	public const string MXDC_PHYSICAL_PAPER_DIMENSIONS_NAME_WSTR = "MxdcPhysicalPaperDimensions";
+
 	[Documentation ("https://learn.microsoft.com/windows/win32/printdocs/mxdc-escape")]
 	public const uint MXDC_ESCAPE = 4122u;
 
@@ -224447,7 +224584,7 @@ public static class Apis
 	public static extern uint DeleteJobNamedProperty ([In] PRINTER_HANDLE hPrinter, [In] uint JobId, [In][Const] PWSTR pszName);
 
 	[DllImport ("winspool.drv", ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern uint EnumJobNamedProperties ([In] PRINTER_HANDLE hPrinter, [In] uint JobId, [Out] uint* pcProperties, [Out] PrintNamedProperty** ppProperties);
+	public unsafe static extern uint EnumJobNamedProperties ([In] PRINTER_HANDLE hPrinter, [In] uint JobId, [Out] uint* pcProperties, [Out][NativeArrayInfo (CountParamIndex = 2)] PrintNamedProperty** ppProperties);
 
 	[DllImport ("winspool.drv", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern HRESULT GetPrintOutputInfo ([In] HWND hWnd, [In][Const] PWSTR pszPrinter, [Out] HANDLE* phFile, [Out] PWSTR* ppszOutputFile);
@@ -224531,7 +224668,7 @@ public static class Apis
 	public static extern BOOL DeletePrinterIC ([In] HANDLE hPrinterIC);
 
 	[DllImport ("winspool.drv", ExactSpelling = true, PreserveSig = false)]
-	public unsafe static extern BOOL DevQueryPrint ([In] PRINTER_HANDLE hPrinter, [In] DEVMODEA* pDevMode, [Out] uint* pResID);
+	public unsafe static extern BOOL DevQueryPrint ([In] PRINTER_HANDLE hPrinter, [In] DEVMODEW* pDevMode, [Out] uint* pResID);
 
 	[DllImport ("SPOOLSS.dll", ExactSpelling = true, PreserveSig = false)]
 	public static extern HANDLE RevertToPrinterSelf ();
@@ -224910,11 +225047,11 @@ public struct COMPROPSHEETUI
 
 	public HINSTANCE hInstCaller;
 
-	public unsafe sbyte* pCallerName;
+	public unsafe ushort* pCallerName;
 
 	public UIntPtr UserData;
 
-	public unsafe sbyte* pHelpFile;
+	public unsafe ushort* pHelpFile;
 
 	public _CPSUICALLBACK pfnCallBack;
 
@@ -224928,7 +225065,7 @@ public struct COMPROPSHEETUI
 
 	public UIntPtr IconID;
 
-	public unsafe sbyte* pOptItemName;
+	public unsafe ushort* pOptItemName;
 
 	public ushort CallerVersion;
 
@@ -225001,7 +225138,7 @@ public struct CPSUICBPARAM
 		public int OldSel;
 
 		[FieldOffset (0)]
-		public unsafe sbyte* pOldSel;
+		public unsafe ushort* pOldSel;
 	}
 
 	public ushort cbSize;
@@ -225111,7 +225248,7 @@ public struct DEVICEPROPERTYHEADER
 
 	public HANDLE hPrinter;
 
-	public unsafe sbyte* pszPrinterName;
+	public unsafe ushort* pszPrinterName;
 }
 
 using Windows.Win32.Foundation;
@@ -225129,7 +225266,7 @@ public struct DEVQUERYPRINT_INFO
 
 	public HANDLE hPrinter;
 
-	public unsafe DEVMODEA* pDevMode;
+	public unsafe DEVMODEW* pDevMode;
 
 	public PWSTR pszErrorStr;
 
@@ -225165,7 +225302,7 @@ public struct DLGPAGE
 
 	public DLGPROC DlgProc;
 
-	public unsafe sbyte* pTabName;
+	public unsafe ushort* pTabName;
 
 	public UIntPtr IconID;
 
@@ -225233,11 +225370,11 @@ public struct DOCUMENTPROPERTYHEADER
 
 	public HANDLE hPrinter;
 
-	public unsafe sbyte* pszPrinterName;
+	public unsafe ushort* pszPrinterName;
 
-	public unsafe DEVMODEA* pdmIn;
+	public unsafe DEVMODEW* pdmIn;
 
-	public unsafe DEVMODEA* pdmOut;
+	public unsafe DEVMODEW* pdmOut;
 
 	public uint cbOut;
 
@@ -225358,11 +225495,11 @@ namespace Windows.Win32.Graphics.Printing;
 
 public struct DOC_INFO_INTERNAL
 {
-	public unsafe sbyte* pDocName;
+	public unsafe ushort* pDocName;
 
-	public unsafe sbyte* pOutputFile;
+	public unsafe ushort* pOutputFile;
 
-	public unsafe sbyte* pDatatype;
+	public unsafe ushort* pDatatype;
 
 	public BOOL bLowILJob;
 
@@ -225829,40 +225966,40 @@ namespace Windows.Win32.Graphics.Printing;
 
 public struct DRIVER_UPGRADE_INFO_1
 {
-	public unsafe sbyte* pPrinterName;
+	public unsafe ushort* pPrinterName;
 
-	public unsafe sbyte* pOldDriverDirectory;
+	public unsafe ushort* pOldDriverDirectory;
 }
 
 namespace Windows.Win32.Graphics.Printing;
 
 public struct DRIVER_UPGRADE_INFO_2
 {
-	public unsafe sbyte* pPrinterName;
+	public unsafe ushort* pPrinterName;
 
-	public unsafe sbyte* pOldDriverDirectory;
+	public unsafe ushort* pOldDriverDirectory;
 
 	public uint cVersion;
 
-	public unsafe sbyte* pName;
+	public unsafe ushort* pName;
 
-	public unsafe sbyte* pEnvironment;
+	public unsafe ushort* pEnvironment;
 
-	public unsafe sbyte* pDriverPath;
+	public unsafe ushort* pDriverPath;
 
-	public unsafe sbyte* pDataFile;
+	public unsafe ushort* pDataFile;
 
-	public unsafe sbyte* pConfigFile;
+	public unsafe ushort* pConfigFile;
 
-	public unsafe sbyte* pHelpFile;
+	public unsafe ushort* pHelpFile;
 
-	public unsafe sbyte* pDependentFiles;
+	public unsafe ushort* pDependentFiles;
 
-	public unsafe sbyte* pMonitorName;
+	public unsafe ushort* pMonitorName;
 
-	public unsafe sbyte* pDefaultDataType;
+	public unsafe ushort* pDefaultDataType;
 
-	public unsafe sbyte* pszzPreviousNames;
+	public unsafe ushort* pszzPreviousNames;
 }
 
 namespace Windows.Win32.Graphics.Printing;
@@ -225962,11 +226099,11 @@ public struct EXTCHKBOX
 
 	public ushort Flags;
 
-	public unsafe sbyte* pTitle;
+	public unsafe ushort* pTitle;
 
-	public unsafe sbyte* pSeparator;
+	public unsafe ushort* pSeparator;
 
-	public unsafe sbyte* pCheckedName;
+	public unsafe ushort* pCheckedName;
 
 	public UIntPtr IconID;
 
@@ -226010,7 +226147,7 @@ public struct EXTPUSH
 
 	public ushort Flags;
 
-	public unsafe sbyte* pTitle;
+	public unsafe ushort* pTitle;
 
 	public _Anonymous1_e__Union Anonymous1;
 
@@ -226712,7 +226849,7 @@ namespace Windows.Win32.Graphics.Printing;
 public interface IPrintAsyncNotifyDataObject : IUnknown
 {
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/prnasnot/nf-prnasnot-iprintasyncnotifydataobject-acquiredata")]
-	unsafe HRESULT AcquireData ([Optional][Out] byte** ppNotificationData, [Optional][Out] uint* pSize, [Optional][Out] Guid** ppSchema);
+	unsafe HRESULT AcquireData ([Optional][Out][NativeArrayInfo (CountParamIndex = 1)] byte** ppNotificationData, [Optional][Out] uint* pSize, [Optional][Out] Guid** ppSchema);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/prnasnot/nf-prnasnot-iprintasyncnotifydataobject-releasedata")]
 	HRESULT ReleaseData ();
@@ -226784,17 +226921,17 @@ namespace Windows.Win32.Graphics.Printing;
 [Windows.Win32.Foundation.Metadata.Guid (2828977470u, 14597, 18886, 156, 26, 192, 168, 129, 23, 253, 182)]
 public interface IPrintCoreHelper : IUnknown
 {
-	unsafe HRESULT GetOption ([Optional][In][Const][MemorySize (BytesParamIndex = 1)] DEVMODEA* pDevmode, [In] uint cbSize, [In][Const] PSTR pszFeatureRequested, [Out][Const] PSTR* ppszOption);
+	unsafe HRESULT GetOption ([Optional][In][Const][MemorySize (BytesParamIndex = 1)] DEVMODEW* pDevmode, [In] uint cbSize, [In][Const] PSTR pszFeatureRequested, [Out][Const] PSTR* ppszOption);
 
-	unsafe HRESULT SetOptions ([In][Out] DEVMODEA* pDevmode, [In] uint cbSize, [In] BOOL bResolveConflicts, [In][Const] PRINT_FEATURE_OPTION* pFOPairs, [In] uint cPairs, [In][Out] uint* pcPairsWritten, [In][Out] uint* pdwResult);
+	unsafe HRESULT SetOptions ([In][Out] DEVMODEW* pDevmode, [In] uint cbSize, [In] BOOL bResolveConflicts, [In][Const] PRINT_FEATURE_OPTION* pFOPairs, [In] uint cPairs, [In][Out] uint* pcPairsWritten, [In][Out] uint* pdwResult);
 
-	unsafe HRESULT EnumConstrainedOptions ([In][Const] DEVMODEA* pDevmode, [In] uint cbSize, [In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR*** pConstrainedOptionList, [In][Out] uint* pdwNumOptions);
+	unsafe HRESULT EnumConstrainedOptions ([In][Const] DEVMODEW* pDevmode, [In] uint cbSize, [In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR*** pConstrainedOptionList, [In][Out] uint* pdwNumOptions);
 
-	unsafe HRESULT WhyConstrained ([Optional][In][Const][MemorySize (BytesParamIndex = 1)] DEVMODEA* pDevmode, [In] uint cbSize, [In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR pszOptionKeyword, [Out][Const] PRINT_FEATURE_OPTION** ppFOConstraints, [Out] uint* pdwNumOptions);
+	unsafe HRESULT WhyConstrained ([Optional][In][Const][MemorySize (BytesParamIndex = 1)] DEVMODEW* pDevmode, [In] uint cbSize, [In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR pszOptionKeyword, [Out][Const][NativeArrayInfo (CountParamIndex = 5)] PRINT_FEATURE_OPTION** ppFOConstraints, [Out] uint* pdwNumOptions);
 
-	unsafe HRESULT EnumFeatures ([Out][Const] PSTR*** pFeatureList, [Out] uint* pdwNumFeatures);
+	unsafe HRESULT EnumFeatures ([Out][Const][NativeArrayInfo (CountParamIndex = 1)] PSTR*** pFeatureList, [Out] uint* pdwNumFeatures);
 
-	unsafe HRESULT EnumOptions ([In][Const] PSTR pszFeatureKeyword, [Out][Const] PSTR*** pOptionList, [Out] uint* pdwNumOptions);
+	unsafe HRESULT EnumOptions ([In][Const] PSTR pszFeatureKeyword, [Out][Const][NativeArrayInfo (CountParamIndex = 2)] PSTR*** pOptionList, [Out] uint* pdwNumOptions);
 
 	unsafe HRESULT GetFontSubstitution ([In][Const] PWSTR pszTrueTypeFontName, [In][Const] PWSTR* ppszDevFontName);
 
@@ -226812,11 +226949,11 @@ namespace Windows.Win32.Graphics.Printing;
 [Windows.Win32.Foundation.Metadata.Guid (3267448687u, 38355, 19811, 150, 207, 107, 217, 230, 201, 7, 194)]
 public interface IPrintCoreHelperPS : IPrintCoreHelper
 {
-	unsafe HRESULT GetGlobalAttribute ([In][Const] PSTR pszAttribute, [Out] uint* pdwDataType, [Out] byte** ppbData, [Out] uint* pcbSize);
+	unsafe HRESULT GetGlobalAttribute ([In][Const] PSTR pszAttribute, [Out] uint* pdwDataType, [Out][NativeArrayInfo (CountParamIndex = 3)] byte** ppbData, [Out] uint* pcbSize);
 
-	unsafe HRESULT GetFeatureAttribute ([In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR pszAttribute, [Out] uint* pdwDataType, [Out] byte** ppbData, [Out] uint* pcbSize);
+	unsafe HRESULT GetFeatureAttribute ([In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR pszAttribute, [Out] uint* pdwDataType, [Out][NativeArrayInfo (CountParamIndex = 4)] byte** ppbData, [Out] uint* pcbSize);
 
-	unsafe HRESULT GetOptionAttribute ([In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR pszOptionKeyword, [Optional][In][Const] PSTR pszAttribute, [Out] uint* pdwDataType, [Out] byte** ppbData, [Out] uint* pcbSize);
+	unsafe HRESULT GetOptionAttribute ([In][Const] PSTR pszFeatureKeyword, [In][Const] PSTR pszOptionKeyword, [Optional][In][Const] PSTR pszAttribute, [Out] uint* pdwDataType, [Out][NativeArrayInfo (CountParamIndex = 5)] byte** ppbData, [Out] uint* pcbSize);
 }
 
 using System.Runtime.InteropServices;
@@ -226830,7 +226967,7 @@ namespace Windows.Win32.Graphics.Printing;
 [Windows.Win32.Foundation.Metadata.Guid (2123256278u, 58862, 17446, 129, 123, 149, 139, 148, 68, 235, 121)]
 public interface IPrintCoreHelperUni : IPrintCoreHelper
 {
-	unsafe HRESULT CreateGDLSnapshot ([In][Out] DEVMODEA* pDevmode, [In] uint cbSize, [In] uint dwFlags, [Out] IStream* ppSnapshotStream);
+	unsafe HRESULT CreateGDLSnapshot ([In][Out] DEVMODEW* pDevmode, [In] uint cbSize, [In] uint dwFlags, [Out] IStream* ppSnapshotStream);
 
 	unsafe HRESULT CreateDefaultGDLSnapshot ([In] uint dwFlags, [Out] IStream* ppSnapshotStream);
 }
@@ -226845,7 +226982,7 @@ namespace Windows.Win32.Graphics.Printing;
 [Windows.Win32.Foundation.Metadata.Guid (1821048316u, 60112, 19757, 128, 113, 155, 240, 23, 90, 108, 58)]
 public interface IPrintCoreHelperUni2 : IPrintCoreHelperUni
 {
-	unsafe HRESULT GetNamedCommand ([Optional][In][MemorySize (BytesParamIndex = 1)] DEVMODEA* pDevmode, [In] uint cbSize, [In][Const] PWSTR pszCommandName, [Out] byte** ppCommandBytes, [Out] uint* pcbCommandSize);
+	unsafe HRESULT GetNamedCommand ([Optional][In][MemorySize (BytesParamIndex = 1)] DEVMODEW* pDevmode, [In] uint cbSize, [In][Const] PWSTR pszCommandName, [Out] byte** ppCommandBytes, [Out] uint* pcbCommandSize);
 }
 
 using System.Runtime.InteropServices;
@@ -226981,10 +227118,10 @@ public interface IPrintOemUI : IPrintOemCommon
 
 	unsafe HRESULT DevicePropertySheets ([In] PROPSHEETUI_INFO* pPSUIInfo, [In] LPARAM lParam);
 
-	unsafe HRESULT DevQueryPrintEx ([In] OEMUIOBJ* poemuiobj, [In] DEVQUERYPRINT_INFO* pDQPInfo, [In] DEVMODEA* pPublicDM, [In] void* pOEMDM);
+	unsafe HRESULT DevQueryPrintEx ([In] OEMUIOBJ* poemuiobj, [In] DEVQUERYPRINT_INFO* pDQPInfo, [In] DEVMODEW* pPublicDM, [In] void* pOEMDM);
 
-	[Ansi]
-	unsafe HRESULT DeviceCapabilitiesA ([In][Out] OEMUIOBJ* poemuiobj, [In] HANDLE hPrinter, [In] PWSTR pDeviceName, [In] ushort wCapability, [Out] void* pOutput, [In] DEVMODEA* pPublicDM, [In] void* pOEMDM, [In] uint dwOld, [Out] uint* dwResult);
+	[Unicode]
+	unsafe HRESULT DeviceCapabilitiesA ([In][Out] OEMUIOBJ* poemuiobj, [In] HANDLE hPrinter, [In] PWSTR pDeviceName, [In] ushort wCapability, [Out] void* pOutput, [In] DEVMODEW* pPublicDM, [In] void* pOEMDM, [In] uint dwOld, [Out] uint* dwResult);
 
 	unsafe HRESULT UpgradePrinter ([In] uint dwLevel, [In] byte* pDriverUpgradeInfo);
 
@@ -226992,7 +227129,7 @@ public interface IPrintOemUI : IPrintOemCommon
 
 	unsafe HRESULT DriverEvent ([In] uint dwDriverEvent, [In] uint dwLevel, [In] byte* pDriverInfo, [In] LPARAM lParam);
 
-	unsafe HRESULT QueryColorProfile ([In] PRINTER_HANDLE hPrinter, [In] OEMUIOBJ* poemuiobj, [In] DEVMODEA* pPublicDM, [In] void* pOEMDM, [In] uint ulQueryMode, [Out][NativeArrayInfo (CountParamIndex = 6)] void* pvProfileData, [In][Out] uint* pcbProfileData, [Out] uint* pflProfileData);
+	unsafe HRESULT QueryColorProfile ([In] PRINTER_HANDLE hPrinter, [In] OEMUIOBJ* poemuiobj, [In] DEVMODEW* pPublicDM, [In] void* pOEMDM, [In] uint ulQueryMode, [Out][NativeArrayInfo (CountParamIndex = 6)] void* pvProfileData, [In][Out] uint* pcbProfileData, [Out] uint* pflProfileData);
 
 	HRESULT FontInstallerDlgProc ([In] HWND hWnd, [In] uint usMsg, [In] WPARAM wParam, [In] LPARAM lParam);
 
@@ -227009,7 +227146,7 @@ namespace Windows.Win32.Graphics.Printing;
 [Windows.Win32.Foundation.Metadata.Guid (690296313u, 46411, 18587, 146, 117, 186, 181, 104, 33, 57, 94)]
 public interface IPrintOemUI2 : IPrintOemUI
 {
-	unsafe HRESULT QueryJobAttributes ([In] PRINTER_HANDLE hPrinter, [In] DEVMODEA* pDevmode, [In] uint dwLevel, [In] byte* lpAttributeInfo);
+	unsafe HRESULT QueryJobAttributes ([In] PRINTER_HANDLE hPrinter, [In] DEVMODEW* pDevmode, [In] uint dwLevel, [In] byte* lpAttributeInfo);
 
 	HRESULT HideStandardUI ([In] uint dwMode);
 
@@ -227027,11 +227164,11 @@ namespace Windows.Win32.Graphics.Printing;
 [Windows.Win32.Foundation.Metadata.Guid (1934219045u, 58049, 19914, 175, 181, 193, 62, 145, 188, 147, 6)]
 public interface IPrintOemUIMXDC : IUnknown
 {
-	unsafe HRESULT AdjustImageableArea ([In] PRINTER_HANDLE hPrinter, [In] uint cbDevMode, [In][Const] DEVMODEA* pDevMode, [In] uint cbOEMDM, [In][Const] void* pOEMDM, [In][Out] RECTL* prclImageableArea);
+	unsafe HRESULT AdjustImageableArea ([In] PRINTER_HANDLE hPrinter, [In] uint cbDevMode, [In][Const] DEVMODEW* pDevMode, [In] uint cbOEMDM, [In][Const] void* pOEMDM, [In][Out] RECTL* prclImageableArea);
 
-	unsafe HRESULT AdjustImageCompression ([In] PRINTER_HANDLE hPrinter, [In] uint cbDevMode, [In][Const] DEVMODEA* pDevMode, [In] uint cbOEMDM, [In][Const] void* pOEMDM, [In][Out] int* pCompressionMode);
+	unsafe HRESULT AdjustImageCompression ([In] PRINTER_HANDLE hPrinter, [In] uint cbDevMode, [In][Const] DEVMODEW* pDevMode, [In] uint cbOEMDM, [In][Const] void* pOEMDM, [In][Out] int* pCompressionMode);
 
-	unsafe HRESULT AdjustDPI ([In] PRINTER_HANDLE hPrinter, [In] uint cbDevMode, [In][Const] DEVMODEA* pDevMode, [In] uint cbOEMDM, [In][Const] void* pOEMDM, [In][Out] int* pDPI);
+	unsafe HRESULT AdjustDPI ([In] PRINTER_HANDLE hPrinter, [In] uint cbDevMode, [In][Const] DEVMODEW* pDevMode, [In] uint cbOEMDM, [In][Const] void* pOEMDM, [In][Out] int* pDPI);
 }
 
 using System.Runtime.InteropServices;
@@ -227473,9 +227610,9 @@ public interface IPrintTicketProvider : IUnknown
 
 	unsafe HRESULT QueryDeviceNamespace ([In][Out] BSTR* pDefaultNamespace);
 
-	unsafe HRESULT ConvertPrintTicketToDevMode ([In] IXMLDOMDocument2 pPrintTicket, [In] uint cbDevmodeIn, [In][Out] DEVMODEA* pDevmodeIn, [In][Out] uint* pcbDevmodeOut, [In][Out] DEVMODEA** ppDevmodeOut);
+	unsafe HRESULT ConvertPrintTicketToDevMode ([In] IXMLDOMDocument2 pPrintTicket, [In] uint cbDevmodeIn, [In][Out] DEVMODEW* pDevmodeIn, [In][Out] uint* pcbDevmodeOut, [In][Out] DEVMODEW** ppDevmodeOut);
 
-	unsafe HRESULT ConvertDevModeToPrintTicket ([In] uint cbDevmode, [In][Out] DEVMODEA* pDevmode, [In] IXMLDOMDocument2 pPrintTicket);
+	unsafe HRESULT ConvertDevModeToPrintTicket ([In] uint cbDevmode, [In][Out] DEVMODEW* pDevmode, [In] IXMLDOMDocument2 pPrintTicket);
 
 	unsafe HRESULT GetPrintCapabilities ([In] IXMLDOMDocument2 pPrintTicket, [Out] IXMLDOMDocument2* ppCapabilities);
 
@@ -228883,7 +229020,7 @@ public struct OEMCUIPPARAM
 
 	public HANDLE hOEMHeap;
 
-	public unsafe DEVMODEA* pPublicDM;
+	public unsafe DEVMODEW* pPublicDM;
 
 	public unsafe void* pOEMDM;
 
@@ -228919,9 +229056,9 @@ public struct OEMDMPARAM
 
 	public HANDLE hModule;
 
-	public unsafe DEVMODEA* pPublicDMIn;
+	public unsafe DEVMODEW* pPublicDMIn;
 
-	public unsafe DEVMODEA* pPublicDMOut;
+	public unsafe DEVMODEW* pPublicDMOut;
 
 	public unsafe void* pOEMDMIn;
 
@@ -228993,7 +229130,7 @@ public struct OEMUIPSPARAM
 
 	public HANDLE hOEMHeap;
 
-	public unsafe DEVMODEA* pPublicDM;
+	public unsafe DEVMODEW* pPublicDM;
 
 	public unsafe void* pOEMDM;
 
@@ -2290

Diff truncated to fit this comment. Download the complete api-diff.patch from the api-diff artifact.

This comment is automatically updated on each push.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve existing semantic RetVal attributes during SAL lowering, including qualified and Attribute-suffixed spellings. Add native COM, BSTR, callback and function final-winmd controls across all architectures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Emit HASTHIS for instance constructors so local attribute constructor definitions match their references. Strengthen native final-winmd signature binding and add a complete-SDK constructor invariant without changing static PInvoke signatures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep native signatures when logical enum associations are present instead of guessing an unrelated same-short-name type. Cover scalar, pointer and array fields, parameters, and returns through final winmd emission on all three architectures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pass prior cross-partition discoveries separately from authored settings. Keep legacy cache behavior below manual overrides while annotated translation units use their own discoveries. Clear obsolete per-translation-unit discovery output and cover first, repeated, and opt-in-transition builds through actual SDK targets and final winmd signatures on x86, x64, and ARM64.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use only authored remaps and exclusions for AST discovery while retaining derived settings for legacy binding generation. Verify stable per-partition sidecars, emitted pointer-reduction response files, and frozen-nonselected plus selected reduction inputs across repeated SDK-target builds on x86, x64, and ARM64.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use canonical Win32 SupportedOS macros, resolve header-local nested defaults and explicit overrides, and preserve native typedef and callback aliases. Lower native field-count SAL through CountFieldName without inventing parameter indices or changing existing parameter lowering. Cover real x86, x64 and ARM64 winmd output, native ABI and strict conflicts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep SupportedOS scope adoption independent of SDK-wide native field SAL activation. Restrict inferred field counts to pointer and array shapes, preserve default behavior, and cover enabled and disabled native emission on all three architectures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Recognize enum-member postfix annotations and const-qualified variable targets. Project each fact onto its exact emitted field without raising sibling or enum floors, while preserving strict placement and target diagnostics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use metadata-only enum groups, native lexical availability scopes, typed import arguments and unevaluated cleanup references. Keep ignored metadata diagnostics local and preserve native SDK warning behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jevansaks

Copy link
Copy Markdown
Member Author

Qualified current tooling source 746d812dd15a93d77b24285708fd51727b293bba against the actual downloaded image from CI 38966888753. All five workflow-dispatch jobs pass, including all three architecture scrapes and build/test/package. The producer is this exact SHA, not a synthetic PR merge.

Downloaded image SHA256: AFF73919F08390D898C151B530CDBC5773363477C89CE0D68FE9418BC4DE6800.

Independent comparison against the previously qualified 7ea6c85d CI image (6539A79223A5ADDA3A04164DC88B57A49F4F616C5A7E232D2F519D981030B706):

dotnet WinmdUtils.dll compare --first old.winmd --second new.winmd
No unknown differences found.
Exit code: 0

Zero API differences; no known-differences file or normalization. This is incremental equivalence to the last qualified tooling source, not a claim that the earlier reviewed Printing changes vanish relative to main. Workflow-dispatch runs skip the PR-only automatic diff steps, so the comparison was performed independently on both downloaded images.

This clears the tooling/default-image gate only. The updated pilot #2365 still needs its own source-bound image, original-IDL preparation/provenance and current-head CI qualification. Full-SDK migration remains paused.

Jevan Saks (jevansaks) and others added 13 commits October 16, 2026 16:42
Move Clang encoding, diagnostics, IDL preparation and pipeline notes behind the public annotation contract. Explain the local ignored-attribute diagnostic guard without changing the qualified helper.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Leave the SDK transport as plain annotate and supply local ignored-attribute checking through the scraper invocation. Reject global warning suppression only in annotation mode. Clarify the complete annotation mode, existing remap-cache isolation, and actual MIDL transport limits; add physical type/member and compiler-policy regressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve native RPC and SAL while binding metadata to the actual interface method, without reading source tokens or reparsing expressions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the repository-backed sample aligned with packaged SDK assets without adding the recompiled SDK header tree to its include path. Document missing-original-IDL residual handling and bootstrap asset coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Combine compatible original-AST and cross-partition logical groups without absorbing native or legacy enum definitions. Preserve explicit conflicts, architecture variants, namespace routing, and residual use-site facts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bind conversions to actual header-group symbols after namespace and architecture processing. Retain declared scalar storage, constant overflow diagnostics, native-enum errors, and the separate full-image source-admission gates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Retain the new file-local default contract and its acceptance gates alongside the qualified IDL guidance. Distinguish the current Clang transport from the unimplemented default resolver. Import the upstream workflow regression coverage without changing production tooling or generation inputs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the generated patch unchanged in both artifact uploads, and truncate only the rendered PR comment while retaining full-diff statistics and budgeting for Markdown fences and the artifact notice.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c22b7dbd-d44e-4340-b66c-04ca2520967a
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3bc8894e-bedd-45c6-8231-cad0a275dc8f
…ers (#2376)

Annotate 25 producer out-parameters with the cleanup function that releases
the handle they return, and mark 0 as the invalid value for the 8 handle
typedefs that had no invalid value.

The annotations go on the producers. Typedefs such as PHIDP_PREPARSED_DATA
also describe caller-allocated buffers that the cleanup function must not
free, so the typedefs carry no RAIIFree.

Fixes #2375

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 62a90e5b-2b4b-46ac-b2e3-4a42da4989fc
* Update Windows SDK to 10.0.28000.2705

Use current shipped headers, add DXGI 1.7 and CXL/MTM coverage, and remove retired SDK inputs. Preserve architecture-specific Hyper-V enums and WinHTTP callback identity, fix MTM IOCTL extraction and WebAuthn imports, and make integrity checks and API dumps architecture-aware.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1a5db4f3-9b9e-4621-a599-c5578cee0cac

* Preserve SDK compatibility and narrow required tooling fixes

Restore existing AllJoyn, Peer and OPMXbox inputs and DLL mappings.
Keep only the enum-emission and architecture-validator fixes reproduced
with the current SDK and otherwise unchanged tools. Drop optional MTM
projection and review-only API-dumper changes. Preserve the WinHTTP
callback's canonical identity on every architecture.

Verify fresh SDK ingestion, all 114 .NET and 36 workflow tests, native
and managed samples, and the preserved legacy API surface.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1a5db4f3-9b9e-4621-a599-c5578cee0cac

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1a5db4f3-9b9e-4621-a599-c5578cee0cac
dependabot Bot and others added 4 commits October 20, 2026 21:10
Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 10.0.303 to 10.0.402.
- [Release notes](https://github.com/dotnet/sdk/releases)
- [Commits](dotnet/sdk@v10.0.303...v10.0.402)

---
updated-dependencies:
- dependency-name: dotnet-sdk
  dependency-version: 10.0.402
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Reconcile upstream architecture-specific enum handling with the published annotation-aware merger. Preserve nested annotated enums and keep SDK-header annotation parsing opt-in.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Include the existing C# source-to-WinMD emitter suite in DoTests.ps1 with standard native error handling, and document the ordinary test runner. No Python SDK coverage utility is present in this tooling slice.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Integrate generic tooling from 42d80ee
and the bounded e390efb..ea28976 compatibility delta. Preserve the current
SDK, upstream native-enum behavior, and production legacy inputs.

Keep header preparation optional without a recipe and fail explicitly for
missing selected recipes. Keep annotation parsing opt-in and native constant
evaluation off by default on the legacy path. Include the coverage auditor
in the ordinary runner and retain all six always-on performance guards.

Keep API header/IDL patches, recipe pins, and sidecar retirement in the
separate header layer. Reconcile namespace routing, selected-SDK MIDL test
fixtures, and patch-data-only assertions without importing migration data.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Jevan Saks (jevansaks) and others added 13 commits October 23, 2026 19:27
Retain legacy manual parse recovery, compose explicit manual forwards with generated definitions, and restore retained enum-bag ownership before expression binding. Keep generated-source errors, semantic initializer errors, complete-empty records, and native ambiguity guards strict.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Honor native enum ownership for recorded ConstantsScraper copies without displacing local bindings or header-group ownership. Coalesce legacy typedef-reversion projections only with their exact compatible routed manual provider, preserving documentation and rejecting conflicting storage, bindings and ABI attributes. Defer the unintended SEC_WINNT_AUTH_IDENTITY route to restore established Rpc ownership.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Ship MetadataUtils and its declared managed runtime dependencies beside the
packaged scraper. Cover the SDK manifest against the scraper dependency graph
so in-repository builds cannot hide a broken standalone package deployment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Keep failed prerequisite scrapes strict without trying to load repository-local
actions before checkout. Preserve diagnostics after later build/test failures
and cover skipped/failed/cancelled checkout and documentation-only execution.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Define UNICODE in production SDK response settings, retain explicit ANSI contexts and A/W declarations, and keep preprocessing cursors out of legacy native-evaluation binding generation. Cover original parsing, native values, physical WinMD and A/W ABI on all three targets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Preserve native identities and existing no-rename rules in both binding passes. Prove exact canonical native alias ownership before marking legacy typedef-reversion names intentional; keep other diagnostics strict.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Keep the preparation warning stream in archived provenance and expose one IncludeRoot on standard output without disabling native error recognition. Add three-architecture transport and strict failure controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Carry source-only retained/header origin proofs through emitter composition, reject unproven pointer overlaps, and bind authored SDK path tests to the selected recipe version.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Keep Unicode authoritative while recovering only compiler-proven, import-mapped native declarations. Validate recursive native contracts, preserve exact existing scoped remap intent, and retain fresh SDK and physical-image proof.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Keep authored member names authoritative while projecting otherwise unconfigured macro-selected members at their exact compiler-proven source identity. Preserve primary Unicode signatures and encoding facts. Compose explicitly retained opaque struct-pointer factories only with fresh matching native and retained intent, without losing real extra parameter indirection. Honor existing complete explicit alias projections in remap discovery.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Add valueless EnumDecl-only metadata Flags without native diagnostic or storage changes. Preserve the original recompiled mirror's input and output spellings in strict MIDL preparation, with physical enum and closed-preparation controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Compile native owner headers independently and retain invalid-original
aggregate diagnostics. Classify only compiler-linked annotated self
typedefs, preserve raw multiplicities, and report every owner difference.

Replace stale all-retired and no-Hlsl assertions with the complete
inherited eight-record/import snapshot and exact 436 retired identities.
Keep actual VDS SAL failures and original-IDL coverage holds substantive.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Restore the original recompiled mirror parameter directions and size/length contracts instead of bypassing remote declarations. Preserve authored SAL/metadata payloads and existing local pointer behavior. Keep native MIDL2495 warnings and closed input/output provenance visible; helper changes require fresh strict preparation identities.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Jevan Saks (jevansaks) added a commit that referenced this pull request Oct 24, 2026
Inherit exact 2b750f6 from tooling PR #2363 while preserving the reviewed SDK28000 data, strict preparation inputs and native stack lineage. Fresh producers and image qualification remain separate gates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Batch up to 4096 native constant probes per translation-unit parse while
retaining recursive diagnostic isolation and the existing extraction rules.

Keep the timed native-integer guard genuinely cross-batch with 8193 integer
macros and its unchanged 3000 ms budget. Cover recursive header diagnostics,
malformed and unsupported macros, and retained facts on all three targets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Retain exact native identities and compiler provenance when constants are
owned by logical header groups, ordinary source enums, or projected fields.
Keep native scalar dependency storage independent of projected group storage
and preserve independent legacy expressions and ordinary default behavior.

Include the qualified generic typedef and function-pointer lowering repairs,
constant-selection transport, diagnostics, regression coverage, and spec
updates. Do not import SDK migration patches or the held EnumStorage work.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Match the published forward-only void-pointer storage contract while retaining
complete and empty record checks, exact pointer signatures and API alias identity.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Read supported simple macro values with the existing constants scanner.
Evaluate unresolved value expressions in an isolated Clang translation unit,
without probing structural or declaration fragments. Preserve native target
storage, active definitions, aliases, ownership and diagnostic provenance.

Require every planned root probe and compiler-backed type-operand ownership.
Keep rejected UUID operands explicit and reject unrelated escaped declarations.
Retain semantic provider discovery while sharing generated syntax roots and
counting immutable native diagnostics once. Add opt-in generation timing and
targeted route, containment, dependency and public-output controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Avoid semantic provider queries for reserved predefined C# types and their
pointer/array wrappers. Keep named types, aliases, inferred types and custom
pointees compiler-bound, and retain original immutable bindings for projection
validation. Scope companion member ownership before qualified-name work and
reuse native file/name materialization without changing capture or parsing.

Add work-count and custom-pointee controls. The actual default-output census
avoids 791242 of 1615689 provider queries; this is not a timing acceptance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Share native cursor identities and resolve selected managed declaration paths
without eagerly constructing the complete ClangSharp child graph. Preserve
native recovery, dependency validation, traversal order, canonical storage
checks, and the full semantic provider analysis.

Split the header-annotation WinMD tests into independent concrete classes
over a test-free abstract helper so xUnit can schedule the existing cases
concurrently. Preserve existing test bodies and opt-in coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Replace the expanded native integration matrix with synthetic-header contract
batches that share scraper inputs and physical metadata emissions. Remove the
superseded migration and per-case native fixtures, and update the structural
guard for the batched suite.

Keep the ordinary test runner's project arguments, order and error handling.
Add built-in detailed console and suite-specific TRX logging under bin\logs.
No production scraper/emitter, SDK inputs, workflow or timeout is changed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Bind retained native facts to the recorded prepared SDK payload and source
identity before accepting direct or relocated headers. Preserve independent
validation failures across native, constants and managed generation without
authorizing incomplete output or legacy fallback for invalid inputs.

Validate producer receipts before transformation, continue later independent
proof checks in rejected inputs, and keep successful legacy receipts valid.
Compare constant types and literal payloads independently in WinmdUtils.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26213770-7ef5-40d1-b93c-93707612f5ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant