Skip to content

Commit 2a5e7cc

Browse files
jevansaksCopilot
andcommitted
Fix cross-partition remaps, fn ptr direction, and suffix filter
- Fix fn ptr alreadyPointer pattern: when the prototype name has a P/LP prefix and the alias doesn't, remap alias→proto (not proto→alias). Added FnPtr_AlreadyPointer_AliasRemappedToPointerName test. - Fix suffix-adding remaps (GLUnurbs→GLUnurbsObj): filter out remaps where the typedef is longer than the tag and starts with the tag name, since the tag name is already the canonical name. Added SuffixAdding_Filtered test. - Add missing #include directives to 8 partition main.cpp files to resolve cross-partition typedef gaps (e.g., Security.WinTrust needs mssip.h for SIP_DISPATCH_INFO typedef). - Cross-partition consistency check tracks header file paths and generates actionable error messages with specific #include suggestions. - Add RuntimeIdentifier to test project for native lib resolution. - Remove 12,197 manual --remap entries and 160 fn ptr fixups (kept as auto-discovered). 526 genuinely manual entries remain. - Winmd identical to baseline (24,328,704 bytes), 0 errors, 0 consistency errors, all 39 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 65bbe3d commit 2a5e7cc

17 files changed

Lines changed: 298 additions & 133 deletions

File tree

generation/WinSDK/Partitions/Direct2D/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@
2424
#include <d2d1effects_1.h>
2525
#include <d2d1effectauthor_1.h>
2626
#include <d2derr.h>
27+
#include <dwrite.h>

generation/WinSDK/Partitions/IpHlp/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
#include <iphlpapi.h>
1919
#include <fltdefs.h>
2020
#include <ipinfoid.h>
21+
#include <inaddr.h>

generation/WinSDK/Partitions/NetMgmt/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
//#include <routprot.h> -- won't compile because it includes stm.h which is missing a type
3636
#include <rtinfo.h>
3737
#include <rtutils.h>
38+
#include <wincrypt.h>

generation/WinSDK/Partitions/RRas/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ extern "C" {
1919
}
2020
#include <rtmv2.h>
2121
#include <raserror.h>
22+
#include <inaddr.h>

generation/WinSDK/Partitions/Security.Cryptography.Sip/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ typedef struct _OLD_LARGE_INTEGER {
2828
#include <winbase.h>
2929
#include <winnt.h>
3030
#include <mssip.h>
31+
#include <mscat.h>

generation/WinSDK/Partitions/Security.WinTrust/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ typedef struct _OLD_LARGE_INTEGER {
3131

3232
#include <wintrust.h>
3333
#include <softpub.h>
34+
#include <mssip.h>

generation/WinSDK/Partitions/TermServ/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@
3434
#include <wtsprotocol.h>
3535
#include <rdpappcontainerclient.h>
3636
#include <remotesystemadditionalinfo.h>
37+
#include <winsock.h>

generation/WinSDK/Partitions/Wsw/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88

99
#include <webservices.h>
1010
#include <icontentprefetchertasktrigger.h>
11+
#include <schannel.h>

generation/WinSDK/scraper.settings.rsp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ _SdpAttributeRange=SdpAttributeRange
284284
NDR_CCONTEXT=IntPtr
285285
_NDR_SCONTEXT=NDR_SCONTEXT
286286
RO_REGISTRATION_COOKIE=IntPtr
287-
PEXCEPTION_ROUTINE=EXCEPTION_ROUTINE
288287
__MIDL___MIDL_itf_ads_0000_0000_0001=ADSTYPE
289288
__MIDL___MIDL_itf_audioenginebaseapo_0000_0011_0001=AudioFXExtensionParams
290289
_InlineInterlockedAdd64=InterlockedAdd64
@@ -692,3 +691,9 @@ _EXPERIMENTAL2_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS=EXPERIMENTAL2_WEBAUTHN_
692691
_EXPERIMENTAL2_WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS=EXPERIMENTAL2_WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS
693692
_EXPERIMENTAL2_WEBAUTHN_PLUGIN_CREDENTIAL_DETAILS=EXPERIMENTAL2_WEBAUTHN_PLUGIN_CREDENTIAL_DETAILS
694693
_EXPERIMENTAL2_WEBAUTHN_PLUGIN_USER_VERIFICATION_REQUEST=EXPERIMENTAL2_WEBAUTHN_PLUGIN_USER_VERIFICATION_REQUEST
694+
ID3DInclude=ID3D10Include
695+
in6_addr=IN6_ADDR
696+
in_addr=IN_ADDR
697+
_CONTEXT=CONTEXT
698+
NET_ADDRESS_INFO_=NET_ADDRESS_INFO
699+
_EXCEPTION_RECORD=EXCEPTION_RECORD

scripts/DoTests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ Write-Host "*** Running metadata utils tests..." -ForegroundColor Blue
1515
dotnet test "$PSScriptRoot\..\tests\MetadataUtils.Tests" -c Release
1616
ThrowOnNativeProcessError
1717

18+
Write-Host "*** Running scraper discovery tests..." -ForegroundColor Blue
19+
20+
dotnet test "$PSScriptRoot\..\tests\Win32MetadataScraperTests" -c Release
21+
ThrowOnNativeProcessError
22+
1823
& $PSScriptRoot\TestWinmdBinary.ps1 -SkipInstallTools

0 commit comments

Comments
 (0)