static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p) { HTMLInputElement *This = impl_from_IHTMLInputElement(iface); nsAString type_str; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&type_str, NULL); nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &type_str); return return_nsstr(nsres, &type_str, p); }
static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p) { HTMLInputElement *This = HTMLINPUT_THIS(iface); nsAString type_str; const PRUnichar *type; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsAString_Init(&type_str, NULL); nsres = nsIDOMHTMLInputElement_GetType(This->nsinput, &type_str); if(NS_SUCCEEDED(nsres)) { nsAString_GetData(&type_str, &type); *p = SysAllocString(type); }else { ERR("GetType failed: %08x\n", nsres); } nsAString_Finish(&type_str); TRACE("type=%s\n", debugstr_w(*p)); return S_OK; }