Hi Alistair,
On 12/13/09 12:11 PM, Alistair Leslie-Hughes wrote:
Hi,
Changelog: mshtml: Implement IHTMLImgElement get_Name
+ nsres = nsIDOMHTMLImageElement_GetName(This->nsimg,&src_str); + if(NS_FAILED(nsres)) { + ERR("GetName failed: %08x\n", nsres); + return E_FAIL; + }
You leak src_str here.
+#define test_img_name(u) _test_img_name(__LINE__,u) +static void _test_img_name(unsigned line, IUnknown *unk) +{ + IHTMLImgElement *img = _get_img_iface(line, unk); + static WCHAR sNameImage[] = {'W','i','n','e','I','m','g',0};
Please make it more generic and avoid using lstrcmpW by getting expected name as const char* argument and using strcmp_wa to compare strings.
Jacek