From c48c3abd92dae0cc72f561908b9ae16dc82f5817 Mon Sep 17 00:00:00 2001 From: Saulius Krasuckas Date: Mon, 27 Jun 2005 09:41:48 +0000 Subject: [PATCH] Additional test cases for IShellFolder_BindToObject. --- dlls/shell32/tests/shlfolder.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 5443c8ac44c..057632e0742 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -187,6 +187,9 @@ static void test_BindToObject(void) hr = IShellFolder_BindToObject(psfDesktop, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with empty pidl! hr = %08lx\n", hr); + hr = IShellFolder_BindToObject(psfDesktop, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); + ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with NULL pidl! hr = %08lx\n", hr); + hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL); ok (SUCCEEDED(hr), "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08lx\n", hr); if (FAILED(hr)) { @@ -203,6 +206,9 @@ static void test_BindToObject(void) hr = IShellFolder_BindToObject(psfMyComputer, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with empty pidl! hr = %08lx\n", hr); + hr = IShellFolder_BindToObject(psfMyComputer, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); + ok (hr == E_INVALIDARG, "MyComputers's BindToObject should fail, when called with NULL pidl! hr = %08lx\n", hr); + cChars = GetSystemDirectoryW(wszSystemDir, MAX_PATH); ok (cChars > 0 && cChars < MAX_PATH, "GetSystemDirectoryW failed! LastError: %08lx\n", GetLastError()); if (cChars == 0 || cChars >= MAX_PATH) { @@ -227,6 +233,10 @@ static void test_BindToObject(void) ok (hr == E_INVALIDARG, "FileSystem ShellFolder's BindToObject should fail, when called with empty pidl! hr = %08lx\n", hr); + hr = IShellFolder_BindToObject(psfSystemDir, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild); + ok (hr == E_INVALIDARG, + "FileSystem ShellFolder's BindToObject should fail, when called with NULL pidl! hr = %08lx\n", hr); + IShellFolder_Release(psfSystemDir); }