Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COM interface binding generation fails with HWNDs #3325

Open
talagrand opened this issue Oct 15, 2024 · 3 comments
Open

COM interface binding generation fails with HWNDs #3325

talagrand opened this issue Oct 15, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@talagrand
Copy link

talagrand commented Oct 15, 2024

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

@talagrand talagrand added the bug Something isn't working label Oct 15, 2024
@kennykerr
Copy link
Collaborator

Please attach the .winmd for the repro.

@talagrand
Copy link
Author

Attached
Stuff.Mydk.zip

@kennykerr
Copy link
Collaborator

Thanks, I believe I have this fixed in a working branch but I'll confirm with this repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants