Skip to content

Integrate bounded SDK header-annotation migrations - #2367

Closed
Jevan Saks (jevansaks) wants to merge 18 commits into
jevansaks-winhttp-header-annotationsfrom
jevansaks-next-header-annotation-wave
Closed

Jevan Saks (jevansaks) wants to merge 18 commits into
jevansaks-winhttp-header-annotationsfrom
jevansaks-next-header-annotation-wave

Conversation

@jevansaks

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

Copy link
Copy Markdown
Member

Current review checkpoint

Review head: 9a1fd6f8526403ae3dff806c7345bd82a38c382a. Local combined-image qualification is complete. Final-head CI and downloaded actual-artifact qualification are pending in PR Validation 38855993461; the earlier ten-owner CI result is historical, not acceptance of this head.

This remains the same draft above #2365, in native stack #2366 [2363,2365,2367], ultimate base main. Only this owning branch was ordinary-pushed. No lower branch, stack membership, draft state, merge setting or consumer was changed.

Bounded integration scope

The original SecurityCenter/WinSat, Wcm/InputRadial/WinContacts/WinLocation and Rdc/Nla/Com.CallObj/Com.Events checkpoints are retained: 82 OS floors, one association and one success-value contract relocated through 11 patches. Their 68 native MIDL RetValAttribute additions remain exact; raw CLI ParameterAttributes.Retval stays false, and native signatures/Out flags are unchanged. The separately approved IEnumEventObject.Reset representation retains its single PreserveSig change.

Subsequently authorized, exact payloads are serially integrated for Network, Device, System, Wcn/Cabinets/MdmReg/WebDav, Tbs/FileHistory/Antimalware/WebSock, RstMgr and Proc_Snap/Monitor/IdentityProvider. Private tooling merges were not used as adoption bases. The combined recipe has 63 patches / 54 partition inputs; these are structural counts, not accepted semantic-fact totals. Reserved future workers' owners are not included merely because they were allocated.

Ordinary inheritance is pinned to qualified #2365 c5879a778bfbf0463e3c96beadab4b2d56658ffe / root 43af342a3dd63803bf12a7c834cd0fd516df74ab. Separately qualified root 7ea6c85d is not silently inherited. Existing generic preparation, emitter, comparer and test surfaces are reused. The selected-source replacement helper now validates every fresh input before removing selected files, preserves unselected inputs and records exact removals, with nine permanent actual-function controls. No toolchain upgrade or new proof framework is included.

Exact local metadata grade

Two independent fresh unfiltered SDK source runs cover 321 owners / 393 scan legs each; their 813 generated C# and eight discovery files match byte-for-byte. Those immutable 92fdfdc4 sources were separately copied and emitted with exact 89a2ad02 tools/configuration, not overlaid on OLD. The review head's subsequent changes are tests, expectations and documentation only.

Both actual full images contain 37,310 physical types, 247,659 fields, 70,740 methods and 152,513 attributes. They have zero literal physical differences without reviewed-change normalization. All 7,791 logical enum identities, member order, values, storage and flags remain unchanged, including System.Power.POWER_PLATFORM_ROLE_VERSION; one existing namespace parser mapping preserves that retained identity after moving its use into the header.

Strict OLD→NEW and matched-control→NEW grading on both images uses exactly 437 differences, zero unknown and zero unused, preserving all original 117 expectations:

Classification Exact declaration entries
Prior 24 enum-use sites, 68 native retval additions and approved Reset representation 117
140 further native-type/AssociatedEnum sites 280
Native DhcpEnumSubnets.EnumInfo In/Out contract 1
Native signatures at 23 exact handle-use sites 23
Eight producer lifecycle targets, three retained-type lifecycle removals and four synthetic typedef removals 15
Genuine native WER_SUBMIT_DISCARD_IF_QUEUED UInt32/value-128 alias 1

The four removed synthetic types are the two Bluetooth search wrappers and HREPORT/HREPORTSTORE; exact signatures preserve native IntPtr versus Void* and output pointer levels. All eight producer cleanup transfers retain the complete [-1,0] invalid-value set, resolve a matching unary cleanup, and add no ownership to borrowed inputs. WEB_SOCKET_HANDLE, FH_SERVICE_PIPE_HANDLE and HPSSWALK retain their structural identities. There are zero added physical types, not zero new constants.

The WER constant is the existing native alias in WerApi.h:294 to WER_SUBMIT_NO_QUEUE at line 284. A narrow generic emitter correction qualifies a surviving simple alias to its unique same-namespace/applicable-architecture enum member, with exact declared-type conversion and ambiguity rejection. Six native emission cases plus two binding/rejection controls cover it; existing WER enum membership is unchanged. AF_BTH and HIDP_STATUS_I8242_TRANS_UNKNOWN retain their exact type/value/attributes; two named static-literal position transports are separately graded, not broad field/layout allowances.

Each image passes the same 76 actual physical/no-fallback/mutation cases, zero skipped; the primary also passes 14 SDK integrity cases using all 1,179 fresh scratch inputs / 393 diagnostics. The matched frozen OLD control proves exactly 39 constructor HASTHIS corrections across all 37,314 OLD types and no other physical change. Earlier WER emission failure, rejected Power namespace drift, and the first four test-only lookup/assertion failures remain preserved rather than rewritten as successes.

Immutable local evidence

Artifact SHA256
canonical-89a2ad02\full-sdk\Windows.Win32.winmd B1F987EA8E7B78A6DA30480FD72B08B397464B1C601301B3A951EE3B7D3842CC
canonical-89a2ad02\full-sdk-repeat\Windows.Win32.winmd 9437ADC219899CE777E6856A01F9AC685ED7DFC2DADA5FBAC9E2A2FD35DE7725
canonical-89a2ad02\tooling-control\Windows.Win32.winmd 26B5BCBB4914575956788D47E77C2E9CF9540A231D9537673F1D4DBB5428696A
ledger-0014.json 39B542A0B217FEA055B20A6FBB22D922C4A8548814C63FE340B4A6CE05C1231D
Production 437-row expectations F88929804ACD3C4EFC40CFEFB3032881E2E7093AA78133FC740D62AE32A6303D

Paths are under owning artifacts\full-sdk-header-annotation-integration. The ledger binds actual images, input/emission receipts, complete test results, exact strict logs, source producers and historical failures. The playbook documents the detailed native sources and retained gaps. Frozen OLD remains 1361407C2888102CB5161D83503235C09C36F917837C7107CA0A80E5CF4FAC43. The original ten-owner checkpoint at 74bc5f11 remains separately qualified by run 38805058186; its 117-row grade is preserved, not substituted for this combined grade.

Explicitly retained boundaries

--nativeFieldArrayInfo is absent/default-off; the rejected 563-field image is unadmitted. The exact DHCP CountParamIndex=0 row stays until separately qualified source-backed field activation. DWM's uint projection override remains held; no native unsigned rewrite or storage-vocabulary change is made. EFFECTIVE_POWER_MODE_CALLBACK pointer reduction remains parser/encoding configuration. HPSS remains invalid-only because cleanup requires process plus snapshot. TBS enum collisions, AMSI invalid-only/multicontext contracts, the Tbsi native floor conflict, shared COM/RPC definitions and other identified structural/residual rows are not silently removed or declared migrated. Whole-SDK authored/migrated fact totals remain unestablished; source inventories and audit counts are not accepted metadata counts.

Fresh managed projection and source-compatibility effects of native signatures, output ownership and newly captured native facts remain UNVERIFIED. No consumer work, merge, force push, rebase, restack or global field activation is included. Final acceptance still requires the actual artifact from the exact pushed-head CI run, archive-digest verification and independent physical/strict grading.

Capture 28 existing MIDL retval facts with exact custom-attribute and CLI flag controls. Keep shared owners and SDK library derivation unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Relocate nineteen emitted OS floors and capture thirty-nine existing native MIDL retval contracts without changing ABI or logical enum identities.

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

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

📋 API Surface Diff

+178 additions / -145 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 6e9900ff..bf306d35 100644
--- "a/bin\\baseline.apidump.cs"
+++ "b/bin\\current.apidump.cs"
@@ -20504,8 +20504,6 @@ public static class Apis
 
 	public const uint BT_PORT_DYN_FIRST = 4097u;
 
-	public const ushort AF_BTH = 32;
-
 	public const ushort PF_BTH = 32;
 
 	public const uint NS_BTH = 16u;
@@ -20657,20 +20655,25 @@ public static class Apis
 
 	public const uint RFCOMM_CMD_RPN_RESPONSE = 5u;
 
+	public const ushort AF_BTH = 32;
+
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothfindfirstradio")]
-	public unsafe static extern HBLUETOOTH_RADIO_FIND BluetoothFindFirstRadio ([In][Const] BLUETOOTH_FIND_RADIO_PARAMS* pbtfrp, [Out] HANDLE* phRadio);
+	[return: RAIIFree ("BluetoothFindRadioClose")]
+	[return: InvalidHandleValue (-1L)]
+	[return: InvalidHandleValue (0L)]
+	public unsafe static extern IntPtr BluetoothFindFirstRadio ([In][Const] BLUETOOTH_FIND_RADIO_PARAMS* pbtfrp, [Out] HANDLE* phRadio);
 
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothfindnextradio")]
-	public unsafe static extern BOOL BluetoothFindNextRadio ([In] HBLUETOOTH_RADIO_FIND hFind, [Out] HANDLE* phRadio);
+	public unsafe static extern BOOL BluetoothFindNextRadio ([In] IntPtr hFind, [Out] HANDLE* phRadio);
 
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothfindradioclose")]
-	public static extern BOOL BluetoothFindRadioClose ([In] HBLUETOOTH_RADIO_FIND hFind);
+	public static extern BOOL BluetoothFindRadioClose ([In] IntPtr hFind);
 
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
@@ -20680,17 +20683,20 @@ public static class Apis
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothfindfirstdevice")]
-	public unsafe static extern HBLUETOOTH_DEVICE_FIND BluetoothFindFirstDevice ([In][Const] BLUETOOTH_DEVICE_SEARCH_PARAMS* pbtsp, [In][Out] BLUETOOTH_DEVICE_INFO* pbtdi);
+	[return: RAIIFree ("BluetoothFindDeviceClose")]
+	[return: InvalidHandleValue (-1L)]
+	[return: InvalidHandleValue (0L)]
+	public unsafe static extern IntPtr BluetoothFindFirstDevice ([In][Const] BLUETOOTH_DEVICE_SEARCH_PARAMS* pbtsp, [In][Out] BLUETOOTH_DEVICE_INFO* pbtdi);
 
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothfindnextdevice")]
-	public unsafe static extern BOOL BluetoothFindNextDevice ([In] HBLUETOOTH_DEVICE_FIND hFind, [In][Out] BLUETOOTH_DEVICE_INFO* pbtdi);
+	public unsafe static extern BOOL BluetoothFindNextDevice ([In] IntPtr hFind, [In][Out] BLUETOOTH_DEVICE_INFO* pbtdi);
 
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows6.0.6000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothfinddeviceclose")]
-	public static extern BOOL BluetoothFindDeviceClose ([In] HBLUETOOTH_DEVICE_FIND hFind);
+	public static extern BOOL BluetoothFindDeviceClose ([In] IntPtr hFind);
 
 	[DllImport ("BluetoothApis.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows6.0.6000")]
@@ -21623,32 +21629,6 @@ public struct HANDLE_SDP_TYPE
 	public ulong Value;
 }
 
-using Windows.Win32.Foundation.Metadata;
-
-namespace Windows.Win32.Devices.Bluetooth;
-
-[RAIIFree ("BluetoothFindDeviceClose")]
-[InvalidHandleValue (-1L)]
-[InvalidHandleValue (0L)]
-[NativeTypedef]
-public struct HBLUETOOTH_DEVICE_FIND
-{
-	public unsafe void* Value;
-}
-
-using Windows.Win32.Foundation.Metadata;
-
-namespace Windows.Win32.Devices.Bluetooth;
-
-[RAIIFree ("BluetoothFindRadioClose")]
-[InvalidHandleValue (-1L)]
-[InvalidHandleValue (0L)]
-[NativeTypedef]
-public struct HBLUETOOTH_RADIO_FIND
-{
-	public unsafe void* Value;
-}
-
 namespace Windows.Win32.Devices.Bluetooth;
 
 public enum IO_CAPABILITY
@@ -53551,25 +53531,25 @@ namespace Windows.Win32.Devices.Geolocation;
 public interface ICivicAddressReport : ILocationReport
 {
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-icivicaddressreport-getaddressline1")]
-	unsafe HRESULT GetAddressLine1 ([Out] BSTR* pbstrAddress1);
+	unsafe HRESULT GetAddressLine1 ([Out][RetVal] BSTR* pbstrAddress1);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-icivicaddressreport-getaddressline2")]
-	unsafe HRESULT GetAddressLine2 ([Out] BSTR* pbstrAddress2);
+	unsafe HRESULT GetAddressLine2 ([Out][RetVal] BSTR* pbstrAddress2);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-icivicaddressreport-getcity")]
-	unsafe HRESULT GetCity ([Out] BSTR* pbstrCity);
+	unsafe HRESULT GetCity ([Out][RetVal] BSTR* pbstrCity);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-icivicaddressreport-getstateprovince")]
-	unsafe HRESULT GetStateProvince ([Out] BSTR* pbstrStateProvince);
+	unsafe HRESULT GetStateProvince ([Out][RetVal] BSTR* pbstrStateProvince);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-icivicaddressreport-getpostalcode")]
-	unsafe HRESULT GetPostalCode ([Out] BSTR* pbstrPostalCode);
+	unsafe HRESULT GetPostalCode ([Out][RetVal] BSTR* pbstrPostalCode);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-icivicaddressreport-getcountryregion")]
-	unsafe HRESULT GetCountryRegion ([Out] BSTR* pbstrCountryRegion);
+	unsafe HRESULT GetCountryRegion ([Out][RetVal] BSTR* pbstrCountryRegion);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-icivicaddressreport-getdetaillevel")]
-	unsafe HRESULT GetDetailLevel ([Out] uint* pDetailLevel);
+	unsafe HRESULT GetDetailLevel ([Out][RetVal] uint* pDetailLevel);
 }
 
 using System.Runtime.CompilerServices;
@@ -53583,7 +53563,7 @@ namespace Windows.Win32.Devices.Geolocation;
 public interface ICivicAddressReportFactory : ILocationReportFactory
 {
 	[SpecialName]
-	unsafe HRESULT get_CivicAddressReport ([Out] IDispCivicAddressReport* pVal);
+	unsafe HRESULT get_CivicAddressReport ([Out][RetVal] IDispCivicAddressReport* pVal);
 }
 
 using System;
@@ -53603,7 +53583,7 @@ public interface IDefaultLocation : IUnknown
 	unsafe HRESULT SetReport ([In][Const] Guid* reportType, [Optional][In] ILocationReport pLocationReport);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-idefaultlocation-getreport")]
-	unsafe HRESULT GetReport ([In][Const] Guid* reportType, [Out] ILocationReport* ppLocationReport);
+	unsafe HRESULT GetReport ([In][Const] Guid* reportType, [Out][RetVal] ILocationReport* ppLocationReport);
 }
 
 using System.Runtime.CompilerServices;
@@ -53618,28 +53598,28 @@ namespace Windows.Win32.Devices.Geolocation;
 public interface IDispCivicAddressReport : IDispatch
 {
 	[SpecialName]
-	unsafe HRESULT get_AddressLine1 ([Out] BSTR* pAddress1);
+	unsafe HRESULT get_AddressLine1 ([Out][RetVal] BSTR* pAddress1);
 
 	[SpecialName]
-	unsafe HRESULT get_AddressLine2 ([Out] BSTR* pAddress2);
+	unsafe HRESULT get_AddressLine2 ([Out][RetVal] BSTR* pAddress2);
 
 	[SpecialName]
-	unsafe HRESULT get_City ([Out] BSTR* pCity);
+	unsafe HRESULT get_City ([Out][RetVal] BSTR* pCity);
 
 	[SpecialName]
-	unsafe HRESULT get_StateProvince ([Out] BSTR* pStateProvince);
+	unsafe HRESULT get_StateProvince ([Out][RetVal] BSTR* pStateProvince);
 
 	[SpecialName]
-	unsafe HRESULT get_PostalCode ([Out] BSTR* pPostalCode);
+	unsafe HRESULT get_PostalCode ([Out][RetVal] BSTR* pPostalCode);
 
 	[SpecialName]
-	unsafe HRESULT get_CountryRegion ([Out] BSTR* pCountryRegion);
+	unsafe HRESULT get_CountryRegion ([Out][RetVal] BSTR* pCountryRegion);
 
 	[SpecialName]
-	unsafe HRESULT get_DetailLevel ([Out] uint* pDetailLevel);
+	unsafe HRESULT get_DetailLevel ([Out][RetVal] uint* pDetailLevel);
 
 	[SpecialName]
-	unsafe HRESULT get_Timestamp ([Out] double* pVal);
+	unsafe HRESULT get_Timestamp ([Out][RetVal] double* pVal);
 }
 
 using System.Runtime.CompilerServices;
@@ -53654,22 +53634,22 @@ namespace Windows.Win32.Devices.Geolocation;
 public interface IDispLatLongReport : IDispatch
 {
 	[SpecialName]
-	unsafe HRESULT get_Latitude ([Out] double* pVal);
+	unsafe HRESULT get_Latitude ([Out][RetVal] double* pVal);
 
 	[SpecialName]
-	unsafe HRESULT get_Longitude ([Out] double* pVal);
+	unsafe HRESULT get_Longitude ([Out][RetVal] double* pVal);
 
 	[SpecialName]
-	unsafe HRESULT get_ErrorRadius ([Out] double* pVal);
+	unsafe HRESULT get_ErrorRadius ([Out][RetVal] double* pVal);
 
 	[SpecialName]
-	unsafe HRESULT get_Altitude ([Out] double* pVal);
+	unsafe HRESULT get_Altitude ([Out][RetVal] double* pVal);
 
 	[SpecialName]
-	unsafe HRESULT get_AltitudeError ([Out] double* pVal);
+	unsafe HRESULT get_AltitudeError ([Out][RetVal] double* pVal);
 
 	[SpecialName]
-	unsafe HRESULT get_Timestamp ([Out] double* pVal);
+	unsafe HRESULT get_Timestamp ([Out][RetVal] double* pVal);
 }
 
 using System.Runtime.InteropServices;
@@ -53684,19 +53664,19 @@ namespace Windows.Win32.Devices.Geolocation;
 public interface ILatLongReport : ILocationReport
 {
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilatlongreport-getlatitude")]
-	unsafe HRESULT GetLatitude ([Out] double* pLatitude);
+	unsafe HRESULT GetLatitude ([Out][RetVal] double* pLatitude);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilatlongreport-getlongitude")]
-	unsafe HRESULT GetLongitude ([Out] double* pLongitude);
+	unsafe HRESULT GetLongitude ([Out][RetVal] double* pLongitude);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilatlongreport-geterrorradius")]
-	unsafe HRESULT GetErrorRadius ([Out] double* pErrorRadius);
+	unsafe HRESULT GetErrorRadius ([Out][RetVal] double* pErrorRadius);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilatlongreport-getaltitude")]
-	unsafe HRESULT GetAltitude ([Out] double* pAltitude);
+	unsafe HRESULT GetAltitude ([Out][RetVal] double* pAltitude);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilatlongreport-getaltitudeerror")]
-	unsafe HRESULT GetAltitudeError ([Out] double* pAltitudeError);
+	unsafe HRESULT GetAltitudeError ([Out][RetVal] double* pAltitudeError);
 }
 
 using System.Runtime.CompilerServices;
@@ -53710,7 +53690,7 @@ namespace Windows.Win32.Devices.Geolocation;
 public interface ILatLongReportFactory : ILocationReportFactory
 {
 	[SpecialName]
-	unsafe HRESULT get_LatLongReport ([Out] IDispLatLongReport* pVal);
+	unsafe HRESULT get_LatLongReport ([Out][RetVal] IDispLatLongReport* pVal);
 }
 
 using System;
@@ -53734,19 +53714,19 @@ public interface ILocation : IUnknown
 	unsafe HRESULT UnregisterForReport ([In][Const] Guid* reportType);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocation-getreport")]
-	unsafe HRESULT GetReport ([In][Const] Guid* reportType, [Out] ILocationReport* ppLocationReport);
+	unsafe HRESULT GetReport ([In][Const] Guid* reportType, [Out][RetVal] ILocationReport* ppLocationReport);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocation-getreportstatus")]
-	unsafe HRESULT GetReportStatus ([In][Const] Guid* reportType, [Out] LOCATION_REPORT_STATUS* pStatus);
+	unsafe HRESULT GetReportStatus ([In][Const] Guid* reportType, [Out][RetVal] LOCATION_REPORT_STATUS* pStatus);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocation-getreportinterval")]
-	unsafe HRESULT GetReportInterval ([In][Const] Guid* reportType, [Out] uint* pMilliseconds);
+	unsafe HRESULT GetReportInterval ([In][Const] Guid* reportType, [Out][RetVal] uint* pMilliseconds);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocation-setreportinterval")]
 	unsafe HRESULT SetReportInterval ([In][Const] Guid* reportType, [In] uint millisecondsRequested);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocation-getdesiredaccuracy")]
-	unsafe HRESULT GetDesiredAccuracy ([In][Const] Guid* reportType, [Out] LOCATION_DESIRED_ACCURACY* pDesiredAccuracy);
+	unsafe HRESULT GetDesiredAccuracy ([In][Const] Guid* reportType, [Out][RetVal] LOCATION_DESIRED_ACCURACY* pDesiredAccuracy);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocation-setdesiredaccuracy")]
 	unsafe HRESULT SetDesiredAccuracy ([In][Const] Guid* reportType, [In] LOCATION_DESIRED_ACCURACY desiredAccuracy);
@@ -53808,13 +53788,13 @@ namespace Windows.Win32.Devices.Geolocation;
 public interface ILocationReport : IUnknown
 {
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocationreport-getsensorid")]
-	unsafe HRESULT GetSensorID ([Out] Guid* pSensorID);
+	unsafe HRESULT GetSensorID ([Out][RetVal] Guid* pSensorID);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocationreport-gettimestamp")]
-	unsafe HRESULT GetTimestamp ([Out] SYSTEMTIME* pCreationTime);
+	unsafe HRESULT GetTimestamp ([Out][RetVal] SYSTEMTIME* pCreationTime);
 
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/locationapi/nf-locationapi-ilocationreport-getvalue")]
-	unsafe HRESULT GetValue ([In][Const] PROPERTYKEY* pKey, [Out] PROPVARIANT* pValue);
+	unsafe HRESULT GetValue ([In][Const] PROPERTYKEY* pKey, [Out][RetVal] PROPVARIANT* pValue);
 }
 
 using System.Runtime.CompilerServices;
@@ -53833,16 +53813,16 @@ public interface ILocationReportFactory : IDispatch
 	HRESULT StopListeningForReports ();
 
 	[SpecialName]
-	unsafe HRESULT get_Status ([Out] uint* pVal);
+	unsafe HRESULT get_Status ([Out][RetVal] uint* pVal);
 
 	[SpecialName]
