// Removes that existing custom Jump List for this application.
void DeleteJumpList()
{
    ICustomDestinationList *pcdl;
    HRESULT hr = CoCreateInstance(CLSID_DestinationList, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pcdl));
    if (SUCCEEDED(hr))
    {
        hr = pcdl->DeleteList(NULL);
        pcdl->Release();
    }
}
void JumpListsManager::deleteList(const wchar_t *appId)
{
	if (!appId)
		appId = m_appId;
	ICustomDestinationList *list;
	CoInitialize(0);
	HRESULT res = CoCreateInstance(CLSID_DestinationList, 0, CLSCTX_INPROC_SERVER, IID_ICustomDestinationList, (void**)&list);
	if (FAILED(res))
		return;
	res = list->DeleteList(appId);
	list->Release();
	m_actionInfoMap.clear();
}
Exemplo n.º 3
0
// @pymethod |PyICustomDestinationList|DeleteList|Removes any customization, leaving only the system-maintained Recent and Frequent lists
PyObject *PyICustomDestinationList::DeleteList(PyObject *self, PyObject *args)
{
	ICustomDestinationList *pICDL = GetI(self);
	if ( pICDL == NULL )
		return NULL;
	TmpWCHAR AppID;
	PyObject *obAppID = Py_None;
	// @pyparm str|AppID|None|The taskbar identifier of the application
	if ( !PyArg_ParseTuple(args, "|O:DeleteList", &obAppID))
		return NULL;
	if (!PyWinObject_AsWCHAR(obAppID, &AppID, TRUE))
		return NULL;

	HRESULT hr;
	PY_INTERFACE_PRECALL;
	hr = pICDL->DeleteList(AppID);
	PY_INTERFACE_POSTCALL;
	if ( FAILED(hr) )
		return PyCom_BuildPyException(hr, pICDL, IID_ICustomDestinationList );
	Py_INCREF(Py_None);
	return Py_None;
}