static HRESULT WINAPI HTMLSelectElement_get_value(IHTMLSelectElement *iface, BSTR *p) { HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface); nsAString value_str; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&value_str, NULL); nsres = nsIDOMHTMLSelectElement_GetValue(This->nsselect, &value_str); return return_nsstr(nsres, &value_str, p); }
static HRESULT WINAPI HTMLSelectElement_get_value(IHTMLSelectElement *iface, BSTR *p) { HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface); nsAString value_str; const PRUnichar *value = NULL; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&value_str, NULL); nsres = nsIDOMHTMLSelectElement_GetValue(This->nsselect, &value_str); if(NS_SUCCEEDED(nsres)) { nsAString_GetData(&value_str, &value); *p = *value ? SysAllocString(value) : NULL; }else { ERR("GetValue failed: %08x\n", nsres); } nsAString_Finish(&value_str); TRACE("value=%s\n", debugstr_w(*p)); return S_OK; }