Well I decided to test out the Windows Media Player Com object as my colleague claimed it wasn't working for him. I thought it would be just some sort of small logic error, and whacked out the VS 2005 and made my own small VB.NET application. It seems the whole COM library is remotely useless (from my perspective). I have only seen some functionality, and when I have I haven't been able to get what I am most interested in (well what my friend is interested in), the Song Title name.
Some things rant about:
1) You can read the volume value, as demonstrated here:
CODE
Dim mpInstance As New WMPLib.WindowsMediaPlayer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim kthx As Double = mpInstance.settings.volume
MessageBox.Show(kthx)
End Sub
But if you try and set it, it totally ignores the value you give it, doesn't give an error, doesn't give any sort of indication that it didn't work apart from the obvious fact it didn't. I don't understand why it and a lot of other values weren't marked ReadOnly.
2) Nothing wants to work! I have tried pausing a song, like so,
mpInstance.controls.pause(), but it totally ignores the subroutine. No exceptions. No information.
3) When I try to get the song title, I am actually given a exception.
CODE
MessageBox.Show(mpInstance.currentMedia.name)
The above the function will claim the mpInstance's Object reference was not set to an instance of an object. I protest this claim, as I have used the New keyword to give it an object reference.
So to conclude this, as anybody tried using the wmp.dll Com Object without any errors? Is the code above correct? Thanks in advance.