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