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


12 Years
Discussion Span
Last Post by huffstat

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)
    int rc;
    rc=SHGetSpecialFolderLocation(100, CSIDL_FAVORITES, IDL);
         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?


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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.