shell32/tests: Fix a crash on Win9x.
This commit is contained in:
parent
3a7c2d005c
commit
3a656fde1f
|
@ -107,6 +107,7 @@ static void test_get_set(void)
|
||||||
{
|
{
|
||||||
HRESULT r;
|
HRESULT r;
|
||||||
IShellLinkA *sl;
|
IShellLinkA *sl;
|
||||||
|
IShellLinkW *slW = NULL;
|
||||||
char mypath[MAX_PATH];
|
char mypath[MAX_PATH];
|
||||||
char buffer[INFOTIPSIZE];
|
char buffer[INFOTIPSIZE];
|
||||||
LPITEMIDLIST pidl, tmp_pidl;
|
LPITEMIDLIST pidl, tmp_pidl;
|
||||||
|
@ -156,8 +157,16 @@ static void test_get_set(void)
|
||||||
ok(SUCCEEDED(r), "GetPath failed (0x%08x)\n", r);
|
ok(SUCCEEDED(r), "GetPath failed (0x%08x)\n", r);
|
||||||
ok(*buffer=='\0', "GetPath returned '%s'\n", buffer);
|
ok(*buffer=='\0', "GetPath returned '%s'\n", buffer);
|
||||||
|
|
||||||
|
CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
|
||||||
|
&IID_IShellLinkW, (LPVOID*)&slW);
|
||||||
|
if (!slW)
|
||||||
|
skip("SetPath with NULL parameter crashes on Win9x\n");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IShellLinkW_Release(slW);
|
||||||
r = IShellLinkA_SetPath(sl, NULL);
|
r = IShellLinkA_SetPath(sl, NULL);
|
||||||
ok(r==E_INVALIDARG, "SetPath failed (0x%08x)\n", r);
|
ok(r==E_INVALIDARG, "SetPath failed (0x%08x)\n", r);
|
||||||
|
}
|
||||||
|
|
||||||
r = IShellLinkA_SetPath(sl, "");
|
r = IShellLinkA_SetPath(sl, "");
|
||||||
ok(r==S_OK, "SetPath failed (0x%08x)\n", r);
|
ok(r==S_OK, "SetPath failed (0x%08x)\n", r);
|
||||||
|
|
Loading…
Reference in New Issue