Reputation: 19
I am using the shell32.dll to retrieve extended properties of a file. My textbox will display every property of the file (iCollumn -1 to 300) but it won't show the framewidth or frameheight (and many other properties).
Is there any way to get these using shell32.dll? If not, is there an alternate method to get these missing properties?
Notes: I have extensions shown in Windows Explorer, my project is referencing Microsoft shell controls and automation.
Code:
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
Output (for the sake of space i have only displayed the results that didn't display):
-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
Upvotes: 1
Views: 4730
Reputation: 26
The video frame width is at index i = 316
(this will contain a value like 1920, for example).
The video frame height is at index i = 314
(this will contain a value like 1080, for example).
The index for possible objFolderItem
details seems to go as high as i = 320
.
Upvotes: 0