On Mon Apr 17 06:42:44 2023 +0000, Rémi Bernon wrote:
I don't see the same error with an IDL file but there's a couple of problems with widl and HMONITOR / void** types. It could be worked around the same way as for HANDLE, but I don't know if it's worth it?
Actually only HMONITOR is an issue, and it could be added to the same widl case as HANDLE, then something like that would work:
```C #ifdef __WIDL__ #pragma winrt ns_prefix #endif
import "windows.ui.composition.idl"; import "windows.graphics.capture.idl"; import "sdkddkver.h";
cpp_quote("#if 0") typedef HANDLE HMONITOR; cpp_quote("#endif /* 0 */")
[ uuid(3628e81b-3cac-4c60-b7f4-23ce0e0c3356) ] interface IGraphicsCaptureItemInterop : IUnknown { HRESULT CreateForWindow([in] HWND window, [in] REFIID iid, [out, iid_is(iid)] void **result); HRESULT CreateForMonitor([in] HMONITOR monitor, [in] REFIID iid, [out, iid_is(iid)] void **result); } ```