static HRESULT WINAPI HTMLBodyElement_get_background(IHTMLBodyElement *iface, BSTR *p) { HTMLBodyElement *This = impl_from_IHTMLBodyElement(iface); nsAString background_str; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&background_str, NULL); nsres = nsIDOMHTMLBodyElement_GetBackground(This->nsbody, &background_str); if(NS_SUCCEEDED(nsres)) { const PRUnichar *background; nsAString_GetData(&background_str, &background); *p = *background ? SysAllocString(background) : NULL; }else { ERR("GetBackground failed: %08x\n", nsres); *p = NULL; } nsAString_Finish(&background_str); TRACE("*p = %s\n", debugstr_w(*p)); return S_OK; }
static HRESULT WINAPI HTMLBodyElement_get_background(IHTMLBodyElement *iface, BSTR *p) { HTMLBodyElement *This = impl_from_IHTMLBodyElement(iface); nsAString background_str; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&background_str, NULL); nsres = nsIDOMHTMLBodyElement_GetBackground(This->nsbody, &background_str); return return_nsstr(nsres, &background_str, p); }