Skip to content

Generate correct IIDs for parametrized interfaces #4

@Boddlnagg

Description

@Boddlnagg

For parametric interface types such as AsyncOperationCompletedHandler<TResult>, the SDK header files include definitions of all used specializations of the generic parameter, together with IIDs. These IIDs are deterministic and I was wondering where they are coming from, so I found this blog post, especially the section on "Generic Interfaces" is helpful. The key is the function RoGetParameterizedTypeInstanceIID.

I will probably add that metadata API to my winapi PR, but since the idea was to generate the bindings with some F# or C# program, it's not that important. Some comments also indicate that the API might only be usable from within a Windows Store App, so of course the best thing would be to know the algorithm used to generate those IIDs (see also the last paragraph of the blog post: The somewhat problematic thing about this is this might be difficult to include in a compiler, because the APIs are only available on Win8, so there's no way to generate the GUIDs from a older version of Windows. It'd be nice if Microsoft provided information on how those GUIDs are constructed so other tools that run on other Windows platforms can cross-build for Win8.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions