Using Delphi to Create a Win7 Playlist

I am trying to create a jump list in Windows 7 for my application using Delphi.

I found this C ++ code, but I'm not sure how to translate it to Delphi, any help?

void CreateJumpList() { ICustomDestinationList *pcdl; HRESULT hr = CoCreateInstance (CLSID_DestinationList, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pcdl)); if (SUCCEEDED(hr)) { hr = pcdl->SetAppID(c_szAppID); if (SUCCEEDED(hr)) { UINT uMaxSlots; IObjectArray *poaRemoved; hr = pcdl->BeginList (&uMaxSlots, IID_PPV_ARGS(&poaRemoved)); if (SUCCEEDED(hr)) { hr = _AddCategoryToList(pcdl, poaRemoved); if (SUCCEEDED(hr)) { pcdl->CommitList(); } poaRemoved->Release(); } } } } // This is the helper function that actually //appends the items to a collection object HRESULT _AddCategoryToList(ICustomDestinationList *pcdl, IObjectArray *poaRemoved) { IObjectCollection *poc; HRESULT hr = CoCreateInstance (CLSID_EnumerableObjectCollection, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&poc)); if (SUCCEEDED(hr)) { for (UINT i = 0; i < ARRAYSIZE(c_rgpszFiles); i++) { IShellItem *psi; if (SUCCEEDED(SHCreateItemInKnownFolder( FOLDERID_Documents, KF_FLAG_DEFAULT, c_rgpszFiles[i], IID_PPV_ARGS(&psi)))) { if(!_IsItemInArray(psi, poaRemoved)) { poc->AddObject(psi); } psi->Release(); } } IObjectArray *poa; hr = poc->QueryInterface(IID_PPV_ARGS(&poa)); if (SUCCEEDED(hr)) { pcdl->AppendCategory(L"Custom category", poa); poa->Release(); } poc->Release(); } return hr; } 
+7
c ++ windows-7 delphi code-conversion jump-list
source share

No one has answered this question yet.

See similar questions:

-one
How to add a task entry to the taskbar using Delphi 4?

or similar:

4247
The ultimate guide and list of books in C ++
183
Sublime command line text
6
Transition Lists and Windows Forms
4
Where is the Win7 jump list system data stored?
2
Delphi: Win7 side effect with forms
2
Copy Drive List Labels
one
Windows 7 Jump List
one
Problem with Delphi - Win7 Window Focus
0
Delphi, Win7, form problem, compatibility
0
How can I programmatically link an item that displays a jump list in the start menu in WIN7

All Articles