mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 07:52:57 +00:00
[SHELL32] Sync CShellDispatch and family with wine.
Incorporates work from Ivan Rodionov. CORE-12955
This commit is contained in:
parent
fd87f0ad87
commit
e8dcbcc61d
7 changed files with 261 additions and 186 deletions
|
@ -107,7 +107,7 @@ HRESULT CFolderItemVerbs::Init(LPITEMIDLIST idlist)
|
|||
HRESULT STDMETHODCALLTYPE CFolderItemVerbs::get_Count(LONG *plCount)
|
||||
{
|
||||
if (!plCount)
|
||||
return E_POINTER;
|
||||
return E_INVALIDARG;
|
||||
*plCount = m_count;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -115,12 +115,20 @@ HRESULT STDMETHODCALLTYPE CFolderItemVerbs::get_Count(LONG *plCount)
|
|||
HRESULT STDMETHODCALLTYPE CFolderItemVerbs::get_Application(IDispatch **ppid)
|
||||
{
|
||||
TRACE("(%p, %p)\n", this, ppid);
|
||||
|
||||
if (ppid)
|
||||
*ppid = NULL;
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CFolderItemVerbs::get_Parent(IDispatch **ppid)
|
||||
{
|
||||
TRACE("(%p, %p)\n", this, ppid);
|
||||
|
||||
if (ppid)
|
||||
*ppid = NULL;
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -130,9 +138,8 @@ HRESULT STDMETHODCALLTYPE CFolderItemVerbs::Item(VARIANT indexVar, FolderItemVer
|
|||
return E_POINTER;
|
||||
|
||||
CComVariant var;
|
||||
VariantCopyInd(&var, &indexVar);
|
||||
|
||||
HRESULT hr = VariantChangeType(&var, &var, 0, VT_I4);
|
||||
HRESULT hr = VariantChangeType(&var, &indexVar, 0, VT_I4);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return E_INVALIDARG;
|
||||
|
||||
|
@ -144,7 +151,9 @@ HRESULT STDMETHODCALLTYPE CFolderItemVerbs::Item(VARIANT indexVar, FolderItemVer
|
|||
BSTR name = NULL;
|
||||
|
||||
if(index == m_count)
|
||||
{
|
||||
name = SysAllocStringLen(NULL, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
MENUITEMINFOW info = { sizeof(info), 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue