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!

Recommended Answers

All 3 Replies

>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.

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?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.