shell32: Add some selection tests.
[wine/multimedia.git] / dlls / mshtml / htmlanchor.c
blob02a05a703772755b63959027b92f51bee4ec1e75
1 /*
2 * Copyright 2007 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
20 #include <stdio.h>
22 #define COBJMACROS
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "ole2.h"
29 #include "wine/debug.h"
31 #include "mshtml_private.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
35 typedef struct {
36 HTMLElement element;
38 IHTMLAnchorElement IHTMLAnchorElement_iface;
40 nsIDOMHTMLAnchorElement *nsanchor;
41 } HTMLAnchorElement;
43 static inline HTMLAnchorElement *impl_from_IHTMLAnchorElement(IHTMLAnchorElement *iface)
45 return CONTAINING_RECORD(iface, HTMLAnchorElement, IHTMLAnchorElement_iface);
48 static HRESULT WINAPI HTMLAnchorElement_QueryInterface(IHTMLAnchorElement *iface,
49 REFIID riid, void **ppv)
51 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
53 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
56 static ULONG WINAPI HTMLAnchorElement_AddRef(IHTMLAnchorElement *iface)
58 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
60 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
63 static ULONG WINAPI HTMLAnchorElement_Release(IHTMLAnchorElement *iface)
65 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
67 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
70 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfoCount(IHTMLAnchorElement *iface, UINT *pctinfo)
72 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
73 return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
76 static HRESULT WINAPI HTMLAnchorElement_GetTypeInfo(IHTMLAnchorElement *iface, UINT iTInfo,
77 LCID lcid, ITypeInfo **ppTInfo)
79 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
80 return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid,
81 ppTInfo);
84 static HRESULT WINAPI HTMLAnchorElement_GetIDsOfNames(IHTMLAnchorElement *iface, REFIID riid,
85 LPOLESTR *rgszNames, UINT cNames,
86 LCID lcid, DISPID *rgDispId)
88 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
89 return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
90 cNames, lcid, rgDispId);
93 static HRESULT WINAPI HTMLAnchorElement_Invoke(IHTMLAnchorElement *iface, DISPID dispIdMember,
94 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
95 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
97 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
98 return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
99 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
102 static HRESULT WINAPI HTMLAnchorElement_put_href(IHTMLAnchorElement *iface, BSTR v)
104 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
105 nsAString nsstr;
106 nsresult nsres;
108 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
110 nsAString_InitDepend(&nsstr, v);
111 nsres = nsIDOMHTMLAnchorElement_SetHref(This->nsanchor, &nsstr);
112 nsAString_Finish(&nsstr);
113 if(NS_FAILED(nsres))
114 return E_FAIL;
116 return S_OK;
119 static HRESULT WINAPI HTMLAnchorElement_get_href(IHTMLAnchorElement *iface, BSTR *p)
121 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
122 nsAString href_str;
123 nsresult nsres;
124 HRESULT hres;
126 TRACE("(%p)->(%p)\n", This, p);
128 nsAString_Init(&href_str, NULL);
129 nsres = nsIDOMHTMLAnchorElement_GetHref(This->nsanchor, &href_str);
130 if(NS_SUCCEEDED(nsres)) {
131 const PRUnichar *href;
133 nsAString_GetData(&href_str, &href);
134 hres = nsuri_to_url(href, TRUE, p);
135 }else {
136 ERR("GetHref failed: %08x\n", nsres);
137 hres = E_FAIL;
140 nsAString_Finish(&href_str);
141 return hres;
144 static HRESULT WINAPI HTMLAnchorElement_put_target(IHTMLAnchorElement *iface, BSTR v)
146 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
147 nsAString nsstr;
148 nsresult nsres;
150 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
152 nsAString_InitDepend(&nsstr, v);
153 nsres = nsIDOMHTMLAnchorElement_SetTarget(This->nsanchor, &nsstr);
154 nsAString_Finish(&nsstr);
155 if(NS_FAILED(nsres))
156 return E_FAIL;
158 return S_OK;
161 static HRESULT WINAPI HTMLAnchorElement_get_target(IHTMLAnchorElement *iface, BSTR *p)
163 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
164 nsAString target_str;
165 nsresult nsres;
167 TRACE("(%p)->(%p)\n", This, p);
169 nsAString_Init(&target_str, NULL);
170 nsres = nsIDOMHTMLAnchorElement_GetTarget(This->nsanchor, &target_str);
172 return return_nsstr(nsres, &target_str, p);
175 static HRESULT WINAPI HTMLAnchorElement_put_rel(IHTMLAnchorElement *iface, BSTR v)
177 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
178 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
179 return E_NOTIMPL;
182 static HRESULT WINAPI HTMLAnchorElement_get_rel(IHTMLAnchorElement *iface, BSTR *p)
184 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
185 FIXME("(%p)->(%p)\n", This, p);
186 return E_NOTIMPL;
189 static HRESULT WINAPI HTMLAnchorElement_put_rev(IHTMLAnchorElement *iface, BSTR v)
191 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
192 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
193 return E_NOTIMPL;
196 static HRESULT WINAPI HTMLAnchorElement_get_rev(IHTMLAnchorElement *iface, BSTR *p)
198 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
199 FIXME("(%p)->(%p)\n", This, p);
200 return E_NOTIMPL;
203 static HRESULT WINAPI HTMLAnchorElement_put_urn(IHTMLAnchorElement *iface, BSTR v)
205 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
206 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
207 return E_NOTIMPL;
210 static HRESULT WINAPI HTMLAnchorElement_get_urn(IHTMLAnchorElement *iface, BSTR *p)
212 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
213 FIXME("(%p)->(%p)\n", This, p);
214 return E_NOTIMPL;
217 static HRESULT WINAPI HTMLAnchorElement_put_Methods(IHTMLAnchorElement *iface, BSTR v)
219 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
220 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
221 return E_NOTIMPL;
224 static HRESULT WINAPI HTMLAnchorElement_get_Methods(IHTMLAnchorElement *iface, BSTR *p)
226 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
227 FIXME("(%p)->(%p)\n", This, p);
228 return E_NOTIMPL;
231 static HRESULT WINAPI HTMLAnchorElement_put_name(IHTMLAnchorElement *iface, BSTR v)
233 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
234 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
235 return E_NOTIMPL;
238 static HRESULT WINAPI HTMLAnchorElement_get_name(IHTMLAnchorElement *iface, BSTR *p)
240 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
241 FIXME("(%p)->(%p)\n", This, p);
242 return E_NOTIMPL;
245 static HRESULT WINAPI HTMLAnchorElement_put_host(IHTMLAnchorElement *iface, BSTR v)
247 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
248 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
249 return E_NOTIMPL;
252 static HRESULT WINAPI HTMLAnchorElement_get_host(IHTMLAnchorElement *iface, BSTR *p)
254 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
255 FIXME("(%p)->(%p)\n", This, p);
256 return E_NOTIMPL;
259 static HRESULT WINAPI HTMLAnchorElement_put_hostname(IHTMLAnchorElement *iface, BSTR v)
261 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
262 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
263 return E_NOTIMPL;
266 static HRESULT WINAPI HTMLAnchorElement_get_hostname(IHTMLAnchorElement *iface, BSTR *p)
268 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
269 FIXME("(%p)->(%p)\n", This, p);
270 return E_NOTIMPL;
273 static HRESULT WINAPI HTMLAnchorElement_put_pathname(IHTMLAnchorElement *iface, BSTR v)
275 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
276 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
277 return E_NOTIMPL;
280 static HRESULT WINAPI HTMLAnchorElement_get_pathname(IHTMLAnchorElement *iface, BSTR *p)
282 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
283 FIXME("(%p)->(%p)\n", This, p);
284 return E_NOTIMPL;
287 static HRESULT WINAPI HTMLAnchorElement_put_port(IHTMLAnchorElement *iface, BSTR v)
289 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
290 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
291 return E_NOTIMPL;
294 static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR *p)
296 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
297 FIXME("(%p)->(%p)\n", This, p);
298 return E_NOTIMPL;
301 static HRESULT WINAPI HTMLAnchorElement_put_protocol(IHTMLAnchorElement *iface, BSTR v)
303 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
304 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
305 return E_NOTIMPL;
308 static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, BSTR *p)
310 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
311 FIXME("(%p)->(%p)\n", This, p);
312 return E_NOTIMPL;
315 static HRESULT WINAPI HTMLAnchorElement_put_search(IHTMLAnchorElement *iface, BSTR v)
317 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
318 FIXME("(%p)->(%p)\n", This, debugstr_w(v));
319 return E_NOTIMPL;
322 static HRESULT WINAPI HTMLAnchorElement_get_search(IHTMLAnchorElement *iface, BSTR *p)
324 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
325 FIXME("(%p)->(%p)\n", This, p);
326 return E_NOTIMPL;
329 static HRESULT WINAPI HTMLAnchorElement_put_hash(IHTMLAnchorElement *iface, BSTR v)
331 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
332 FIXME("(%p)->(%s)\n", This, debugstr_w(v));
333 return E_NOTIMPL;
336 static HRESULT WINAPI HTMLAnchorElement_get_hash(IHTMLAnchorElement *iface, BSTR *p)
338 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
339 FIXME("(%p)->(%p)\n", This, p);
340 return E_NOTIMPL;
343 static HRESULT WINAPI HTMLAnchorElement_put_onblur(IHTMLAnchorElement *iface, VARIANT v)
345 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
347 TRACE("(%p)->()\n", This);
349 return IHTMLElement2_put_onblur(&This->element.IHTMLElement2_iface, v);
352 static HRESULT WINAPI HTMLAnchorElement_get_onblur(IHTMLAnchorElement *iface, VARIANT *p)
354 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
356 TRACE("(%p)->(%p)\n", This, p);
358 return IHTMLElement2_get_onblur(&This->element.IHTMLElement2_iface, p);
361 static HRESULT WINAPI HTMLAnchorElement_put_onfocus(IHTMLAnchorElement *iface, VARIANT v)
363 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
365 TRACE("(%p)->()\n", This);
367 return IHTMLElement2_put_onfocus(&This->element.IHTMLElement2_iface, v);
370 static HRESULT WINAPI HTMLAnchorElement_get_onfocus(IHTMLAnchorElement *iface, VARIANT *p)
372 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
374 TRACE("(%p)->(%p)\n", This, p);
376 return IHTMLElement2_get_onfocus(&This->element.IHTMLElement2_iface, p);
379 static HRESULT WINAPI HTMLAnchorElement_put_accessKey(IHTMLAnchorElement *iface, BSTR v)
381 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
383 TRACE("(%p)->(%s)\n", This, debugstr_w(v));
385 return IHTMLElement2_put_accessKey(&This->element.IHTMLElement2_iface, v);
388 static HRESULT WINAPI HTMLAnchorElement_get_accessKey(IHTMLAnchorElement *iface, BSTR *p)
390 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
392 TRACE("(%p)->(%p)\n", This, p);
394 return IHTMLElement2_get_accessKey(&This->element.IHTMLElement2_iface, p);
397 static HRESULT WINAPI HTMLAnchorElement_get_protocolLong(IHTMLAnchorElement *iface, BSTR *p)
399 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
400 FIXME("(%p)->(%p)\n", This, p);
401 return E_NOTIMPL;
404 static HRESULT WINAPI HTMLAnchorElement_get_mimeType(IHTMLAnchorElement *iface, BSTR *p)
406 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
407 FIXME("(%p)->(%p)\n", This, p);
408 return E_NOTIMPL;
411 static HRESULT WINAPI HTMLAnchorElement_get_nameProp(IHTMLAnchorElement *iface, BSTR *p)
413 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
414 FIXME("(%p)->(%p)\n", This, p);
415 return E_NOTIMPL;
418 static HRESULT WINAPI HTMLAnchorElement_put_tabIndex(IHTMLAnchorElement *iface, short v)
420 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
422 TRACE("(%p)->()\n", This);
424 return IHTMLElement2_put_tabIndex(&This->element.IHTMLElement2_iface, v);
427 static HRESULT WINAPI HTMLAnchorElement_get_tabIndex(IHTMLAnchorElement *iface, short *p)
429 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
431 TRACE("(%p)->(%p)\n", This, p);
433 return IHTMLElement2_get_tabIndex(&This->element.IHTMLElement2_iface, p);
436 static HRESULT WINAPI HTMLAnchorElement_focus(IHTMLAnchorElement *iface)
438 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
440 TRACE("(%p)\n", This);
442 return IHTMLElement2_focus(&This->element.IHTMLElement2_iface);
445 static HRESULT WINAPI HTMLAnchorElement_blur(IHTMLAnchorElement *iface)
447 HTMLAnchorElement *This = impl_from_IHTMLAnchorElement(iface);
449 TRACE("(%p)\n", This);
451 return IHTMLElement2_blur(&This->element.IHTMLElement2_iface);
454 static const IHTMLAnchorElementVtbl HTMLAnchorElementVtbl = {
455 HTMLAnchorElement_QueryInterface,
456 HTMLAnchorElement_AddRef,
457 HTMLAnchorElement_Release,
458 HTMLAnchorElement_GetTypeInfoCount,
459 HTMLAnchorElement_GetTypeInfo,
460 HTMLAnchorElement_GetIDsOfNames,
461 HTMLAnchorElement_Invoke,
462 HTMLAnchorElement_put_href,
463 HTMLAnchorElement_get_href,
464 HTMLAnchorElement_put_target,
465 HTMLAnchorElement_get_target,
466 HTMLAnchorElement_put_rel,
467 HTMLAnchorElement_get_rel,
468 HTMLAnchorElement_put_rev,
469 HTMLAnchorElement_get_rev,
470 HTMLAnchorElement_put_urn,
471 HTMLAnchorElement_get_urn,
472 HTMLAnchorElement_put_Methods,
473 HTMLAnchorElement_get_Methods,
474 HTMLAnchorElement_put_name,
475 HTMLAnchorElement_get_name,
476 HTMLAnchorElement_put_host,
477 HTMLAnchorElement_get_host,
478 HTMLAnchorElement_put_hostname,
479 HTMLAnchorElement_get_hostname,
480 HTMLAnchorElement_put_pathname,
481 HTMLAnchorElement_get_pathname,
482 HTMLAnchorElement_put_port,
483 HTMLAnchorElement_get_port,
484 HTMLAnchorElement_put_protocol,
485 HTMLAnchorElement_get_protocol,
486 HTMLAnchorElement_put_search,
487 HTMLAnchorElement_get_search,
488 HTMLAnchorElement_put_hash,
489 HTMLAnchorElement_get_hash,
490 HTMLAnchorElement_put_onblur,
491 HTMLAnchorElement_get_onblur,
492 HTMLAnchorElement_put_onfocus,
493 HTMLAnchorElement_get_onfocus,
494 HTMLAnchorElement_put_accessKey,
495 HTMLAnchorElement_get_accessKey,
496 HTMLAnchorElement_get_protocolLong,
497 HTMLAnchorElement_get_mimeType,
498 HTMLAnchorElement_get_nameProp,
499 HTMLAnchorElement_put_tabIndex,
500 HTMLAnchorElement_get_tabIndex,
501 HTMLAnchorElement_focus,
502 HTMLAnchorElement_blur
505 static inline HTMLAnchorElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface)
507 return CONTAINING_RECORD(iface, HTMLAnchorElement, element.node);
510 static HRESULT HTMLAnchorElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
512 HTMLAnchorElement *This = impl_from_HTMLDOMNode(iface);
514 *ppv = NULL;
516 if(IsEqualGUID(&IID_IUnknown, riid)) {
517 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
518 *ppv = &This->IHTMLAnchorElement_iface;
519 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
520 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
521 *ppv = &This->IHTMLAnchorElement_iface;
522 }else if(IsEqualGUID(&IID_IHTMLAnchorElement, riid)) {
523 TRACE("(%p)->(IID_IHTMLAnchorElement %p)\n", This, ppv);
524 *ppv = &This->IHTMLAnchorElement_iface;
527 if(*ppv) {
528 IUnknown_AddRef((IUnknown*)*ppv);
529 return S_OK;
532 return HTMLElement_QI(&This->element.node, riid, ppv);
535 static void HTMLAnchorElement_destructor(HTMLDOMNode *iface)
537 HTMLAnchorElement *This = impl_from_HTMLDOMNode(iface);
539 if(This->nsanchor)
540 nsIDOMHTMLAnchorElement_Release(This->nsanchor);
542 HTMLElement_destructor(&This->element.node);
545 static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
546 HTMLAnchorElement_QI,
547 HTMLAnchorElement_destructor,
548 HTMLElement_clone
551 static const tid_t HTMLAnchorElement_iface_tids[] = {
552 IHTMLAnchorElement_tid,
553 HTMLELEMENT_TIDS,
554 IHTMLTextContainer_tid,
555 IHTMLUniqueName_tid,
559 static dispex_static_data_t HTMLAnchorElement_dispex = {
560 NULL,
561 DispHTMLAnchorElement_tid,
562 NULL,
563 HTMLAnchorElement_iface_tids
566 HRESULT HTMLAnchorElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
568 HTMLAnchorElement *ret;
569 nsresult nsres;
571 ret = heap_alloc_zero(sizeof(HTMLAnchorElement));
572 if(!ret)
573 return E_OUTOFMEMORY;
575 ret->IHTMLAnchorElement_iface.lpVtbl = &HTMLAnchorElementVtbl;
576 ret->element.node.vtbl = &HTMLAnchorElementImplVtbl;
578 nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLAnchorElement, (void**)&ret->nsanchor);
579 if(NS_FAILED(nsres)) {
580 ERR("Could not get nsIDOMHTMLAnchorElement iface: %08x\n", nsres);
581 heap_free(ret);
582 return E_FAIL;
585 HTMLElement_Init(&ret->element, doc, nselem, &HTMLAnchorElement_dispex);
587 *elem = &ret->element;
588 return S_OK;