saltosystems / winrt-go

MIT License
35 stars 14 forks source link

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

Closed hu13 closed 1 week ago

hu13 commented 2 weeks ago

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.

jagobagascon commented 1 week ago

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).

jagobagascon commented 1 week ago

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.