in ComUtilities.cs [69:81]
internal unsafe static bool TryCreateComInstance(Guid clsid, CLSCTX clsctx, Guid riid, ComObject comObject)
{
MultiQueryInterface localQuery = new MultiQueryInterface()
{
InterfaceIID = new IntPtr(&riid),
IUnknownPointer = IntPtr.Zero,
ResultCode = 0,
};
var result = CoCreateInstanceFromApp(clsid, IntPtr.Zero, clsctx, IntPtr.Zero, 1, ref localQuery);
comObject.NativePointer = localQuery.IUnknownPointer;
return result.Success && localQuery.ResultCode.Success;
}