Been trying this for a while now. All solutions I've seen on the net don't seem to work, specially the really simple way to do it.
WMPLib.WindowsMediaPlayer c = new WMPLib.WindowsMediaPlayer();
IWMPMedia i = (IWMPMedia)c.currentMedia;
c.currentMedia is always null.
It seems that new WMPLib.WindowsMediaPlayer(); is always creating a new instance of the Windows Media Player. First I thought it was the fact that I was running visual studio as Administrator, but changing that did not help.
Seems I somehow have to connect to the running instance of wmplayer.exe but have unable to find a way to do that.
Btw. What I need is a full file url for the current playing song (or fullurl if streaming, but that's the least of my concerns now.)