The project uses a sophisticated pipeline to transform C/C++ Win32 headers into a structured .winmd file. Understanding these core concepts is essential for working with the metadata:
Partition-based Namespaces
The Win32 API is organized into approximately 240 partitions. Each partition maps specific header files to a logical Windows.Win32.* namespace, providing a structured way to navigate thousands of APIs.
Multi-Architecture Scraping
To handle architecture-specific type differences, headers are scraped independently for x64, x86, and arm64. A CrossArchTreeMerger then combines these into a unified representation, applying [SupportedArchitecture] attributes to relevant types.
Layered Configuration
Configuration follows a hierarchy from general to specific:
baseSettings.rsp (SDK-provided)scraper.settings.rsp (Project-wide)- Individual partition
settings.rsp (Per-partition customization)
Manual Overrides
For complex APIs that automated tools like ClangSharp cannot handle correctly (such as certain COM interfaces or complex DirectX types), the project maintains a manual/ folder containing hand-written C# files to ensure accuracy.