taskschd: Implement getters for IRegistrationInfo string properties.
This commit is contained in:
parent
84dc933cad
commit
8fd6435a6a
|
@ -39,6 +39,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
IRegistrationInfo IRegistrationInfo_iface;
|
IRegistrationInfo IRegistrationInfo_iface;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
WCHAR *description, *author, *version, *date, *documentation, *uri, *source;
|
||||||
} registration_info;
|
} registration_info;
|
||||||
|
|
||||||
static inline registration_info *impl_from_IRegistrationInfo(IRegistrationInfo *iface)
|
static inline registration_info *impl_from_IRegistrationInfo(IRegistrationInfo *iface)
|
||||||
|
@ -115,8 +116,14 @@ static HRESULT WINAPI RegistrationInfo_Invoke(IRegistrationInfo *iface, DISPID d
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_Description(IRegistrationInfo *iface, BSTR *description)
|
static HRESULT WINAPI RegistrationInfo_get_Description(IRegistrationInfo *iface, BSTR *description)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, description);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, description);
|
||||||
|
|
||||||
|
if (!description) return E_POINTER;
|
||||||
|
|
||||||
|
*description = SysAllocString(reginfo->description);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface, BSTR description)
|
static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface, BSTR description)
|
||||||
|
@ -127,8 +134,14 @@ static HRESULT WINAPI RegistrationInfo_put_Description(IRegistrationInfo *iface,
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR *author)
|
static HRESULT WINAPI RegistrationInfo_get_Author(IRegistrationInfo *iface, BSTR *author)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, author);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, author);
|
||||||
|
|
||||||
|
if (!author) return E_POINTER;
|
||||||
|
|
||||||
|
*author = SysAllocString(reginfo->author);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_put_Author(IRegistrationInfo *iface, BSTR author)
|
static HRESULT WINAPI RegistrationInfo_put_Author(IRegistrationInfo *iface, BSTR author)
|
||||||
|
@ -139,8 +152,14 @@ static HRESULT WINAPI RegistrationInfo_put_Author(IRegistrationInfo *iface, BSTR
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_Version(IRegistrationInfo *iface, BSTR *version)
|
static HRESULT WINAPI RegistrationInfo_get_Version(IRegistrationInfo *iface, BSTR *version)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, version);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, version);
|
||||||
|
|
||||||
|
if (!version) return E_POINTER;
|
||||||
|
|
||||||
|
*version = SysAllocString(reginfo->version);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_put_Version(IRegistrationInfo *iface, BSTR version)
|
static HRESULT WINAPI RegistrationInfo_put_Version(IRegistrationInfo *iface, BSTR version)
|
||||||
|
@ -151,8 +170,14 @@ static HRESULT WINAPI RegistrationInfo_put_Version(IRegistrationInfo *iface, BST
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_Date(IRegistrationInfo *iface, BSTR *date)
|
static HRESULT WINAPI RegistrationInfo_get_Date(IRegistrationInfo *iface, BSTR *date)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, date);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, date);
|
||||||
|
|
||||||
|
if (!date) return E_POINTER;
|
||||||
|
|
||||||
|
*date = SysAllocString(reginfo->date);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_put_Date(IRegistrationInfo *iface, BSTR date)
|
static HRESULT WINAPI RegistrationInfo_put_Date(IRegistrationInfo *iface, BSTR date)
|
||||||
|
@ -163,8 +188,14 @@ static HRESULT WINAPI RegistrationInfo_put_Date(IRegistrationInfo *iface, BSTR d
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_Documentation(IRegistrationInfo *iface, BSTR *doc)
|
static HRESULT WINAPI RegistrationInfo_get_Documentation(IRegistrationInfo *iface, BSTR *doc)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, doc);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, doc);
|
||||||
|
|
||||||
|
if (!doc) return E_POINTER;
|
||||||
|
|
||||||
|
*doc = SysAllocString(reginfo->documentation);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_put_Documentation(IRegistrationInfo *iface, BSTR doc)
|
static HRESULT WINAPI RegistrationInfo_put_Documentation(IRegistrationInfo *iface, BSTR doc)
|
||||||
|
@ -187,8 +218,14 @@ static HRESULT WINAPI RegistrationInfo_put_XmlText(IRegistrationInfo *iface, BST
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_URI(IRegistrationInfo *iface, BSTR *uri)
|
static HRESULT WINAPI RegistrationInfo_get_URI(IRegistrationInfo *iface, BSTR *uri)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, uri);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, uri);
|
||||||
|
|
||||||
|
if (!uri) return E_POINTER;
|
||||||
|
|
||||||
|
*uri = SysAllocString(reginfo->uri);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_put_URI(IRegistrationInfo *iface, BSTR uri)
|
static HRESULT WINAPI RegistrationInfo_put_URI(IRegistrationInfo *iface, BSTR uri)
|
||||||
|
@ -211,8 +248,14 @@ static HRESULT WINAPI RegistrationInfo_put_SecurityDescriptor(IRegistrationInfo
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_get_Source(IRegistrationInfo *iface, BSTR *source)
|
static HRESULT WINAPI RegistrationInfo_get_Source(IRegistrationInfo *iface, BSTR *source)
|
||||||
{
|
{
|
||||||
FIXME("%p,%p: stub\n", iface, source);
|
registration_info *reginfo = impl_from_IRegistrationInfo(iface);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE("%p,%p\n", iface, source);
|
||||||
|
|
||||||
|
if (!source) return E_POINTER;
|
||||||
|
|
||||||
|
*source = SysAllocString(reginfo->source);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI RegistrationInfo_put_Source(IRegistrationInfo *iface, BSTR source)
|
static HRESULT WINAPI RegistrationInfo_put_Source(IRegistrationInfo *iface, BSTR source)
|
||||||
|
@ -1238,49 +1281,49 @@ static HRESULT write_registration_info(IStream *stream, IRegistrationInfo *regin
|
||||||
push_indent();
|
push_indent();
|
||||||
|
|
||||||
hr = IRegistrationInfo_get_Source(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Source(reginfo, &bstr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK && bstr)
|
||||||
{
|
{
|
||||||
hr = write_text_value(stream, Source, bstr);
|
hr = write_text_value(stream, Source, bstr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
if (hr != S_OK) return hr;
|
if (hr != S_OK) return hr;
|
||||||
}
|
}
|
||||||
hr = IRegistrationInfo_get_Date(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Date(reginfo, &bstr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK && bstr)
|
||||||
{
|
{
|
||||||
hr = write_text_value(stream, Date, bstr);
|
hr = write_text_value(stream, Date, bstr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
if (hr != S_OK) return hr;
|
if (hr != S_OK) return hr;
|
||||||
}
|
}
|
||||||
hr = IRegistrationInfo_get_Author(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Author(reginfo, &bstr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK && bstr)
|
||||||
{
|
{
|
||||||
hr = write_text_value(stream, Author, bstr);
|
hr = write_text_value(stream, Author, bstr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
if (hr != S_OK) return hr;
|
if (hr != S_OK) return hr;
|
||||||
}
|
}
|
||||||
hr = IRegistrationInfo_get_Version(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Version(reginfo, &bstr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK && bstr)
|
||||||
{
|
{
|
||||||
hr = write_text_value(stream, Version, bstr);
|
hr = write_text_value(stream, Version, bstr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
if (hr != S_OK) return hr;
|
if (hr != S_OK) return hr;
|
||||||
}
|
}
|
||||||
hr = IRegistrationInfo_get_Description(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Description(reginfo, &bstr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK && bstr)
|
||||||
{
|
{
|
||||||
hr = write_text_value(stream, Description, bstr);
|
hr = write_text_value(stream, Description, bstr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
if (hr != S_OK) return hr;
|
if (hr != S_OK) return hr;
|
||||||
}
|
}
|
||||||
hr = IRegistrationInfo_get_Documentation(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Documentation(reginfo, &bstr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK && bstr)
|
||||||
{
|
{
|
||||||
hr = write_text_value(stream, Documentation, bstr);
|
hr = write_text_value(stream, Documentation, bstr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
if (hr != S_OK) return hr;
|
if (hr != S_OK) return hr;
|
||||||
}
|
}
|
||||||
hr = IRegistrationInfo_get_URI(reginfo, &bstr);
|
hr = IRegistrationInfo_get_URI(reginfo, &bstr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK && bstr)
|
||||||
{
|
{
|
||||||
hr = write_text_value(stream, URI, bstr);
|
hr = write_text_value(stream, URI, bstr);
|
||||||
SysFreeString(bstr);
|
SysFreeString(bstr);
|
||||||
|
|
|
@ -1352,42 +1352,27 @@ todo_wine
|
||||||
ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr);
|
ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr);
|
||||||
|
|
||||||
hr = IRegistrationInfo_get_Description(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Description(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_Description error %#x\n", hr);
|
ok(hr == S_OK, "get_Description error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
todo_wine
|
||||||
{
|
|
||||||
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_get_Author(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Author(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_Author error %#x\n", hr);
|
ok(hr == S_OK, "get_Author error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
hr = IRegistrationInfo_get_Version(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Version(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_Version error %#x\n", hr);
|
ok(hr == S_OK, "get_Version error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
hr = IRegistrationInfo_get_Date(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Date(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_Date error %#x\n", hr);
|
ok(hr == S_OK, "get_Date error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
hr = IRegistrationInfo_get_Documentation(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Documentation(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_Documentation error %#x\n", hr);
|
ok(hr == S_OK, "get_Documentation error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
hr = IRegistrationInfo_get_URI(reginfo, &bstr);
|
hr = IRegistrationInfo_get_URI(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_URI error %#x\n", hr);
|
ok(hr == S_OK, "get_URI error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
hr = IRegistrationInfo_get_Source(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Source(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_Source error %#x\n", hr);
|
ok(hr == S_OK, "get_Source error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
V_VT(&var) = VT_BSTR;
|
V_VT(&var) = VT_BSTR;
|
||||||
V_BSTR(&var) = NULL;
|
V_BSTR(&var) = NULL;
|
||||||
|
@ -1406,7 +1391,6 @@ if (hr == S_OK)
|
||||||
ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr);
|
ok(hr == S_OK, "get_RegistrationInfo error %#x\n", hr);
|
||||||
|
|
||||||
hr = IRegistrationInfo_get_Description(reginfo, &bstr);
|
hr = IRegistrationInfo_get_Description(reginfo, &bstr);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "get_Description error %#x\n", hr);
|
ok(hr == S_OK, "get_Description error %#x\n", hr);
|
||||||
if (hr == S_OK)
|
if (hr == S_OK)
|
||||||
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
ok(!bstr, "expected NULL, got %s\n", wine_dbgstr_w(bstr));
|
||||||
|
|
Loading…
Reference in New Issue