2020年11月4日 星期三

C# Windows Media Player control COM component failed to play ANY video files

I have fixed the issue which .NET win form failed to play video file with COM component windows media player control.
The error was raised while wmp control invokes d3d9.dll ( Direct 3D 9 runtime ) because I checked out in the windows event manager : 

Faulting application name: WindowsFormsApp1.exe, version: 1.0.0.0, time stamp: 0xf57ea874
Faulting module name: D3D9.DLL, version: 10.0.17763.1075, time stamp: 0x3cad74b1
Exception code: 0xc0000005
Fault offset: 0x000479ff
Faulting process id: 0x1d94
Faulting application start time: 0x01d6b2c1a4facaac
Faulting application path: C:\Users\A30336\OneDrive\Project\Jack Yeh\YehProject\WindowsFormsApp1\WindowsFormsApp1\bin\Debug\WindowsFormsApp1.exe
Faulting module path: C:\Windows\SYSTEM32\D3D9.DLL
Report Id: 004f8352-5e8b-4cda-a346-b278d57514db
Faulting package full name: 
Faulting package-relative application ID: 
And this error resembles the below issue : media player won't play any video file.

Link you gave me assumes i have access violation which i dont.

Besides windows media player, everything else works, games, 3d modeling software to name a few.

I was able to transfer DLL files from another computer and it fixed the problem.

I had to use Unlocker to delete original once and then place good once inside and reboot.

How ever, upon checking checksum of both and comparing them, they were identical.

I am clueless what went wrong and what fixed it because everytime my computer restarts, system is being restored to its original state. I did disabled that feature while i was replacing DLL's

Not sure what to conclude here.


At first, I supposed the DirectX is broken. or wrong linked library for media player control. I can play video file with Windows Media Player but it failed to play in my win form program media player control. So I downloaded latest DirectX redistribution :

DirectX RunTime_Jun2010_redist
Despite it doesn't help. I kept googling and then I got a clue here.

I downloaded and installed the DX Setup app you referenced. The installer reported that it was successful. I restarted my PC, and I still get the same d3d9.dll errors on *any* DX9 app. It turns out, however, I have found the problem. This problem has existed since Win7 was released. d3d9.dll (6.x-10.x) is brittle and poorly written apps can screw with it, causing subsequent dx9 apps to crash. In my case, it was one of the ASUS motherboard monitoring apps that came with my motherboard. Once this app was stopped (it ran fine), other dx9 apps started working perfectly. This was a constant problem for me because I had the monitoring app running on startup.

Solved : I guessed the issue came from wrong file invoking link or broken DLL files. So that I tried to reinstall display chip drivers which contains all the Direct3D or and other related DLLs. My display chip is AMD Radeon HD 8500M/8700M family. So that I checked the AMD website and downloaded , then installed AMD Radeon™ Software Adrenalin 2020 Edition.
I restarted computer. And open my .NET win form program to play video file with WMP COM component. Eventually it works.

沒有留言: