How to query mediafile tag information with WMP object ?

I'm new to .NET and writing a simple application in VS 2005.

I need to query for bitrate,artist,title, etc information of mediafile (mostly mp3)

I look at Windows Media Player SDK documentation and see two ways:

1. add my mediafile to WMP media library and after that query its attributes

2. start playing my mediafile and immediately query attributes and stop playing

All two ways are no good in my opinion:

1. because we may do not have write access to user medialibrary (to perform cycle "add->query info->delete")

2. because user workstation may haven't got any sound devices at all and playing will fail. Second it's be very funny - start playing file to query his propertiesSmile

Is any other ways are exist? I.E.:

........

AxMediaPlayer.URL="C:\\myfile.mp3";

AxMediaPlayer.currentMedia.getItemInfo("Bitrate");

.........

[1038 byte] By [DDN] at [2008-1-4]
# 1
You might want to look into the Windows Media Format SDK, since this will -- at least, for WMA/WMV and MP3 files -- allow you to just do a simple metadata query like you want. But since this is the Media Foundation forum, you should probably direct any WMFSDK questions to the Windows Media SDKs newsgroup: http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/default.mspx?dg=microsoft.public.windowsmedia.sdk&lang=en&cr=US
BeckyWeiss-MSFT at 2007-10-3 > top of Msdn Tech,Audio and Video Development,Media Foundation Development...
# 2

Yes, thankyou!

Prior to asking here i do searching into Windows Media Player 10 SDK and won't find anything responsible to my question.

I'll take a look at WMF SDK and ask to community!

Last addon:

Thankyou very much! I found needed example (IWMMetadataEditor + IWMHeaderInfo3)

DDN at 2007-10-3 > top of Msdn Tech,Audio and Video Development,Media Foundation Development...