if (FAILED_UNEXPECTEDLY(hr))
return hr;
- pqcminfo->indexMenu += HRESULT_CODE(hr);
+ pqcminfo->idCmdFirst += HRESULT_CODE(hr);
return S_OK;
}
case DFM_INVOKECOMMAND:
}
STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
{
- int Entries = 0;
+ UINT idCmd = idCmdFirst;
if (!(uFlags & CMF_DEFAULTONLY))
{
if (indexMenu)
{
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
- Entries++;
}
- InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_STRING, idCmdFirst++, menuText);
- Entries++;
+ InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_STRING, idCmd++, menuText);
}
- return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Entries);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, idCmd - idCmdFirst);
}
// *** IShellExtInit methods ***