Click here to Skip to main content
16,016,024 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I am trying to get any extended properties of a file using the following code:
VB
Public Sub GetFileProperties(ByVal path As String)
   If File.Exists(path) Then
      Dim shell As New Shell32.Shell
      Try
         Dim fld As Shell32.Folder = shell.NameSpace(path)




      Catch ex As Exception
      End Try
   End If
End Sub


I have a reference to Interop.Shell32

it always throws the error:
Error HRESULT E_FAIL has been returned from a call to a COM component.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900