combase: Pass the correct destination context when unmarshaling using the standard marshaler.
This fixes an issue I ran into in UI Automation using an interface proxy marshaled with MSHCTX_INPROC
. CoUnmarshalInterface
always passes MSHCTX_LOCAL
when using the standard marshaler, regardless of what was passed to CoMarshalInterface
.
When passing an interface that uses the free threaded marshaler as an argument to a method on the proxy retrieved from CoUnmarshalInterface
, it passes MSHCTX_LOCAL
when trying to marshal, which the results in the free threaded marshaler trying to create a proxy/stub which fails.
Edited by Connor McAdams