microsoft / microsoft/win32metadata

Annotate struct size fields in metadata

Open
#2,202 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.5k
Forks
149
Avg merge
5d 16h
Merged PRs (30d)
4

Description

It is common in windows API to have a "sizeof" field in a struct (usually called `dwSize`) for versioning. I believe metadata can introduce a new `[SizeOf]` attribute or similar and annotate such fields with it. Generators using metadata can then account for that attribute and automatically assign right value to the annotated field. For instance, CsWin32 can do that in a friendly function overload

Contributor guide

Open the contributing guide

Research direction

Begin with the metadata model and the generators that consume it, then determine how a proposed SizeOf annotation would be represented and surfaced to CsWin32. Done means metadata can mark struct size fields and generators can use that marker to assign the appropriate value in a friendly overload.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.