Yes, you need to do this yourself. Here is my version. I hasn't been fully
tested but seems to work for the bits I use
. Note that you will need to
define SHCONTF and STRRET (can be found in MSDN) and modify parameters as
required.
' /////////////////////////////////////////////////////////////////////////
' //
' // IShellFolder
' //
' /////////////////////////////////////////////////////////////////////////
<ComImport(), InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
Guid("000214E6-0000-0000-C000-000000000046")> _
Public Interface IShellFolder
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function ParseDisplayName(ByVal hwnd As IntPtr, ByVal pbc As IntPtr,
<MarshalAs(UnmanagedType.LPWStr)> ByVal pszDisplayName As String, ByRef
pchEaten As Integer, ByRef ppidl As IntPtr, ByRef pdwAttributes As Integer)
As Integer
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function EnumObjects(ByVal hwnd As IntPtr, ByVal grfFlags As
COM.ShellAPI.SHCONTF, ByRef ppenumIDList As IntPtr) As Int32
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function BindToObject(ByVal pidl As IntPtr, ByVal pbc As IntPtr, ByRef
riid As Guid, ByRef ppv As IntPtr) As Int32
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function BindToStorage(ByVal pidl As IntPtr, ByVal pbc As IntPtr, ByRef
riid As Guid, ByRef ppv As IntPtr) As Int32
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function CompareIDs(ByVal lParam As Int32, ByVal pidl1 As IntPtr, ByVal
pidl2 As IntPtr) As Int32
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function CreateViewObject(ByVal hwndOwner As IntPtr, ByVal riid As Guid,
ByRef ppv As IntPtr) As Int32
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function GetAttributesOf(ByVal cidl As Integer, ByRef apidl As IntPtr,
ByRef rgfInOut As Integer) As Integer
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function GetUIObjectOf(ByVal hwndOwner As IntPtr, ByVal cidl As UInt32,
ByVal apidl() As IntPtr, ByVal riid As Guid, ByRef rgfReserved As UInt32,
ByRef ppv As IntPtr) As Int32
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function GetDisplayNameOf(ByVal pidl As IntPtr, ByVal uFlags As Integer,
ByRef pName As COM.ShellAPI.STRRET) As Int32
'
/////////////////////////////////////////////////////////////////////////
' //
'
/////////////////////////////////////////////////////////////////////////
<PreserveSig()> _
Function SetNameOf(ByVal hwnd As IntPtr, ByVal pidl As IntPtr,
<MarshalAs(UnmanagedType.LPWStr)> ByVal pszName As [String], ByVal uFlags As
UInt32, ByRef ppidlOut As IntPtr) As Int32
End Interface