http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=199777 没有问题Option Explicit'引用Microsoft Shell Controls And Automation Private Sub Command1_Click() MsgBox getfilePTY("f:\music\u\七里香.wma") End Sub
Function getfilePTY(strFl As String) As String Dim fso 'As FileSystemObject Dim fl 'As Scripting.File Dim pth As String Dim flname As String
Dim shl As Shell32.Shell Dim shfd As Shell32.Folder Dim s As String Dim i
'Set fso = New FileSystemObject Set fso = CreateObject("scripting.filesystemobject") Set fl = fso.GetFile(strFl) pth = fl.ParentFolder.Path flname = fl.Name
Set shl = New Shell Set shfd = shl.NameSpace(pth)
For i = 0 To 33 If shfd.GetDetailsOf(0, i) <> "" Or shfd.GetDetailsOf(shfd.Items.Item(flname), i) <> "" Then s = s & shfd.GetDetailsOf(0, i) & ": " & shfd.GetDetailsOf(shfd.Items.Item(flname), i) & Chr(10) End If Next i
察看其偏移量。
http://www.microsoft.com/windows/windowsmedia/format/asfspec.aspx也不难,下载那个800多K的DOC文件,按它的格式说明写个过程,就可获取艺术家、标题、备注……等信息,我就写过一个,感觉ASF比MP3的信息详细多了。
没有问题Option Explicit'引用Microsoft Shell Controls And Automation
Private Sub Command1_Click()
MsgBox getfilePTY("f:\music\u\七里香.wma")
End Sub
Function getfilePTY(strFl As String) As String
Dim fso 'As FileSystemObject
Dim fl 'As Scripting.File
Dim pth As String
Dim flname As String
Dim shl As Shell32.Shell
Dim shfd As Shell32.Folder
Dim s As String
Dim i
'Set fso = New FileSystemObject
Set fso = CreateObject("scripting.filesystemobject")
Set fl = fso.GetFile(strFl)
pth = fl.ParentFolder.Path
flname = fl.Name
Set shl = New Shell
Set shfd = shl.NameSpace(pth)
For i = 0 To 33
If shfd.GetDetailsOf(0, i) <> "" Or shfd.GetDetailsOf(shfd.Items.Item(flname), i) <> "" Then
s = s & shfd.GetDetailsOf(0, i) & ": " & shfd.GetDetailsOf(shfd.Items.Item(flname), i) & Chr(10)
End If
Next i
getfilePTY = s
End Function