Deploying applications with references to COM components

Dave

Newcomer
Joined
Jan 19, 2003
Messages
23
What files need to be distributed when deploying an application with a COM component? For example, if I create a project with a reference to Windows Media Player (wmp.dll) a file called Interop.WMPLib.dll appears in my bin folder. Does only this need to be distributed or wmp.dll too?
 
windows media player will need to be installed on the computer running your software - wmp.dll will then be installed simply distributing this DLL will not do the trick

Andy
 
How do you distribute an assembly?
I have the same problem with interop.sqldmo.dll
This is a file to search all the available servers in your domain.
When I install my application on an other computer I always get an error that that dll is not registered or validated.

How can I solve this problem?
 
You need to include the dll in your setup project so it gets installed on your user's system. Further, since it is a COM dll and requires registering, you need to mark it as such in your setup project. There is usually a per-file setting that you can change to "self register" or similar.
 
Thanks, I will try it again tomorrow at work. I already tried this, I'll give it another go.
The problem occurs on an NT 4 computer, but works on a 2000 computer.
Could there be another problem?
 
I can't think of one - unless your dll in turn references another dll which needs to be present.
 
Back
Top