saltosystems/winrt-go

New to this but want to port runtimes api from Windows.Storage.Provider

hu13 opened this issue · 2 comments

hu13 commented

hi there. on a very high level, I understand that the go generator looks at Windows.Storage.winmd to generate the specify modules from there.

how do i find a new version of Windows.Storage.winmd file if MS added new structure or api in there?

for instance, //go:generate go run github.com/saltosystems/winrt-go/cmd/winrt-go-gen -debug -class Windows.Storage.Provider.IStorageProviderStatusUISource does not work.
The interface definition is here: https://learn.microsoft.com/en-us/uwp/api/windows.storage.provider.istorageproviderstatusuisource?view=winrt-26100

any ideas? thanks for the good work.

AFAIK there's no official source for the winmd files (if anyone knows of any please let me know). They are shipped with Windows and are located in C:\Windows\System32\WinMetadata.

Our metadata files are probably outdated and should be updated (WinRT classes are additively versionable, so updating the WinMD files should not affect the already generated code).

I've updated the metadata files in #99 to the newest I could find. Once it's merged the command you used should work as expected. Or you can test it in the branch if you wish.