R
Robin Tucker
I've got this nice pidl, enumerated via. IEnumIDList on an IShellFolder (the
desktop). I know the pidl is ok, because I can list its display name and
its looking good. Now I want to go a level down using this piddle and the
BindToObject method on the IShellFolder interface. Here's what I'm doing:
This is how I declare the method on my IShellFolder interface.
<PreserveSig()> _
Function BindToObject(ByVal pidl As IntPtr, ByVal pbc As IntPtr, ByVal riid
As Guid, ByRef ppv As IntPtr) As Int32
This is how I execute the method with my piddle (theFolder is an
IShellFolder, previously verified as being ok - I'm using it to enumerate
its children as pidls):
Dim ptrRet As IntPtr
theFolder.BindToObject(pIDL, IntPtr.Zero,
ShellLib.ShellGUIDs.IID_IShellFolder, ptrRet)
I know my piddle is ok, because I used it to get the display name for the
object it refers to. But I can't get an IShellFolder from this piddle. I
get an null reference exception when I try to execute the above method.
desktop). I know the pidl is ok, because I can list its display name and
its looking good. Now I want to go a level down using this piddle and the
BindToObject method on the IShellFolder interface. Here's what I'm doing:
This is how I declare the method on my IShellFolder interface.
<PreserveSig()> _
Function BindToObject(ByVal pidl As IntPtr, ByVal pbc As IntPtr, ByVal riid
As Guid, ByRef ppv As IntPtr) As Int32
This is how I execute the method with my piddle (theFolder is an
IShellFolder, previously verified as being ok - I'm using it to enumerate
its children as pidls):
Dim ptrRet As IntPtr
theFolder.BindToObject(pIDL, IntPtr.Zero,
ShellLib.ShellGUIDs.IID_IShellFolder, ptrRet)
I know my piddle is ok, because I used it to get the display name for the
object it refers to. But I can't get an IShellFolder from this piddle. I
get an null reference exception when I try to execute the above method.