-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated metadata is missing values #1837
Comments
Looks like the scraper may not be able to parse the constant directly but is hardcoded to only deal with the macros like win32metadata/sources/MetadataUtils/ConstantsScraper.cs Lines 40 to 42 in 3d2ba1e
|
Spoke to @riverar - he's taking a look. |
The property key above (implicit PID of 0) is actually getting parsed correctly. Here's the intermediate output: [NativeTypeName("const PROPERTYKEY")]
public static readonly PROPERTYKEY my_prop_key = new PROPERTYKEY
{
fmtid = new Guid(0x89f1fe39, 0x3acc, 0x4b73, 0x88, 0x8d, 0x3f, 0x70, 0xb1, 0x6f, 0x32, 0xac),
}; But it's not making it into the .winmd, which is odd. Investigating that now. |
Related: #1337 I don't know why the tooling goes through the C# tree, grabs the fields, seemingly drops them on the floor, then runs through the headers with regex. But we can fix this up as Kenny suggested. |
so is this a bug? I thought I was doing something wrong :) anyway it's not a real blocker for us, I can add these properties manually. but I'd appreciate if you can fix that in the future. |
Hello,
I am trying to generate the winmd metadata for some .h file which has a non-primitive const variable of type PROPERTYKEY (part of the namespace Windows.Win32.UI.Shell.PropertiesSystem) and defined in the wtypes.h file of the Windows SDK.
I am following the instructions as documented here and these variables are missing from my metadata. Other kids of variables are successfully generated, such as
EXTERN_C const GUID my_guid = {0x89f1fe39, 0x3acc, 0x4b73, 0x88, 0x8d, 0x3f, 0x70, 0xb1, 0x6f, 0x32, 0xac};
What am I doing wrong? Should I add anything specific in the .proj file for this kind of type? I do see properties in the Windows.win32 metadata so I guess it should be possible.
Thanks a lot,
Ghila
The text was updated successfully, but these errors were encountered: