How to use legacy COM component from metro app

2020-06-06 01:05发布

问题:

I'm getting hard time to use COM objects in a metro app. As stated in MSDN the rules are:

  1. Only registration free COM objects can be used
  2. The COM can use only those APIs which are allowed for metro apps.

But my CoCreateInstanceFromApp always returns REGDB_E_CLASSNOTREG. In desktop applications an error is written into the event log that SideBySide execution fails. But in metro application no such error is written into the event log.

I can use the same COM object from a desktop application as registration free over the similar manifest file.

Am I missing something? Can anyone please help me out?

Thanks