Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 705387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:02:52+00:00 2026-05-14T04:02:52+00:00

I was toying with an IRC client, integrating it with the windows 7 app

  • 0

I was toying with an IRC client, integrating it with the windows 7 app bar.

To get a “Frequent” or “Recent” items list one has to call SHAddToRecentDocs API.
I want to add recent IRC channels visited to the Windows 7 Jumplist for the IRC application.
Now, my problem is, IRC channels don’t exist in the file system. And SHAddToRecentDocs seems to insist on getting some sort of file system object.

Ive tried to work around it by creating a IShellItem pointing to my application, and giving it a command line to launch the channel. The shell is rebelling however, and thus far has not visibly added any of my “recent document” attempts to the Jumplist.

Is there no way to do this without creating some kind of entirely unwanted filesystem object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:02:52+00:00Added an answer on May 14, 2026 at 4:02 am

    The code in the answer to question 1671793 goes part of the way. You want an IShellLink instead of an IShellItem. I tried that code bit by bit. Things wouldn’t work before using the IPropertyStore to set the title. The IPersistFile code doesn’t seem to be necessary.

    All of that said, while I now have items appearing when I right-click on my app’s taskbar icon, I don’t yet have them appearing as a sub-menu of my app on the start menu (as word docs do, for example), so I’m not yet entirely satisfied. I think this is a result of the warning in the docs for SHAddToRecentDocs:

    Executable (.exe) files are filtered from the recently used documents list in Windows XP and later versions. Although SHAddToRecentDocs will accept the path of an executable file, that file will not appear in the Recent Items list.

    Here’s my code as it stands. I’m jumping through some hoops as my development environment is using an older Windows SDK (so I have to create PKEY_Title for myself) and my app needs to support Win2k (so I don’t want to bind to functions like InitPropVariantFromString which require newer Windows versions).

    HRESULT hr;
    IShellLink* link;
    
    // Get a pointer to the IShellLink interface.
    hr = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&link);
    if (FAILED(hr))
        return;
    link->SetPath(path_to_app);
    link->SetArguments(L"/some /args");
    link->SetDescription(L"A description");  // Turns into tooltip
    
    IPropertyStore* prop_store;
    hr = link->QueryInterface(&prop_store);
    if(SUCCEEDED(hr))
    {
        PROPVARIANT pv;
        pv.vt=VT_LPWSTR;
        pv.pwszVal=L"Name of item"; // Turns into actual item name
    
        PROPERTYKEY PKEY_Title;
        CLSIDFromString(L"{F29F85E0-4FF9-1068-AB91-08002B27B3D9}", &(PKEY_Title.fmtid));
        PKEY_Title.pid=2;
    
        // Set the title property.
        hr = prop_store->SetValue(PKEY_Title, pv); // THIS is where the displayed title is actually set
    
        // Save the changes we made to the property store
        prop_store->Commit();
        prop_store->Release();
    }
    
    SHARDAPPIDINFOLINK appinfo;
    appinfo.pszAppID=L"Company.AppName"; // Previously registered using SetCurrentProcessExplicitAppUserModelID
    appinfo.psl=link;
    SHAddToRecentDocs(SHARD_APPIDINFOLINK, &appinfo);
    link->Release();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently writing an IRC client and I've been trying to figure out
I'm trying to implement my own IRC client as a personal proejct and I
I've been toying around, writing a small IRC framework in C that I'm now
I'm making a simple IRC client for myself because I really don't see the
I'm toying with Android at the moment as a learning experience and one of
I'm toying with the idea of volumetric particles. By 'volumetric' I don't mean actually
I'm toying with the idea of phasing in an ORM into an application I
I'm toying with my first remoting project and I need to create a RemotableType
I have being toying with the idea of creating software Robots to help on
So, I'm toying around with Stackless Python and a question popped up in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.