The Joy of Coding: Episode Guide

Volunteer-driven episode guide for The Joy of Coding


Project maintained by mikeconley Hosted on GitHub Pages — Theme by mattgraham

Episode 317: Feb 22nd, 2023

Topics

``` (abstract) class JumpListManager HRESULT BeginList HRESULT AddUserTasks HRESULT AppendCategory HRESULT CommitList

// Two implementations: // 1: “Real” one that wraps one of these things: RefPtr jumpListMgr; HRESULT hr = ::CoCreateInstance( CLSIDDestinationList, nullptr, CLSCTXINPROCSERVER, IIDICustomDestinationList, getter_AddRefs(jumpListMgr));

// 2: “Fake” one that allows us to interrogate it for things it has been passed, for testing. class MockJumpListManager HRESULT BeginList(outparam maxitems and outparam IObjectArray) Wants to be prepared to provide an outparam which is an IObjectArray. We can do that by creating an empty collection, or a collection that returns ShellLinks. HRESULT AddUserTasks(collection) Takes an array of tasks and returns an HRESULT. We can then examine what was passed. HRESULT AppendCategory(string, collection) Takes a string and collection for the custom list. HRESULT CommitList Just returns an HRESULT. ```

Chat

Other