Mykroft
Mykroft

Reputation: 13415

How do I play a video through .net in windows 7

I had setup an app to play a video using the library suggested here this worked great for me for a long time until my machine was upgraded. In windows 7 I get the following exception that I'd never seen under XP:

`System.BadImageFormatException:  is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
    at MainApp.Controls.MediaControl.StopVideo()
    at System.Windows.Forms.Form.WmClose(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)`

I've installed the June 2010 DirectX SDK and I'm still getting this error. Is there a different library I should be using or some setting that needs to be changed?

Upvotes: 0

Views: 337

Answers (1)

Evgeny Gavrin
Evgeny Gavrin

Reputation: 7825

I belive you are using x64 system. It looks like you're using a version that is compiled for x86 instead of x64. Try grabbing a new version from the directx website and make sure to include the x64 version in the program you're running. And rebuild your library.

Upvotes: 2

Related Questions