-	unsafe HRESULT get_ReportInterval ([Out] uint* pMilliseconds);
+	unsafe HRESULT get_ReportInterval ([Out][RetVal] uint* pMilliseconds);
 
 	[SpecialName]
 	HRESULT put_ReportInterval ([In] uint millisecondsRequested);
 
 	[SpecialName]
-	unsafe HRESULT get_DesiredAccuracy ([Out] uint* pDesiredAccuracy);
+	unsafe HRESULT get_DesiredAccuracy ([Out][RetVal] uint* pDesiredAccuracy);
 
 	[SpecialName]
 	HRESULT put_DesiredAccuracy ([In] uint desiredAccuracy);
@@ -54286,8 +54266,6 @@ public static class Apis
 
 	public const NTSTATUS HIDP_STATUS_NOT_BUTTON_ARRAY = -1072627679;
 
-	public const NTSTATUS HIDP_STATUS_I8242_TRANS_UNKNOWN = -1072627703;
-
 	public const ushort HID_USAGE_PAGE_UNDEFINED = 0;
 
 	public const ushort HID_USAGE_PAGE_ARCADE = 145;
@@ -63389,6 +63367,8 @@ public static class Apis
 
 	public const uint IOCTL_BUTTON_GET_ENABLED_ON_IDLE = 721580u;
 
+	public const NTSTATUS HIDP_STATUS_I8242_TRANS_UNKNOWN = -1072627703;
+
 	[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);
 
