I think the proxy/stub sections of these two articles targeting Windows Runtime Components under UWP are the best solutions I'll get. It's essentially the same as the old way of doing it.
https://learn.microsoft.com/en-us/previous-versions/windows/apps/dn169426(v=vs.140)