RegFree COM: CoClass should return an object instance of a type from another assembly

88 Views Asked by At

I am able to successfully achieve RegFree COM using application manifest as OneToOne relationship means there's no dependency for my SideBySide assembly that my native application to be aware of. I am able to instantiate, do call etc., without any problem.

And now, I tried to add one dependency to my existing SxS assembly to return that interface object to native application from the depending assembly. Here's my structure after adding a dependency to TlbTest.dll to return IDep from TlbTestDep.dll assembly.

ProjectStructure

When I launch the application, I started facing the SideBySide error as below.

Am I missing something ? How to get this working. As we need to go without registration. We have multiple version of software to be installed in the same system. Can anyone please help on this ?

Error

Contents of DelphiProgram.exe.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

 <dependency>

   <dependentAssembly>

     <assemblyIdentity
       name="TlbTest"
       version="1.0.0.0"
       processorArchitecture="x86"
      />

   </dependentAssembly>

 </dependency>

</assembly>

Contents of TlbTest.dll -> app.manifest

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
    
    <assemblyIdentity version="1.0.0.0" 
                      name="TlbTest"
                      processorArchitecture="x86"/>
    
    <clrClass clsid="{4BA0A087-3D5F-4BE9-8629-2C1C42674487}"
              runtimeVersion="v4.0.30319"
              threadingModel="Both"
              progid="TlbTest.Service"
              name="TlbTest.Service"></clrClass>
    
</assembly>


0

There are 0 best solutions below