Click here to Skip to main content
15,885,366 members
Articles / Programming Languages / C++
Article

A sample class to get the favorites of IE

Rate me:
Please Sign up or sign in to vote.
4.78/5 (4 votes)
3 Oct 2000 68.4K   729   30   7
This is a class to get the folders and urls of the IE.
  • Download demo project & source files - 31.3 Kb
  • Introduction

    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. Thanks Naveen.

    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 pFavoList.

    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!

    -Ray Yang

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    Web Developer
    Australia Australia
    Ray was graduated from Tongji University in 1997, majored in EE. After worked in 2 electronics company, he found software is really more funny than hardware. So, in 2000, he joined a new company to be a software developer. He is interested in VxD, WDM, Windows System Programming, MFC and COM.
    Living in Shanghai, P.R.China.
    He is a freelance developer and has done many projects in spare time.

    Comments and Discussions

     
    QuestionWhat about custom favorite icon? Pin
    Steve Jensen11-Sep-02 17:27
    Steve Jensen11-Sep-02 17:27 
    AnswerRe: What about custom favorite icon? Pin
    Ray Yang11-Sep-02 21:12
    Ray Yang11-Sep-02 21:12 
    GeneralRe: What about custom favorite icon? Pin
    Steve Jensen12-Sep-02 10:43
    Steve Jensen12-Sep-02 10:43 
    GeneralRe: What about custom favorite icon? Pin
    achimera25-Apr-06 13:53
    achimera25-Apr-06 13:53 
    GeneralMissing a release call (sorry if code's messy) Pin
    8-Nov-01 13:01
    suss8-Nov-01 13:01 
    GeneralRe: Missing a release call (sorry if code's messy) Pin
    rayyang20008-Nov-01 13:36
    rayyang20008-Nov-01 13:36 
    GeneralProject Setting Pin
    Tim Hodgson29-Mar-01 5:13
    Tim Hodgson29-Mar-01 5:13 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.