locked
BROWSEINFO How to initailize pidlRoot with a string (not a special folder id) RRS feed

  • Question

  • Hi

    I use SHBrowseForFolder in C#.
    I post my question here anyhow because its Win32-API related.

    SHBrowseForFolder function gets a BROWSEINFO as payload, where the root of the folder tree displayed is defined by the pidlRoot field, which I currently initialize with a specialfolder id (using SHGetSpecialFolderLocation).
    Of course this function only returns special folder ids.

    I'd like to start with a different root of my local filesystem, which can only be defined by the folder path.

    How can I get the pidlRoot of type PCIDLIST_ABSOLUTE for a folder specified by its path (as string)?

    Is there a function such as SHGetIDListFromPath("C:\\myData");

    Thx


    Sunday, January 10, 2016 11:31 AM

Answers

  • You can use SHParseDisplayName to receive a pidl for a folder
    Sunday, January 10, 2016 11:41 AM

All replies

  • You can use SHParseDisplayName to receive a pidl for a folder
    Sunday, January 10, 2016 11:41 AM
  • Hi

    thanks a bunch for your reply, exactly what I need, works perfectly :)

    cu Chris


    Sunday, January 10, 2016 12:08 PM