ComWrappers: Add support for ICustomQueryInterface (#34733)
authorAaron Robinson <arobins@microsoft.com>
Fri, 10 Apr 2020 22:31:50 +0000 (15:31 -0700)
committerGitHub <noreply@github.com>
Fri, 10 Apr 2020 22:31:50 +0000 (15:31 -0700)
commite755ce1e110decac70a121aafb3f3e467c5f1869
tree26bc0a3174c9b3d2193aeacecde72774403c3c70
parent16b24da8e81a0e9379478a4be0c5d9411869fab8
ComWrappers: Add support for ICustomQueryInterface  (#34733)

* Add support for falling back to ICustomQueryInterface if the managed object wrapper
 doesn't know about the IID but implements the interface.

* The QI on the managed object wrapper is now callable from within the runtime.
This means we can no longer assume we are in preemptive mode during the QI.
Update the ICustomQueryInterface dispatch to be okay with ANY mode.
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs
src/coreclr/src/interop/comwrappers.cpp
src/coreclr/src/interop/comwrappers.hpp
src/coreclr/src/interop/inc/interoplibimports.h
src/coreclr/src/vm/interoplibinterface.cpp
src/coreclr/src/vm/metasig.h
src/coreclr/src/vm/mscorlib.h
src/coreclr/tests/src/Interop/COM/ComWrappers/API/Program.cs
src/coreclr/tests/src/Interop/COM/ComWrappers/Common.cs