1

我正在使用 shell32.dll 来检索文件的扩展属性。我的文本框将显示文件的每个属性(iCollumn -1 到 300),但不会显示 framewidth 或 frameheight(以及许多其他属性)。

有没有办法使用 shell32.dll 获得这些?如果没有,是否有替代方法来获取这些缺失的属性?

注意:我在 Windows 资源管理器中显示了扩展,我的项目引用了 Microsoft shell 控件和自动化。

代码:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim objShell As Shell32.Shell
    Dim objFolder As Shell32.Folder

    objShell = New Shell32.Shell
    objFolder = objShell.NameSpace("C:\Users\Sam\Videos")

    If (Not objFolder Is Nothing) Then
        Dim objFolderItem As Shell32.FolderItem
        objFolderItem = objFolder.ParseName("Kick_Ass.avi")

        If (Not objFolderItem Is Nothing) Then
            Dim szItem As String
            szItem = objFolder.GetDetailsOf(objFolderItem, 168)
        End If


        For i = -1 To 300
            TextBox1.Text += i & “: ” & objFolder.GetDetailsOf(objFolderItem, i) & vbCrLf
        Next


        objFolderItem = Nothing
    End If

    objFolder = Nothing
    objShell = Nothing
End Sub

输出(为了空间我只显示了没有显示的结果):

-1: Item type: VLC media file (.avi)
Size: 1.36 GB
Length: 01:52:53
Availability: Available offline
0: Kick_Ass.avi
1: 1.36 GB
2: VLC media file (.avi)
3: 10/05/2010 12:49 AM
4: 11/02/2016 1:59 PM
5: 11/02/2016 1:59 PM
6: A

8: Available offline
9: Video
10: Sam-PC\Sam
11: Video

19: Unrated

27: 01:52:53
28: ‎384kbps
29: No

50: 930 GB

54: SAM-PC (this PC)

157: .avi
158: Kick_Ass.avi

162: 813 GB

180: No

183: Videos
184: C:\Users\Sam\Videos
185: Videos (C:\Users\Sam)

187: C:\Users\Sam\Videos\Kick_Ass.avi

189: VLC media file (.avi)

246: ‎12% 

286: Sam-PC\HomeUsers
287: Shared
288: Available
4

1 回答 1

0

视频帧宽度位于索引处i = 316(例如,这将包含一个类似 1920 的值)。

视频帧高度位于索引处i = 314(例如,这将包含 1080 之类的值)。

可能细节的索引objFolderItem似乎高达i = 320.

于 2019-03-07T01:59:35.043 回答