My company has a lot of old projects written in vb6. We have some reusable software components that are written in ATL / C ++. Now we are planning to rewrite our application using UWP, but it seems that UWP applications do not support the old COM technology. I am investigating if there is a way to implement a COM object that also supports UWP. I understand that porting older components to UWP components will work indefinitely. But we do not want to support two versions of the common components, because we supply many old programs, and we still provide software support. Some of these programs have been used by our customers for over 10 years. It is not possible to update all the software that we sent.
I came up with several possible solutions:
Table bridge
I found a phrase called "Packaged COM" that can be used by UWP applications using Desktop Bridge. This article, Support for a COM Server and OLE Document for Bridge Desktop , provides an example of invoking a COM exe server from a UWP application. This seems like a good solution if it also supports InProcessServer. I found something suspicious, InProcessServer , but it turns out that this is for WinRT compilers.
I also tried adding a COM link to the UWP project. The code can successfully reference a COM object. However, it does not work at runtime. The UWP application has its own registry hive, so the COM object that is registered in the system registry does not load. I want to say that if I add login information to a private UWP application hive and pack the COM DLL with the application, this might work. I just could not find a single example.
ATL / COM
bussinuess COM-. COM- UWP. WinRT - COM-, IInspectable, , COM- ATL UWP, IInspectable. , .
WRL
MSDN, COM- WRL, WRL COM , Win32, UWP.
:
Windows Runtime ++ (WRL) COM- , Universal Platform (UWP)
, WRL Microsoft. , , .
++/WinRT
, , WRL. , , , .
@Peter Torr:
(1) , app/COM "" UWP ( ), fullTrust UWP (aka Desktop Bridge), Desktop-? (2) COM- , ?
Windows
( , ). ,
, fullTrust UWP.
.
UWP.
COM- (UWP), ( vb6). COM- UWP COM , COM- ( ).