<!-- Link to demo file download -->
Download demo project & source files - 31.3 Kb
<!-- Add the rest of your HTML here -->
I want to put the URLs of my IE to my homepage so that my friends can share these links with me. But I don't know how to do this. After find in many website I cannot get any good tools to help me. Some of them just can get all items in favorites but damage the architecture. So I decided to write a little program.
After visiting CodeProject.com, I got Naveen's code
(you can get it in Shell Programming section). But his code just gets the folders
of the favorites. I re-wrote those codes to a class (Sorry I don't kow how to
implement COM) so that I can get not only the folders but also the links. Here I
must say thanks to Naveen because some codes in my class is from his program.
To use this class, you just need to call the member functions of the class
CFavoriteEngine. It enumerates the items in favorites and get a pointer
CFavoriteEngine::m_pFavoListRoot) to a list. If you want to know the
architecture of this list, please put a breakpoint after
FavoEng.GetAllFavorites() in your IDE and watch the variable
The following is the description of the functions:
PFAVORITELIST CFavoriteEngine::GetAllFavorites()<code> - Get the root pointer to the list which contains the items of favotires;
<li><code>void CFavoriteEngine::CleanUp()<code> - Use this function to clean up the list (delete all item in the list);
<li><code>void PrintoutURLs(PFAVORITELIST pFavoListCurFolderRoot, int nFolderLevel) - Outputs the items in the list. And this function also shows how to browse the list.
I've use this program to get the favotires of my IE and put them in my homepage.
Wish you will like it!
BTW: If there are many folders and links in you favorites, the enumeration will spend a long time.
Have a good day!