taskschd: IRegistrationInfo::put_Description() should accept NULL input.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
121f20453b
commit
19f4037dd5
@ -581,15 +581,14 @@ static HRESULT WINAPI RegistrationInfo_get_Description(IRegistrationInfo *iface,
|
|||||||
static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface, BSTR description)
|
static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface, BSTR description)
|
||||||
{
|
{
|
||||||
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
|
WCHAR *str = NULL;
|
||||||
|
|
||||||
TRACE("%p,%s\n", iface, debugstr_w(description));
|
TRACE("%p,%s\n", iface, debugstr_w(description));
|
||||||
|
|
||||||
if (!description) return E_INVALIDARG;
|
if (description && !(str = heap_strdupW(description))) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
heap_free(reginfo->description);
|
heap_free(reginfo->description);
|
||||||
reginfo->description = heap_strdupW(description);
|
reginfo->description = str;
|
||||||
/* FIXME: update XML on the server side */
|
return S_OK;
|
||||||
return reginfo->description ? S_OK : E_OUTOFMEMORY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR *author)
|
static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR *author)
|
||||||
|
@ -1602,6 +1602,13 @@ todo_wine
|
|||||||
ok(hr == S_OK, "get_Description error %#x\n", hr);
|
ok(hr == S_OK, "get_Description error %#x\n", hr);
|
||||||
ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr));
|
ok(!lstrcmpW(bstr, Task1), "expected Task1, got %s\n", wine_dbgstr_w(bstr));
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
|
hr = IRegistrationInfo_put_Description(reginfo, NULL);
|
||||||
|
ok(hr == S_OK, "put_Description error %#x\n", hr);
|
||||||
|
bstr = (BSTR)0xdeadbeef;
|
||||||
|
hr = IRegistrationInfo_get_Description(reginfo, &bstr);
|
||||||
|
ok(hr == S_OK, "get_Description error %#x\n", hr);
|
||||||
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
|
|
||||||
hr = IRegistrationInfo_get_Author(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Author(reginfo, &bstr);
|
||||||
ok(hr == S_OK, "get_Author error %#x\n", hr);
|
ok(hr == S_OK, "get_Author error %#x\n", hr);
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user