Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
This may sound like a stupid question, but hopefully somebody can clarify this issue for me.

Say if you add a reference to your VB.NET application.
(e.g. Microsoft.DirectX.AudioVideoPlayback.dll )

Does the user (once the application has been built and deployed) have to have a certain DirectX version installed on their machine, and if so what version? Does it depend on the SDK version?

Also would you recommend using DirectX or Windows Media Player for playing a wide range of media sounds?
Posted
Comments
ZurdoDev 6-Jul-12 13:43pm    
If you look at the properties for your reference, there is a property named Copy Local. If set to True, when you do a build the dll reference will be copied to your output folder so they will not need it separately installed. If it; however, depends on other products they will need them installed.
Willtwinny 6-Jul-12 14:02pm    
I am confused, so are you saying the component doesn't have a property named 'Copy Local' then the product needs to be installed on the machine?

It is just I can't seem to find a property called 'Copy Local' on any of my references that I have added yet.

1 solution

When you add a dll to your project and you want to deploy your application to another machine, that same dll has to be in the GAC or in the bin. Here are instructions on how to put your dll in the bin (this is called a bin deploy):

http://msdn.microsoft.com/en-us/library/t1zz5y8c.aspx[^]

However, this only works well for files that have very little in the way of dependencies. You cannot, for instance, bin deploy .NET 4.0. Even bin deploying MVC3 can be tricky, as you can see here:

http://www.hanselman.com/blog/BINDeployingASPNETMVC3...[^]

Your best solution, in almost all cases, is to have framework and system dlls installed the right way in the GAC. The DirectX dlls are in that category.

As for Windows Media versus DirectSound, I would say that depends on what you are most comfortable with. I am not terribly familiar with using the two, but I believe Windows Media uses DirectSound so there shouldn't be a difference between the two as far as what they can play.
 
Share this answer
 
Comments
Willtwinny 6-Jul-12 14:32pm    
So as long as your dll is in the bin folder, you are fine?
So say (for example) if you have a Adobe Shockwave dll in your bin folder, the user on another machine doesn't have to have Adobe Shockwave installed on their computer?
Tim Corey 6-Jul-12 14:35pm    
Most likely that file would have dependencies on other dlls. Also, when you start looking to distribute third-party dll files with your project, you have to look at licensing agreements to be sure that it is allowed. Most software does not allow you to include their dll files with your project. In this case, you probably need to require Shockwave to be installed. I doubt Adobe would let you distribute their dll without installing their full application. I could be wrong though.
Willtwinny 6-Jul-12 14:55pm    
Fantastic!
This has helped me a lot. Thank-you for answering my question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900