@@ -362651,7 +362631,7 @@ public static class Apis
 	[DllImport ("DHCPSAPI.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windowsserver2000")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/dhcpsapi/nf-dhcpsapi-dhcpenumsubnets")]
-	public unsafe static extern uint DhcpEnumSubnets ([Optional][In][Const] PWSTR ServerIpAddress, [In][Out] uint* ResumeHandle, [In] uint PreferredMaximum, [Out] DHCP_IP_ARRAY** EnumInfo, [Out] uint* ElementsRead, [Out] uint* ElementsTotal);
+	public unsafe static extern uint DhcpEnumSubnets ([Optional][In][Const] PWSTR ServerIpAddress, [In][Out] uint* ResumeHandle, [In] uint PreferredMaximum, [In][Out] DHCP_IP_ARRAY** EnumInfo, [Out] uint* ElementsRead, [Out] uint* ElementsTotal);
 
 	[DllImport ("DHCPSAPI.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windowsserver2008")]
@@ -412856,248 +412836,291 @@ public static class Apis
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetaddconnectiona")]
-	public static extern WIN32_ERROR WNetAddConnectionA ([In][Const] PSTR lpRemoteName, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpLocalName);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetAddConnectionA ([In][Const] PSTR lpRemoteName, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpLocalName);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetaddconnectionw")]
-	public static extern WIN32_ERROR WNetAddConnectionW ([In][Const] PWSTR lpRemoteName, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpLocalName);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetAddConnectionW ([In][Const] PWSTR lpRemoteName, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpLocalName);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetaddconnection2a")]
-	public unsafe static extern WIN32_ERROR WNetAddConnection2A ([In] NETRESOURCEA* lpNetResource, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpUserName, [In] NET_CONNECT_FLAGS dwFlags);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetAddConnection2A ([In] NETRESOURCEA* lpNetResource, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpUserName, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetaddconnection2w")]
-	public unsafe static extern WIN32_ERROR WNetAddConnection2W ([In] NETRESOURCEW* lpNetResource, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpUserName, [In] NET_CONNECT_FLAGS dwFlags);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetAddConnection2W ([In] NETRESOURCEW* lpNetResource, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpUserName, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetaddconnection3a")]
-	public unsafe static extern WIN32_ERROR WNetAddConnection3A ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpUserName, [In] NET_CONNECT_FLAGS dwFlags);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetAddConnection3A ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpUserName, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetaddconnection3w")]
-	public unsafe static extern WIN32_ERROR WNetAddConnection3W ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpUserName, [In] NET_CONNECT_FLAGS dwFlags);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetAddConnection3W ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpUserName, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[Ansi]
-	public unsafe static extern WIN32_ERROR WNetAddConnection4A ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In] NET_CONNECT_FLAGS dwFlags, [In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetAddConnection4A ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags, [In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[Unicode]
-	public unsafe static extern WIN32_ERROR WNetAddConnection4W ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In] NET_CONNECT_FLAGS dwFlags, [In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetAddConnection4W ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags, [In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetcancelconnectiona")]
-	public static extern WIN32_ERROR WNetCancelConnectionA ([In][Const] PSTR lpName, [In] BOOL fForce);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetCancelConnectionA ([In][Const] PSTR lpName, [In] BOOL fForce);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetcancelconnectionw")]
-	public static extern WIN32_ERROR WNetCancelConnectionW ([In][Const] PWSTR lpName, [In] BOOL fForce);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetCancelConnectionW ([In][Const] PWSTR lpName, [In] BOOL fForce);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetcancelconnection2a")]
-	public static extern WIN32_ERROR WNetCancelConnection2A ([In][Const] PSTR lpName, [In] NET_CONNECT_FLAGS dwFlags, [In] BOOL fForce);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetCancelConnection2A ([In][Const] PSTR lpName, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags, [In] BOOL fForce);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetcancelconnection2w")]
-	public static extern WIN32_ERROR WNetCancelConnection2W ([In][Const] PWSTR lpName, [In] NET_CONNECT_FLAGS dwFlags, [In] BOOL fForce);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetCancelConnection2W ([In][Const] PWSTR lpName, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags, [In] BOOL fForce);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetconnectiona")]
-	public unsafe static extern WIN32_ERROR WNetGetConnectionA ([In][Const] PSTR lpLocalName, [Optional][Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpRemoteName, [In][Out] uint* lpnLength);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetConnectionA ([In][Const] PSTR lpLocalName, [Optional][Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpRemoteName, [In][Out] uint* lpnLength);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetconnectionw")]
-	public unsafe static extern WIN32_ERROR WNetGetConnectionW ([In][Const] PWSTR lpLocalName, [Optional][Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpRemoteName, [In][Out] uint* lpnLength);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetConnectionW ([In][Const] PWSTR lpLocalName, [Optional][Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpRemoteName, [In][Out] uint* lpnLength);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetuseconnectiona")]
-	public unsafe static extern WIN32_ERROR WNetUseConnectionA ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpUserId, [In] NET_CONNECT_FLAGS dwFlags, [Optional][Out][NativeArrayInfo (CountParamIndex = 6)] PSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetUseConnectionA ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [Optional][In][Const] PSTR lpPassword, [Optional][In][Const] PSTR lpUserId, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags, [Optional][Out][NativeArrayInfo (CountParamIndex = 6)] PSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetuseconnectionw")]
-	public unsafe static extern WIN32_ERROR WNetUseConnectionW ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpUserId, [In] NET_CONNECT_FLAGS dwFlags, [Optional][Out][NativeArrayInfo (CountParamIndex = 6)] PWSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetUseConnectionW ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In][Const] PWSTR lpPassword, [Optional][In][Const] PWSTR lpUserId, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags, [Optional][Out][NativeArrayInfo (CountParamIndex = 6)] PWSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[Ansi]
-	public unsafe static extern WIN32_ERROR WNetUseConnection4A ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [Optional][In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In] uint dwFlags, [Optional][In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions, [Optional][Out][NativeArrayInfo (CountParamIndex = 8)] PSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetUseConnection4A ([Optional][In] HWND hwndOwner, [In] NETRESOURCEA* lpNetResource, [Optional][In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In] uint dwFlags, [Optional][In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions, [Optional][Out][NativeArrayInfo (CountParamIndex = 8)] PSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[Unicode]
-	public unsafe static extern WIN32_ERROR WNetUseConnection4W ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In] uint dwFlags, [Optional][In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions, [Optional][Out][NativeArrayInfo (CountParamIndex = 8)] PWSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetUseConnection4W ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In][MemorySize (BytesParamIndex = 3)] void* pAuthBuffer, [In] uint cbAuthBuffer, [In] uint dwFlags, [Optional][In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions, [Optional][Out][NativeArrayInfo (CountParamIndex = 8)] PWSTR lpAccessName, [Optional][In][Out] uint* lpBufferSize, [Optional][Out] uint* lpResult);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetconnectiondialog")]
-	public static extern WIN32_ERROR WNetConnectionDialog ([In] HWND hwnd, [In] uint dwType);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetConnectionDialog ([In] HWND hwnd, [In] uint dwType);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetdisconnectdialog")]
-	public static extern WIN32_ERROR WNetDisconnectDialog ([Optional][In] HWND hwnd, [In] uint dwType);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetDisconnectDialog ([Optional][In] HWND hwnd, [In] uint dwType);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetconnectiondialog1a")]
-	public unsafe static extern WIN32_ERROR WNetConnectionDialog1A ([In][Out] CONNECTDLGSTRUCTA* lpConnDlgStruct);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetConnectionDialog1A ([In][Out] CONNECTDLGSTRUCTA* lpConnDlgStruct);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetconnectiondialog1w")]
-	public unsafe static extern WIN32_ERROR WNetConnectionDialog1W ([In][Out] CONNECTDLGSTRUCTW* lpConnDlgStruct);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetConnectionDialog1W ([In][Out] CONNECTDLGSTRUCTW* lpConnDlgStruct);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetdisconnectdialog1a")]
-	public unsafe static extern WIN32_ERROR WNetDisconnectDialog1A ([In] DISCDLGSTRUCTA* lpConnDlgStruct);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetDisconnectDialog1A ([In] DISCDLGSTRUCTA* lpConnDlgStruct);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetdisconnectdialog1w")]
-	public unsafe static extern WIN32_ERROR WNetDisconnectDialog1W ([In] DISCDLGSTRUCTW* lpConnDlgStruct);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetDisconnectDialog1W ([In] DISCDLGSTRUCTW* lpConnDlgStruct);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetopenenuma")]
-	public unsafe static extern WIN32_ERROR WNetOpenEnumA ([In] NET_RESOURCE_SCOPE dwScope, [In] NET_RESOURCE_TYPE dwType, [In] WNET_OPEN_ENUM_USAGE dwUsage, [Optional][In] NETRESOURCEA* lpNetResource, [Out][RAIIFree ("WNetCloseEnum")] HANDLE* lphEnum);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetOpenEnumA ([In][AssociatedEnum ("NET_RESOURCE_SCOPE")] uint dwScope, [In][AssociatedEnum ("NET_RESOURCE_TYPE")] uint dwType, [In][AssociatedEnum ("WNET_OPEN_ENUM_USAGE")] uint dwUsage, [Optional][In] NETRESOURCEA* lpNetResource, [Out][RAIIFree ("WNetCloseEnum")] HANDLE* lphEnum);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetopenenumw")]
-	public unsafe static extern WIN32_ERROR WNetOpenEnumW ([In] NET_RESOURCE_SCOPE dwScope, [In] NET_RESOURCE_TYPE dwType, [In] WNET_OPEN_ENUM_USAGE dwUsage, [Optional][In] NETRESOURCEW* lpNetResource, [Out][RAIIFree ("WNetCloseEnum")] HANDLE* lphEnum);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetOpenEnumW ([In][AssociatedEnum ("NET_RESOURCE_SCOPE")] uint dwScope, [In][AssociatedEnum ("NET_RESOURCE_TYPE")] uint dwType, [In][AssociatedEnum ("WNET_OPEN_ENUM_USAGE")] uint dwUsage, [Optional][In] NETRESOURCEW* lpNetResource, [Out][RAIIFree ("WNetCloseEnum")] HANDLE* lphEnum);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetenumresourcea")]
-	public unsafe static extern WIN32_ERROR WNetEnumResourceA ([In] HANDLE hEnum, [In][Out] uint* lpcCount, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetEnumResourceA ([In] HANDLE hEnum, [In][Out] uint* lpcCount, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetenumresourcew")]
-	public unsafe static extern WIN32_ERROR WNetEnumResourceW ([In] HANDLE hEnum, [In][Out] uint* lpcCount, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetEnumResourceW ([In] HANDLE hEnum, [In][Out] uint* lpcCount, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetcloseenum")]
-	public static extern WIN32_ERROR WNetCloseEnum ([In] HANDLE hEnum);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public static extern uint WNetCloseEnum ([In] HANDLE hEnum);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetresourceparenta")]
-	public unsafe static extern WIN32_ERROR WNetGetResourceParentA ([In] NETRESOURCEA* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetResourceParentA ([In] NETRESOURCEA* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetresourceparentw")]
-	public unsafe static extern WIN32_ERROR WNetGetResourceParentW ([In] NETRESOURCEW* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetResourceParentW ([In] NETRESOURCEW* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetresourceinformationa")]
-	public unsafe static extern WIN32_ERROR WNetGetResourceInformationA ([In] NETRESOURCEA* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer, [Out] PSTR* lplpSystem);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetResourceInformationA ([In] NETRESOURCEA* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer, [Out] PSTR* lplpSystem);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetresourceinformationw")]
-	public unsafe static extern WIN32_ERROR WNetGetResourceInformationW ([In] NETRESOURCEW* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer, [Out] PWSTR* lplpSystem);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetResourceInformationW ([In] NETRESOURCEW* lpNetResource, [Out][MemorySize (BytesParamIndex = 2)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpcbBuffer, [Out] PWSTR* lplpSystem);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetuniversalnamea")]
-	public unsafe static extern WIN32_ERROR WNetGetUniversalNameA ([In][Const] PSTR lpLocalPath, [In] UNC_INFO_LEVEL dwInfoLevel, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetUniversalNameA ([In][Const] PSTR lpLocalPath, [In][AssociatedEnum ("UNC_INFO_LEVEL")] uint dwInfoLevel, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetuniversalnamew")]
-	public unsafe static extern WIN32_ERROR WNetGetUniversalNameW ([In][Const] PWSTR lpLocalPath, [In] UNC_INFO_LEVEL dwInfoLevel, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetUniversalNameW ([In][Const] PWSTR lpLocalPath, [In][AssociatedEnum ("UNC_INFO_LEVEL")] uint dwInfoLevel, [Out][MemorySize (BytesParamIndex = 3)][ContainsInteriorPointers] void* lpBuffer, [In][Out] uint* lpBufferSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetusera")]
-	public unsafe static extern WIN32_ERROR WNetGetUserA ([Optional][In][Const] PSTR lpName, [Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpUserName, [In][Out] uint* lpnLength);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetUserA ([Optional][In][Const] PSTR lpName, [Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpUserName, [In][Out] uint* lpnLength);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetuserw")]
-	public unsafe static extern WIN32_ERROR WNetGetUserW ([Optional][In][Const] PWSTR lpName, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpUserName, [In][Out] uint* lpnLength);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetUserW ([Optional][In][Const] PWSTR lpName, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpUserName, [In][Out] uint* lpnLength);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetprovidernamea")]
-	public unsafe static extern WIN32_ERROR WNetGetProviderNameA ([In] uint dwNetType, [Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpProviderName, [In][Out] uint* lpBufferSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetProviderNameA ([In] uint dwNetType, [Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpProviderName, [In][Out] uint* lpBufferSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetprovidernamew")]
-	public unsafe static extern WIN32_ERROR WNetGetProviderNameW ([In] uint dwNetType, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpProviderName, [In][Out] uint* lpBufferSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetProviderNameW ([In] uint dwNetType, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpProviderName, [In][Out] uint* lpBufferSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetnetworkinformationa")]
-	public unsafe static extern WIN32_ERROR WNetGetNetworkInformationA ([In][Const] PSTR lpProvider, [Out] NETINFOSTRUCT* lpNetInfoStruct);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetNetworkInformationA ([In][Const] PSTR lpProvider, [Out] NETINFOSTRUCT* lpNetInfoStruct);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetnetworkinformationw")]
-	public unsafe static extern WIN32_ERROR WNetGetNetworkInformationW ([In][Const] PWSTR lpProvider, [Out] NETINFOSTRUCT* lpNetInfoStruct);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetNetworkInformationW ([In][Const] PWSTR lpProvider, [Out] NETINFOSTRUCT* lpNetInfoStruct);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Ansi]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetlasterrora")]
-	public unsafe static extern WIN32_ERROR WNetGetLastErrorA ([Out] uint* lpError, [Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpErrorBuf, [In] uint nErrorBufSize, [Out][NativeArrayInfo (CountParamIndex = 4)] PSTR lpNameBuf, [In] uint nNameBufSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetLastErrorA ([Out] uint* lpError, [Out][NativeArrayInfo (CountParamIndex = 2)] PSTR lpErrorBuf, [In] uint nErrorBufSize, [Out][NativeArrayInfo (CountParamIndex = 4)] PSTR lpNameBuf, [In] uint nNameBufSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false, SetLastError = true)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Unicode]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/nf-winnetwk-wnetgetlasterrorw")]
-	public unsafe static extern WIN32_ERROR WNetGetLastErrorW ([Out] uint* lpError, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpErrorBuf, [In] uint nErrorBufSize, [Out][NativeArrayInfo (CountParamIndex = 4)] PWSTR lpNameBuf, [In] uint nNameBufSize);
+	[return: AssociatedEnum ("WIN32_ERROR")]
+	public unsafe static extern uint WNetGetLastErrorW ([Out] uint* lpError, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpErrorBuf, [In] uint nErrorBufSize, [Out][NativeArrayInfo (CountParamIndex = 4)] PWSTR lpNameBuf, [In] uint nNameBufSize);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
@@ -413119,7 +413142,7 @@ public static class Apis
 	[DllImport ("davclnt.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.1.2600")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/npapi/nf-npapi-npaddconnection3")]
-	public unsafe static extern uint NPAddConnection3 ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In] PWSTR lpPassword, [Optional][In] PWSTR lpUserName, [In] NET_CONNECT_FLAGS dwFlags);
+	public unsafe static extern uint NPAddConnection3 ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In] PWSTR lpPassword, [Optional][In] PWSTR lpUserName, [In][AssociatedEnum ("NET_CONNECT_FLAGS")] uint dwFlags);
 
 	[DllImport ("NTLANMAN.dll", ExactSpelling = true, PreserveSig = false)]
 	public unsafe static extern uint NPAddConnection4 ([Optional][In] HWND hwndOwner, [In] NETRESOURCEW* lpNetResource, [Optional][In][MemorySize (BytesParamIndex = 3)] void* lpAuthBuffer, [In] uint cbAuthBuffer, [In] uint dwFlags, [Optional][In][MemorySize (BytesParamIndex = 6)] byte* lpUseOptions, [In] uint cbUseOptions);
@@ -413145,7 +413168,7 @@ public static class Apis
 	[DllImport ("davclnt.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.1.2600")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/npapi/nf-npapi-npgetuniversalname")]
-	public unsafe static extern uint NPGetUniversalName ([In][Const] PWSTR lpLocalPath, [In] UNC_INFO_LEVEL dwInfoLevel, [Out][MemorySize (BytesParamIndex = 3)] void* lpBuffer, [In][Out] uint* lpBufferSize);
+	public unsafe static extern uint NPGetUniversalName ([In][Const] PWSTR lpLocalPath, [In][AssociatedEnum ("UNC_INFO_LEVEL")] uint dwInfoLevel, [Out][MemorySize (BytesParamIndex = 3)] void* lpBuffer, [In][Out] uint* lpBufferSize);
 
 	[DllImport ("NTLANMAN.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.1.2600")]
@@ -413193,7 +413216,7 @@ public static class Apis
 	[DllImport ("davclnt.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.1.2600")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/npapi/nf-npapi-npformatnetworkname")]
-	public unsafe static extern uint NPFormatNetworkName ([In] PWSTR lpRemoteName, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpFormattedName, [In][Out] uint* lpnLength, [In] NETWORK_NAME_FORMAT_FLAGS dwFlags, [In] uint dwAveCharPerLine);
+	public unsafe static extern uint NPFormatNetworkName ([In] PWSTR lpRemoteName, [Out][NativeArrayInfo (CountParamIndex = 2)] PWSTR lpFormattedName, [In][Out] uint* lpnLength, [In][AssociatedEnum ("NETWORK_NAME_FORMAT_FLAGS")] uint dwFlags, [In] uint dwAveCharPerLine);
 
 	[DllImport ("MPR.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.1.2600")]
@@ -413222,7 +413245,8 @@ public struct CONNECTDLGSTRUCTA
 
 	public unsafe NETRESOURCEA* lpConnRes;
 
-	public CONNECTDLGSTRUCT_FLAGS dwFlags;
+	[AssociatedEnum ("CONNECTDLGSTRUCT_FLAGS")]
+	public uint dwFlags;
 
 	public uint dwDevNum;
 }
@@ -413242,7 +413266,8 @@ public struct CONNECTDLGSTRUCTW
 
 	public unsafe NETRESOURCEW* lpConnRes;
 
-	public CONNECTDLGSTRUCT_FLAGS dwFlags;
+	[AssociatedEnum ("CONNECTDLGSTRUCT_FLAGS")]
+	public uint dwFlags;
 
 	public uint dwDevNum;
 }
@@ -413279,7 +413304,8 @@ public struct DISCDLGSTRUCTA
 
 	public PSTR lpRemoteName;
 
-	public DISCDLGSTRUCT_FLAGS dwFlags;
+	[AssociatedEnum ("DISCDLGSTRUCT_FLAGS")]
+	public uint dwFlags;
 }
 
 using Windows.Win32.Foundation;
@@ -413299,7 +413325,8 @@ public struct DISCDLGSTRUCTW
 
 	public PWSTR lpRemoteName;
 
-	public DISCDLGSTRUCT_FLAGS dwFlags;
+	[AssociatedEnum ("DISCDLGSTRUCT_FLAGS")]
+	public uint dwFlags;
 }
 
 using System;
@@ -413332,7 +413359,6 @@ public struct NETCONNECTINFOSTRUCT
 }
 
 using System;
-using Windows.Win32.Foundation;
 using Windows.Win32.Foundation.Metadata;
 
 namespace Windows.Win32.NetworkManagement.WNet;
@@ -413344,9 +413370,11 @@ public struct NETINFOSTRUCT
 
 	public uint dwProviderVersion;
 
-	public WIN32_ERROR dwStatus;
+	[AssociatedEnum ("WIN32_ERROR")]
+	public uint dwStatus;
 
-	public NETINFOSTRUCT_CHARACTERISTICS dwCharacteristics;
+	[AssociatedEnum ("NETINFOSTRUCT_CHARACTERISTICS")]
+	public uint dwCharacteristics;
 
 	public UIntPtr dwHandle;
 
@@ -413378,9 +413406,11 @@ namespace Windows.Win32.NetworkManagement.WNet;
 [Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/ns-winnetwk-netresourcea")]
 public struct NETRESOURCEA
 {
-	public NET_RESOURCE_SCOPE dwScope;
+	[AssociatedEnum ("NET_RESOURCE_SCOPE")]
+	public uint dwScope;
 
-	public NET_RESOURCE_TYPE dwType;
+	[AssociatedEnum ("NET_RESOURCE_TYPE")]
+	public uint dwType;
 
 	public uint dwDisplayType;
 
@@ -413404,9 +413434,11 @@ namespace Windows.Win32.NetworkManagement.WNet;
 [Documentation ("https://learn.microsoft.com/windows/win32/api/winnetwk/ns-winnetwk-netresourcew")]
 public struct NETRESOURCEW
 {
-	public NET_RESOURCE_SCOPE dwScope;
+	[AssociatedEnum ("NET_RESOURCE_SCOPE")]
+	public uint dwScope;
 
-	public NET_RESOURCE_TYPE dwType;
+	[AssociatedEnum ("NET_RESOURCE_TYPE")]
+	public uint dwType;
 
 	public uint dwDisplayType;
 
@@ -413491,7 +413523,8 @@ public struct NOTIFYADD
 
 	public NETRESOURCEA NetResource;
 
-	public NET_CONNECT_FLAGS dwAddFlags;
+	[AssociatedEnum ("NET_CONNECT_FLAGS")]
+	public uint dwAddFlags;
 }
 
 using Windows.Win32.Foundation;
@@ -465379,7 +465412,7 @@ namespace Windows.Win32.Networking.NetworkListManager;
 public interface INetworkConnection2 : INetworkConnection
 {
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/netlistmgr/nf-netlistmgr-inetworkconnection2-isdomainauthenticatedby")]
-	unsafe HRESULT IsDomainAuthenticatedBy ([In] NLM_DOMAIN_AUTHENTICATION_KIND domainAuthenticationKind, [Out] BOOL* pValue);
+	unsafe HRESULT IsDomainAuthenticatedBy ([In] NLM_DOMAIN_AUTHENTICATION_KIND domainAuthenticationKind, [Out][RetVal] BOOL* pValue);
 }
 
 using System.Runtime.InteropServices;
@@ -466601,7 +466634,7 @@ public static class Apis
 	[DllImport ("websocket.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/websocket/nf-websocket-websocketcreateclienthandle")]
-	public unsafe static extern HRESULT WebSocketCreateClientHandle ([In][Const][NativeArrayInfo (CountParamIndex = 1)] WEB_SOCKET_PROPERTY* pProperties, [In] uint ulPropertyCount, [Out] WEB_SOCKET_HANDLE* phWebSocket);
+	public unsafe static extern HRESULT WebSocketCreateClientHandle ([In][Const][NativeArrayInfo (CountParamIndex = 1)] WEB_SOCKET_PROPERTY* pProperties, [In] uint ulPropertyCount, [Out][RAIIFree ("WebSocketDeleteHandle")][InvalidHandleValue (-1L)][InvalidHandleValue (0L)] WEB_SOCKET_HANDLE* phWebSocket);
 
 	[DllImport ("websocket.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows8.0")]
@@ -466616,7 +466649,7 @@ public static class Apis
 	[DllImport ("websocket.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/websocket/nf-websocket-websocketcreateserverhandle")]
-	public unsafe static extern HRESULT WebSocketCreateServerHandle ([In][Const][NativeArrayInfo (CountParamIndex = 1)] WEB_SOCKET_PROPERTY* pProperties, [In] uint ulPropertyCount, [Out] WEB_SOCKET_HANDLE* phWebSocket);
+	public unsafe static extern HRESULT WebSocketCreateServerHandle ([In][Const][NativeArrayInfo (CountParamIndex = 1)] WEB_SOCKET_PROPERTY* pProperties, [In] uint ulPropertyCount, [Out][RAIIFree ("WebSocketDeleteHandle")][InvalidHandleValue (-1L)][InvalidHandleValue (0L)] WEB_SOCKET_HANDLE* phWebSocket);
 
 	[DllImport ("websocket.dll", ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows8.0")]
@@ -466763,9 +466796,6 @@ using Windows.Win32.Foundation.Metadata;
 
 namespace Windows.Win32.Networking.WebSocket;
 
-[RAIIFree ("WebSocketDeleteHandle")]
-[InvalidHandleValue (-1L)]
-[InvalidHandleValue (0L)]
 [NativeTypedef]
 public struct WEB_SOCKET_HANDLE
 {
@@ -560718,7 +560748,7 @@ public static class Apis
 	[DllImport ("Cabinet.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fdi/nf-fdi-fdicreate")]
-	public unsafe static extern void* FDICreate ([In] PFNALLOC pfnalloc, [In] PFNFREE pfnfree, [In] PFNOPEN pfnopen, [In] PFNREAD pfnread, [In] PFNWRITE pfnwrite, [In] PFNCLOSE pfnclose, [In] PFNSEEK pfnseek, [In] FDICREATE_CPU_TYPE cpuType, [In][Out] ERF* perf);
+	public unsafe static extern void* FDICreate ([In] PFNALLOC pfnalloc, [In] PFNFREE pfnfree, [In] PFNOPEN pfnopen, [In] PFNREAD pfnread, [In] PFNWRITE pfnwrite, [In] PFNCLOSE pfnclose, [In] PFNSEEK pfnseek, [In][AssociatedEnum ("FDICREATE_CPU_TYPE")] int cpuType, [In][Out] ERF* perf);
 
 	[DllImport ("Cabinet.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
 	[SupportedOSPlatform ("windows5.0")]
@@ -568520,44 +568550,44 @@ public static class Apis
 	public const uint FH_STATE_RUNNING = 256u;
 
 	[DllImport ("fhsvcctl.dll", ExactSpelling = true, PreserveSig = false)]
-	[SupportedOSPlatform ("windows8.0")]
 	[Obsolete ("FhServiceOpenPipe is deprecated and might not work on all platforms. For more info, see MSDN.")]
+	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fhsvcctl/nf-fhsvcctl-fhserviceopenpipe")]
-	public unsafe static extern HRESULT FhServiceOpenPipe ([In] BOOL StartServiceIfStopped, [Out] FH_SERVICE_PIPE_HANDLE* Pipe);
+	public unsafe static extern HRESULT FhServiceOpenPipe ([In] BOOL StartServiceIfStopped, [Out][RAIIFree ("FhServiceClosePipe")][InvalidHandleValue (-1L)][InvalidHandleValue (0L)] FH_SERVICE_PIPE_HANDLE* Pipe);
 
 	[DllImport ("fhsvcctl.dll", ExactSpelling = true, PreserveSig = false)]
-	[SupportedOSPlatform ("windows8.0")]
 	[Obsolete ("FhServiceClosePipe is deprecated and might not work on all platforms. For more info, see MSDN.")]
+	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fhsvcctl/nf-fhsvcctl-fhserviceclosepipe")]
 	public static extern HRESULT FhServiceClosePipe ([In] FH_SERVICE_PIPE_HANDLE Pipe);
 
 	[DllImport ("fhsvcctl.dll", ExactSpelling = true, PreserveSig = false)]
-	[SupportedOSPlatform ("windows8.0")]
 	[Obsolete ("FhServiceStartBackup is deprecated and might not work on all platforms. For more info, see MSDN.")]
+	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fhsvcctl/nf-fhsvcctl-fhservicestartbackup")]
 	public static extern HRESULT FhServiceStartBackup ([In] FH_SERVICE_PIPE_HANDLE Pipe, [In] BOOL LowPriorityIo);
 
 	[DllImport ("fhsvcctl.dll", ExactSpelling = true, PreserveSig = false)]
-	[SupportedOSPlatform ("windows8.0")]
 	[Obsolete ("FhServiceStopBackup is deprecated and might not work on all platforms. For more info, see MSDN.")]
+	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fhsvcctl/nf-fhsvcctl-fhservicestopbackup")]
 	public static extern HRESULT FhServiceStopBackup ([In] FH_SERVICE_PIPE_HANDLE Pipe, [In] BOOL StopTracking);
 
 	[DllImport ("fhsvcctl.dll", ExactSpelling = true, PreserveSig = false)]
-	[SupportedOSPlatform ("windows8.0")]
 	[Obsolete ("FhServiceReloadConfiguration is deprecated and might not work on all platforms. For more info, see MSDN.")]
+	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fhsvcctl/nf-fhsvcctl-fhservicereloadconfiguration")]
 	public static extern HRESULT FhServiceReloadConfiguration ([In] FH_SERVICE_PIPE_HANDLE Pipe);
 
 	[DllImport ("fhsvcctl.dll", ExactSpelling = true, PreserveSig = false)]
-	[SupportedOSPlatform ("windows8.0")]
 	[Obsolete ("FhServiceBlockBackup is deprecated and might not work on all platforms. For more info, see MSDN.")]
+	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fhsvcctl/nf-fhsvcctl-fhserviceblockbackup")]
 	public static extern HRESULT FhServiceBlockBackup ([In] FH_SERVICE_PIPE_HANDLE Pipe);
 
 	[DllImport ("fhsvcctl.dll", ExactSpelling = true, PreserveSig = false)]
-	[SupportedOSPlatform ("windows8.0")]
 	[Obsolete ("FhServiceUnblockBackup is deprecated and might not work on all platforms. For more info, see MSDN.")]
+	[SupportedOSPlatform ("windows8.0")]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/fhsvcctl/nf-fhsvcctl-fhserviceunblockbackup")]
 	public static extern HRESULT FhServiceUnblockBackup ([In] FH_SERVICE_PIPE_HANDLE Pipe);
 }
@@ -568635,9 +568665,6 @@ using Windows.Win32.Foundation.Metadata;
 
 namespace Windows.Win32.Storage.FileHistory;
 
-[RAIIFree ("FhServiceClosePipe")]
-[InvalidHandleValue (-1L)]
-[InvalidHandleValue (0L)]
 [NativeTypedef]
 public struct FH_SERVICE_PIPE_HANDLE
 {
@@ -633851,15 +633878,15 @@ public interface IProvideWinSATAssessmentInfo : IDispatch
 {
 	[SpecialName]
 	[Documentation ("https://learn.microsoft.com/windows/win32/api/winsatcominterfacei/nf-winsatcominterfacei-iprovidewinsatassessmentinfo-get_score")]
-	unsafe HRESULT get_Score ([Out] float* score);
+	unsafe HRESULT get_Score ([Out][RetVal] float* score);
 
 	[SpecialName]
 	[Documentation ("https://learn.microsoft.com/w

... (diff truncated - see full artifact)

This comment is automatically updated on each push.

Relocate 51 emitted OS floors and the approved IEnumEventObject.Reset result contract. Capture the original Nla retval and preserve exact physical and native architecture controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Separate native SDK additions, approved preserved-result representation, immutable local producer, and required final CI artifact provenance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jevansaks Jevan Saks (jevansaks) changed the title Continue bounded header annotation migrations (checkpoint 1 of 3) Migrate ten more partitions to header annotations Oct 15, 2026
Jevan Saks (jevansaks) and others added 14 commits October 15, 2026 18:28
Adopt exact tested and CI-qualified c5879a7, including root43af342a3dd63803bf12a7c834cd0fd516df74ab. Canonicalize exactly82 owned OS marker prefixes across11 patches without changing floors or facts. Preserve the native stack, historical receipts and default-off native field inference; new checkpoint image grading follows this committed producer.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate every fresh source before removing selected common/x86/x64/arm64 inputs. Preserve all unselected bytes and record exact removed paths in existing provenance. Keep nine actual-function regression cases in PreparedSdkHeadersTests and compare the synchronized image literally with the real prior owning CI artifact. The59 applicable preparation and physical cases pass with no skips; the earlier raw-string draft is retained as failed evidence and corrected to the existing CSharp9 language setting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply only producer3e13f6f0879e2e01fc9f325e9293b2715646c903 above the qualified c587/43af owning history. Preserve the canonical SDK tree and existing logical enum contents. Keep DHCP_IP_ARRAY.Elements CountParamIndex0 and default-off native field inference pending separate activation. This source integration is not actual combined image, dependent closure or CI acceptance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply only producerf4e364953f7088798a56a3c60c060bdb5db9a1c7 after the paired3e13 source input. All23 return/direction/closure/literal mutation cases execute successfully on the synchronized runner. Architecture, native and actual full-image Network assertions remain pending central canonical production; no field activation or broad closure admission.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply only8d236a58dc348a52ab483d9959f3a7cba770b04f above qualified c587/43af and the ordered Network sequence. Union exact source preimages/partitions/patches without overwriting inherited inputs; native-only DeviceAccess and orphan HANDLE_SDP_TYPE are not admitted migrations. The following exact84df payload preserves complete authored invalid sets before any central image production.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply the exact84df8c8a1c4cfae13f3d734eca99334d27bbb6a5 correction immediately after8d236 source integration. Preserve [-1,0] for BluetoothFindRadioClose and BluetoothFindDeviceClose; do not narrow existing authored invalid contracts to zero. Canonical combined validation follows serial owner integration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply only5e90db00e6fd5490c3486de9035d3ab44991d8d5 into qualified c587/43af plus ordered Network/Device inputs. Preserve held DWM_SHOWCONTACT uint projection and EFFECTIVE_POWER_MODE_CALLBACK pointer-reduction encoding. WER cleanup targets native producers; measure physical HREPORT/HREPORTSTORE representation without invented handles or assumed type totals. Canonical closure and actual image grading remain pending.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply only8f8f3211f409aca39276abc9c5b5a7d0c6293763, not its private tooling merge, to qualified c587/43af plus ordered Network/Device/System inputs. Preserve signed Int32 FDICREATE_CPU_TYPE identity, values, order and one native-int use. Retain the undeclared MDM manual DLL row. Keep two private declaration expectations queued separately; the original117 expectations await actual combined central measurement.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply onlydd439da660ad50a0522fd1aee32c8f44296e5e5a, not its private43af tooling merge. Distinguish42 relocated OS rows from43 owned emitted OS targets and four unchanged shared BSTR RPC forwards. Preserve complete[-1,0] producer cleanup contracts, structural native handle rows, GetDeviceID=tbs.dll binding and held TBS/AMSI/source-floor residuals. Actual combined canonical image/closure/CI grading remains pending.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Surgically apply the frozen eight-file candidate above qualified c587/43af and serial Network/Device/System/Small/Service inputs: eleven WIN32_ERROR return associations, native ULONG AppStatus association and one Vista scope for exactly eleven functions. Preserve native RM_APP_STATUS identity/nine members/nonflags and the held sizeof-derived CCH_RM_SESSION_KEY row. Existing source/mutation runner executed197 passes; its one optional Service component fixture was not executed and remains a separate central gate. Architecture and actual image/closure/CI grading are still pending.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply only verified9cd27b6b07073bff4bf37f8e9765ee4c52557f89 above the ordered owning sequence, retaining c587/43af. Preserve HPSS invalid-only residual, native handle wrappers, global PSS_CAPTURE_FLAGS uint repair, four Monitor BOOL return repairs and Identity parser configuration. Move only the full HPSSWALK producer lifecycle contract. Source counts78/13/1 are not physical admission; seven anonymous coordinates provide no physical allowances. Canonical image/closure/CI gates remain pending.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bind simple aliases to the unique same-namespace enum member for the applicable architecture, preserving constant storage and rejecting ambiguous bindings. Cover native three-architecture emission, signed values, namespace isolation and the existing fourteen-member WER enum without changing SDK bytes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the retained Power enum namespace after moving its use into headers. Grade four verified synthetic handle removals, 23 native signatures, complete lifecycle transfers, 164 enum associations and exact native constant transport without weakening other physical metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve all original117 declaration expectations and add320 exact source-backed entries after complete physical grading. Correct Restart Manager namespace lookups, explicitly retain the unqualified DHCP array residual, and verify unary cleanup bindings on actual producer targets. Both independently sourced images pass76 actual gates and the primary passes14 SDK cases; final CI remains separate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jevansaks Jevan Saks (jevansaks) changed the title Migrate ten more partitions to header annotations Integrate bounded SDK header-annotation migrations Oct 16, 2026
@jevansaks

Copy link
Copy Markdown
Member Author

Superseded by #2365 for the full SDK patch and annotation-retirement review. Shared tooling remains in #2363. Published history and the additional local commits are preserved on recovery branches; no merge or branch deletion was performed.

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