urlmon: IsValidUrl should not fail if first parameter is not NULL.

This commit is contained in:
Dan Kegel 2011-03-21 01:45:51 +00:00 committed by Alexandre Julliard
parent 570f446f8c
commit 6bbd0b87d5
2 changed files with 13 additions and 2 deletions

View File

@ -1454,9 +1454,20 @@ static void test_MkParseDisplayNameEx(void)
static void test_IsValidURL(void)
{
HRESULT hr;
IBindCtx *bctx = NULL;
hr = IsValidURL(NULL, 0, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
hr = IsValidURL(NULL, wszHttpWineHQ, 0);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
CreateBindCtx(0, &bctx);
hr = IsValidURL(bctx, wszHttpWineHQ, 0);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
IBindCtx_Release(bctx);
}
START_TEST(misc)

View File

@ -426,7 +426,7 @@ HRESULT WINAPI DllRegisterServerEx(void)
* Determines if a specified string is a valid URL.
*
* PARAMS
* pBC [I] ignored, must be NULL.
* pBC [I] ignored, should be NULL.
* szURL [I] string that represents the URL in question.
* dwReserved [I] reserved and must be zero.
*
@ -442,7 +442,7 @@ HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved)
{
FIXME("(%p, %s, %d): stub\n", pBC, debugstr_w(szURL), dwReserved);
if (pBC || dwReserved || !szURL)
if (dwReserved || !szURL)
return E_INVALIDARG;
return S_OK;