how to get pIDL of IShellFolder-interface?

how to get pIDL of IShellFolder-interface?

Post by Timo Kunz » Sun, 08 Jul 2001 06:29:35



Hi!

How can I get the pIDL of an IShellFolder-interface?

Thanks!

 
 
 

how to get pIDL of IShellFolder-interface?

Post by Jim Barr » Tue, 10 Jul 2001 19:59:55



> How can I get the pIDL of an IShellFolder-interface?

If the folder exposes IPersistFolder2 then call GetCurFolder and you are
done. If not, you are in a bit of trouble. However, if the folder
provides a data object for any of its subitems (via GetUIObjectOf), and
that data object contains the CFSTR_SHELLIDLIST format, then you can get
the folder's id-list from there.

- Jim

 
 
 

how to get pIDL of IShellFolder-interface?

Post by Chris Guza » Thu, 06 Sep 2001 13:23:17


IPersistIDList and IPersistFolder2 allows you to get the full pidl from a an object.

here is some sample code...

STDAPI SHGetIDListFromUnk(IUnknown *punk, LPITEMIDLIST *ppidl)
{
    *ppidl = NULL;
    HRESULT hr = E_NOINTERFACE;
    if (punk)
    {
        IPersistFolder2 *ppf;
        IPersistIDList *pperid;
        if (SUCCEEDED(punk->QueryInterface(IID_PPV_ARG(IPersistIDList, &pperid))))
        {
            hr = pperid->GetIDList(ppidl);
            pperid->Release();
        }
        else if (SUCCEEDED(punk->QueryInterface(IID_PPV_ARG(IPersistFolder2, &ppf))))
        {
            hr = ppf->GetCurFolder(ppidl);
            ppf->Release();
        }
    }
    return hr;

}

> Hi!

> How can I get the pIDL of an IShellFolder-interface?

> Thanks!

 
 
 

1. Get absolute path or PIDL from relative PIDL

Hi all.

My problem is described in subject already but here it is.
I have a relative LPITEMIDLIST and i need to convert it
to an absolute LPITEMIDLIST. When i tried SHGetPathFromItemIDList
it returns path which consists of the the name
of that relative folder appended to desktop folder.
Any ideas PLZ ?

--

-----------------------------------------------------

Asko Telinen

Faculty of Information technology
Jyv?skyl? university

-----------------------------------------------------

2. No text in settings notebook

3. relative PIDL to 'absolute' PIDL

4. XML Web Services - SQL Server DB connection issue

5. Caching IShellFolders for IShellFolder::BindToObject

6. 8031 (or 8051?) Disassembler needed - HELP!!!

7. Getting Full PIDL

8. A2000 version hacks

9. Can I using Desktop interface to manage any fully PIDL?

10. Getting IShellFolder*

11. How to register a object(DLL) implemented the IShellFolder interface?

12. Using IShellFolder interface

13. Getting IDL's interface name