eigenein
eigenein

Reputation: 2200

Problem using registration-free COM library

I want to use an unmanaged COM library (specifically, Skype4COM) in a managed application without registering of this library. My steps were:

tlbimp Skype4COM.dll /out:Skype4COMWrapper.dll /namespace:Skype4COMWrapper
mt -tlb:Skype4COM.dll -dll:Skype4COM.dll -out:Skype4COM.dll.manifest

Then I've referenced Skype4COMWrapper.dll in my application and put the Skype4COM.dll.manifest together with the application executable file. Everything was built successfully, but when I try to use the unregistered library I get 80040154 error ("Class not registered").

I've also looked in Skype4COMWrapper.dll and ensured that it contains COM manifest entries.

What have I missed?

Upvotes: 2

Views: 504

Answers (2)

eigenein
eigenein

Reputation: 2200

It seems that I've solved the issue. What have I done:

tlbimp Skype4COM.dll /out:Skype4COMWrapper.dll /namespace:Skype4COMWrapper
mt -tlb:Skype4COM.dll -dll:Skype4COM.dll -out:Skype4COM.dll.manifest

Then I've referenced Skype4COMWrapper in my app, created a new application manifest app.manifest and added the following dependency right before the closing </asmv1:assembly> tag:

<dependency>
  <dependentAssembly>
    <assemblyIdentity type="win32" name="Skype4COM.dll" version="1.0.36.0"
      processorArchitecture="x86" />
  </dependentAssembly>
</dependency>

Skype4COM.dll and Skype4COM.dll.manifest were put together with the application executable file.

Upvotes: 2

Andrey
Andrey

Reputation: 60085

I also struggled with that issue. Something is just broken in latest Skype4Com library and you can't make it registration-free. I managed to install it with one single msi and it is the best that I achieved. Check this forum, it helped me a lot: http://community.skype.com/t5/Public-API/bd-p/Public_API

Upvotes: 1

Related Questions