[Port] Type.GetTypeFromCLSID() and Type.GetTypeFromProgID()
- System.Type::Type.GetTypeFromCLSID(Guid, string, bool)
- System.Type::Type.GetTypeFromProgID(string, string, bool)
Irrelevant to porting-from-Android effort as it's interop. Long term, we would need for console apps.
Can now create type. Need to make CreateInstance() work by filling in the "NotImplemented" site at:
https://github.com/dotnet/corert/blob/nmirror/src/System.Private.Reflection.Core/src/System/Reflection/Runtime/MethodInfos/RuntimeClsIdNullaryConstructorInfo.cs#L61
Reflection side is done. The instantiation side should be on the interop side.
Ideally, the approach would be for S.P.Interop.dll to expose a method like McgMarshal.CoCreateInstanceEx(Guid clsid, string server) and replace the NYI site at (https://github.com/dotnet/corert/blob/nmirror/src/System.Private.Reflection.Core/src/System/Reflection/Runtime/MethodInfos/RuntimeClsIdNullaryConstructorInfo.cs#L61) with a call to it.
S.P.Interop can then do the appropriate actions on Win32/WinRt/Unix and S.P.R.Core can remain platform agnostic.
This might be helpful for UWP applications but the value is pretty low. There are only a handful of CLSIDs that are whitelisted under HKLM\Software\Microsoft\WindowsRuntime\AllowedCLSIDs supported through CoCreateInstanceFromApp. The most interesting ones are probably DirectX COM objects which are already wrapped by popular libraries such as as SharpDX.
@AtsushiKan Can you change it to PNSE for now?
We just had a customer report this missing API so we probably should just go ahead and implement it. @shrah Can you take a look?
Sure, I'll look into it.