Detecting whether WMP is playing
Hi,
I am writing an app to turn my PC off after a determined time has passed.
Part of the functionality I also want to include is to automatically shut down once Windows Media Player has finished playing a file.
For this, I need to be able to detect when a file has finished playing, or the length of the file currently being played.
I have looked at windows messaging with pInvoke, but cannot find a suitable message to get the correct parameters (using spy++).
I have also looked at detecting fullscreen mode, before I realised WMP now stays fullscreen even when the file has finished.
Could anyone offer any suggestions on how this could be done?
Thanks in advance,
Joe
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Lalit MRank #1,186 · 1.5K reputationPosted Mar 19, 2010, 3:54 AM EDT
http://msdn.microsoft.com/en-us/library/cc838192%28VS.95%29.aspx