0

Hi!
I am trying to find the length of a video file using the following code:

Microsoft.DirectX.AudioVideoPlayback.Video video = new Microsoft.DirectX.AudioVideoPlayback.Video(path); 
StringBuilder sb = new StringBuilder(); 
sb.Append(video.Caption); sb.Append("\r\n"); 
sb.Append(video.Size.Width.ToString()); 
sb.Append( "\r\n"); sb.Append(video.Size.Height.ToString()); 
sb.Append("\r\n"); sb.Append(video.Duration.ToString()); 
textBox1.Text = sb.ToString();

But in order to use this code I need to add reference to "Microsoft.DirectX.AudioVideoPlayback.dll" file.

But I am unable to do so. On running the code it says "unable to load the file".

I am clueless.

Is the DLL file corrupt or I am missing something.

Please Help!

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Fortinbra
0

>But I am unable to do so.

So you have a problem on adding reference of external component (dll). Isn't it? Just copy that .dll file into Bin under the root of your web-app.

0

Hi!
I tried that also.
I copied the .dll file and pasted in the bin folder of my web-app but still it is not loading.
However I don't have a root folder in my web-app.
What should I do now?

0

How can you not have a root folder in your web app? The root folder is the base folder for your app. It's the folder where your entire app is stored. And there are some DLLs that for whatever reason, just won't load with ASP.NET.

Make sure your version of Direct X is current as well, it may be dependent on other DLLs, and you'll need references to those to use it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.