I am starting a new project and a couple of tips would be helpful.
I wish to read all the files in the Windows Favorites Folder or Directory
and extract the link information. I know how to read the files once I have the name of the file.
What I need help with is an approach for obtaining the file names to use with the file open command. The rest of this project I can do myself.

It would be nice if I could use this approach with all file directories.

Come on lets brain storm

huffstat appreciates your effort
thank you

:mrgreen:

Member Avatar for iamthwee

Alternatively you could check out the windows api.

If you feel Weezy, I hope George doesn't object.
I don't think I know how to access a win api function directory.
It does sound like a good idea thou.

Favorites is a shell folder, meaning what it's name and location are depend on explorer.exe It's not a regular file, so you have to call the SH api. Here is an example that gets the path to favorites:

#include <windows.h>

char *favorites_path(char *destination_path)
{
    ITEMIDLIST IDL;
    int rc;
    
    *destination_path=0x0;
    rc=SHGetSpecialFolderLocation(100, CSIDL_FAVORITES, IDL);
    if(rc==NOERROR)
    {
         rc = SHGetPathFromIDList(IDL.mkid.cb, destination_path);
         /*  you can check the rc here and something in case of failure */
     }
    return destination_path;
}

PS: it's six years since I did this, so take that into consideration....

Alternatively you could check out the windows api.

I don't think I know how to access a win api function directory.

Why not look at the Win32 example in the link I posted?

David,
I can't get anybody to answer the phone there.
I'll try again tomorrow.
Thank You for your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.