displaying embedded cover art in wma file
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
displaying embedded cover art in wma file

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK
Author Message
Frank Peters
Guest





Posted: Tue Sep 21, 2004 1:04 am    Post subject: displaying embedded cover art in wma file Reply with quote

I am getting a runtime error trying to retrieve the WM/Picture metadata
from my test wma file.

ERROR when executing: pic = media.getItemInfoByType("WM/Picture", "", 0)

An unhandled exception of type 'System.ArgumentException' occurred in
WindowsApplication2.exe
Additional information: The parameter is incorrect.

Here is a snippet from my code

Any help would be greatly appreciated

Thanks
John

Imports WMPLib.WindowsMediaPlayerClass



Public Class Form1
Inherits System.Windows.Forms.Form
Dim AlbumName As String
Dim ArtistName As String
Dim SongName As String
Dim Path As String
Dim WithEvents mplayer As WMPLib.WindowsMediaPlayer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

mplayer = New WMPLib.WindowsMediaPlayer
mplayer.URL = Path.Text
mplayer.controls.play()

Dim media As WMPLib.IWMPMedia3
media = mplayer.newMedia(Path.Text)

** These calls succeed **
AlbumName.Text = media.getItemInfo("WM/AlbumTitle")
ArtistName.Text = media.getItemInfo("Author")
SongName.Text = media.getItemInfoByType("Title", "", 0)

Dim pic As WMPLib.IWMPMetadataPicture
** The following call causes the error:
System.ArgumentException
The parameter is incorrect.
**
pic = media.getItemInfoByType("WM/Picture", "", 0)

Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB