Commit 3014fb16 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shell32: Added remaining Application() properties.

parent 58b73fa0
......@@ -292,7 +292,10 @@ static HRESULT WINAPI FolderItemVerbImpl_Invoke(FolderItemVerb *iface,
static HRESULT WINAPI FolderItemVerbImpl_get_Application(FolderItemVerb *iface, IDispatch **disp)
{
FIXME("(%p, %p)\n", iface, disp);
TRACE("(%p, %p)\n", iface, disp);
if (disp)
*disp = NULL;
return E_NOTIMPL;
}
......@@ -474,7 +477,10 @@ static HRESULT WINAPI FolderItemVerbsImpl_get_Count(FolderItemVerbs *iface, LONG
static HRESULT WINAPI FolderItemVerbsImpl_get_Application(FolderItemVerbs *iface, IDispatch **disp)
{
FIXME("(%p, %p)\n", iface, disp);
TRACE("(%p, %p)\n", iface, disp);
if (disp)
*disp = NULL;
return E_NOTIMPL;
}
......@@ -1764,13 +1770,16 @@ static HRESULT WINAPI ShellDispatch_Invoke(IShellDispatch6 *iface,
return hr;
}
static HRESULT WINAPI ShellDispatch_get_Application(IShellDispatch6 *iface,
IDispatch **ppid)
static HRESULT WINAPI ShellDispatch_get_Application(IShellDispatch6 *iface, IDispatch **disp)
{
FIXME("(%p,%p)\n", iface, ppid);
TRACE("(%p,%p)\n", iface, disp);
*ppid = NULL;
return E_NOTIMPL;
if (!disp)
return E_INVALIDARG;
*disp = (IDispatch *)iface;
IDispatch_AddRef(*disp);
return S_OK;
}
static HRESULT WINAPI ShellDispatch_get_Parent(IShellDispatch6 *iface, IDispatch **disp)
......
......@@ -131,6 +131,12 @@ static void test_namespace(void)
ok(SUCCEEDED(r), "Failed to create ShellDispatch object: %#x.\n", r);
disp = NULL;
r = IShellDispatch_get_Application(sd, &disp);
ok(r == S_OK, "Failed to get application pointer, hr %#x.\n", r);
ok(disp == (IDispatch *)sd, "Unexpected application pointer %p.\n", disp);
IDispatch_Release(disp);
disp = NULL;
r = IShellDispatch_get_Parent(sd, &disp);
ok(r == S_OK, "Failed to get Shell object parent, hr %#x.\n", r);
ok(disp == (IDispatch *)sd, "Unexpected parent pointer %p.\n", disp);
......@@ -1226,7 +1232,7 @@ static void test_ParseName(void)
static void test_Verbs(void)
{
FolderItemVerbs *verbs;
FolderItemVerbs *verbs, *verbs2;
WCHAR pathW[MAX_PATH];
FolderItemVerb *verb;
IShellDispatch *sd;
......@@ -1265,6 +1271,16 @@ if (0) { /* crashes on some systems */
hr = FolderItem_Verbs(item, &verbs);
ok(hr == S_OK, "got 0x%08x\n", hr);
hr = FolderItem_Verbs(item, &verbs2);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(verbs2 != verbs, "Unexpected verbs pointer.\n");
FolderItemVerbs_Release(verbs2);
disp = (void *)0xdeadbeef;
hr = FolderItemVerbs_get_Application(verbs, &disp);
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
ok(disp == NULL, "Unexpected application pointer.\n");
disp = (void *)0xdeadbeef;
hr = FolderItemVerbs_get_Parent(verbs, &disp);
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
......@@ -1303,6 +1319,11 @@ if (0) { /* crashes on winxp/win2k3 */
ok(hr == E_NOTIMPL, "got %#x.\n", hr);
ok(disp == NULL, "Unexpected parent pointer %p.\n", disp);
disp = (void *)0xdeadbeef;
hr = FolderItemVerb_get_Application(verb, &disp);
ok(hr == E_NOTIMPL, "got %#x.\n", hr);
ok(disp == NULL, "Unexpected parent pointer %p.\n", disp);
SysFreeString(str);
FolderItemVerb_Release(verb);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment