Click here to Skip to main content
Click here to Skip to main content

A sample class to get the favorites of IE

By , 3 Oct 2000
Rate this:
Please Sign up or sign in to vote.
<!-- Link to demo file download -->
  • Download demo project & source files - 31.3 Kb
  • <!-- Add the rest of your HTML here -->

    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! Smile | :)

    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

    About the Author

    rayyang2000
    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? PinmemberSteve Jensen11-Sep-02 17:27 
    AnswerRe: What about custom favorite icon? PinmemberRay Yang11-Sep-02 21:12 
    GeneralRe: What about custom favorite icon? PinmemberSteve Jensen12-Sep-02 10:43 
    GeneralRe: What about custom favorite icon? Pinmemberchimera6725-Apr-06 13:53 
    GeneralMissing a release call (sorry if code's messy) PinmemberChris Hambleton8-Nov-01 13:01 
    GeneralRe: Missing a release call (sorry if code's messy) Pinmemberrayyang20008-Nov-01 13:36 
    GeneralProject Setting PinmemberTim Hodgson29-Mar-01 5:13 

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

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

    | Advertise | Privacy | Mobile
    Web04 | 2.8.140415.2 | Last Updated 4 Oct 2000
    Article Copyright 2000 by rayyang2000
    Everything else Copyright © CodeProject, 1999-2014
    Terms of Use
    Layout: fixed | fluid