static HRESULT WINAPI HTMLOptionElement_get_text(IHTMLOptionElement *iface, BSTR *p) { HTMLOptionElement *This = impl_from_IHTMLOptionElement(iface); nsAString text_str; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&text_str, NULL); nsres = nsIDOMHTMLOptionElement_GetText(This->nsoption, &text_str); return return_nsstr(nsres, &text_str, p); }
static HRESULT WINAPI HTMLOptionElement_get_text(IHTMLOptionElement *iface, BSTR *p) { HTMLOptionElement *This = impl_from_IHTMLOptionElement(iface); nsAString text_str; const PRUnichar *text; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&text_str, NULL); nsres = nsIDOMHTMLOptionElement_GetText(This->nsoption, &text_str); if(NS_SUCCEEDED(nsres)) { nsAString_GetData(&text_str, &text); *p = SysAllocString(text); }else { ERR("GetText failed: %08x\n", nsres); *p = NULL; } nsAString_Finish(&text_str); return S_OK; }