Skip to content

Zero GUID when unknwn.h is not included #1186

@mcooley

Description

@mcooley

Before #1180, this code successfully prints the GUID of ICompositorInterop. After #1180 it prints {00000000-0000-0000-0000-000000000000}:

#include <winrt/Windows.UI.Composition.h>
#include <windows.ui.composition.interop.h>

int main()
{
    printf("GUID for ICompositorInterop: %ls\n", winrt::to_hstring(winrt::guid_of<ABI::Windows::UI::Composition::ICompositorInterop>()).c_str());
}

C++/WinRT should just work in this case, or tell me that I need to include unknwn.h before including winrt/base.h.

Maybe the MSVC part of #1180 should be reverted, since it might not be needed? Maybe the fallback definition of guid_v should trigger an error when it's used?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions