Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Reading ID3 tags with Shell32

Reading ID3 tags with Shell32

Scheduled Pinned Locked Moved C#
csharpcomlinuxhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rob Tomson
    wrote on last edited by
    #1

    I came across this article http://www.codeproject.com/csharp/ShellID3TagReader.asp[^] and so I tried doing exactly as shown but it's not working. When the folder.GetDetailsOf function returns it's blank but I know for a fact that there this mp3 has an ID3 tag. Furthermore when I add the extra columns in Windows Explorer to see the mp3 info it doesn't display anything. Can my Shell32 be broken somehow? Here's the code I have (even though it's the same in the article): MP3File mp3File = new MP3File(); string fileName = FilePath.Substring(FilePath.LastIndexOf("\\") + 1); string filePath = FilePath.Substring(0, FilePath.LastIndexOf("\\")); Shell32.Shell shell = new Shell32.ShellClass(); Shell32.Folder folder = shell.NameSpace(filePath); Shell32.FolderItem folderItem = folder.ParseName(fileName); if(folderItem != null) { mp3File.FileName = fileName; mp3File.AlbumName = folder.GetDetailsOf(folderItem, 17); mp3File.ArtistName = folder.GetDetailsOf(folderItem, 16); mp3File.SongTitle = folder.GetDetailsOf(folderItem, 10); mp3File.TrackNumber = folder.GetDetailsOf(folderItem, 19); } folderItem = null; folder = null; shell = null; return mp3File; I'm using XPpro SP2. Please Help, Rob Tomson -- There are 10 kinds of people. Those who understand binary and those who don't.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups