Skip to content

COM interface binding generation fails with HWNDs #3325

Open

Description

Summary

This is a regression sometime between 0.48 and 0.58.

Given the following IDL file, compiled with midl + generated winmd, creating Rust bindings fails because the bindings refer to the HWND and HANDLE types which have not been imported or defined.

import "objidl.idl";

[ object, uuid(12345661-1223-1232-2233-134344444444), pointer_default(unique) ]
interface IAmAnInterface : IUnknown
{
    HRESULT PopWindow([in, unique] HWND parentWindow);
}

A minimal repro is attached. It requires nuget.exe in the path, available from nuget.org, and dotnet.exe (v.8) as well.

mydk.zip

Crate manifest

No response

Crate code

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions