M
Melinda
hi all,
i'm having problems with BindToObject(). when i call the method it is
throwing a System.NullReferenceException error, but i don't understand
why. what i'm trying to do is get a reference to an IShellFolder for
a folder of a PIDL that i already have. i'm doing that using by
calling BindToObject() of the IShellFolder of the desktop folder, per
the documentation.
here is some code:
IShellFolder pIShellParent = null;
IShellFolder pIShellDesktop = ShellFunctions.GetDesktopFolder();
Guid IID_IShellFolder = typeof(IShellFolder).GUID;
// pidlParent is defined earlier
int hr = pIShellDesktop.BindToObject( pidlParent, IntPtr.Zero,
IID_IShellFolder, out pIShellParent );
i've gone thru this code with the debugger and i know that
pIShellDesktop is not null and pidlParent is not null. i'm stumped.
any help would be appreciated.
thanks,
melinda
i'm having problems with BindToObject(). when i call the method it is
throwing a System.NullReferenceException error, but i don't understand
why. what i'm trying to do is get a reference to an IShellFolder for
a folder of a PIDL that i already have. i'm doing that using by
calling BindToObject() of the IShellFolder of the desktop folder, per
the documentation.
here is some code:
IShellFolder pIShellParent = null;
IShellFolder pIShellDesktop = ShellFunctions.GetDesktopFolder();
Guid IID_IShellFolder = typeof(IShellFolder).GUID;
// pidlParent is defined earlier
int hr = pIShellDesktop.BindToObject( pidlParent, IntPtr.Zero,
IID_IShellFolder, out pIShellParent );
i've gone thru this code with the debugger and i know that
pIShellDesktop is not null and pidlParent is not null. i'm stumped.
any help would be appreciated.
thanks,
melinda