2 * Copyright 2008,2009 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
28 #include "wine/debug.h"
30 #include "mshtml_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
34 typedef struct HTMLPluginsCollection HTMLPluginsCollection
;
35 typedef struct HTMLMimeTypesCollection HTMLMimeTypesCollection
;
39 IOmNavigator IOmNavigator_iface
;
43 HTMLPluginsCollection
*plugins
;
44 HTMLMimeTypesCollection
*mime_types
;
49 IHTMLDOMImplementation IHTMLDOMImplementation_iface
;
52 } HTMLDOMImplementation
;
54 static inline HTMLDOMImplementation
*impl_from_IHTMLDOMImplementation(IHTMLDOMImplementation
*iface
)
56 return CONTAINING_RECORD(iface
, HTMLDOMImplementation
, IHTMLDOMImplementation_iface
);
59 static HRESULT WINAPI
HTMLDOMImplementation_QueryInterface(IHTMLDOMImplementation
*iface
, REFIID riid
, void **ppv
)
61 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
63 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
65 if(IsEqualGUID(&IID_IUnknown
, riid
) || IsEqualGUID(&IID_IHTMLDOMImplementation
, riid
)) {
66 *ppv
= &This
->IHTMLDOMImplementation_iface
;
67 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
68 return *ppv
? S_OK
: E_NOINTERFACE
;
70 WARN("Unsupported interface %s\n", debugstr_mshtml_guid(riid
));
75 IUnknown_AddRef((IUnknown
*)*ppv
);
79 static ULONG WINAPI
HTMLDOMImplementation_AddRef(IHTMLDOMImplementation
*iface
)
81 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
82 LONG ref
= InterlockedIncrement(&This
->ref
);
84 TRACE("(%p) ref=%d\n", This
, ref
);
89 static ULONG WINAPI
HTMLDOMImplementation_Release(IHTMLDOMImplementation
*iface
)
91 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
92 LONG ref
= InterlockedDecrement(&This
->ref
);
94 TRACE("(%p) ref=%d\n", This
, ref
);
97 release_dispex(&This
->dispex
);
104 static HRESULT WINAPI
HTMLDOMImplementation_GetTypeInfoCount(IHTMLDOMImplementation
*iface
, UINT
*pctinfo
)
106 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
108 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
111 static HRESULT WINAPI
HTMLDOMImplementation_GetTypeInfo(IHTMLDOMImplementation
*iface
, UINT iTInfo
,
112 LCID lcid
, ITypeInfo
**ppTInfo
)
114 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
116 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
119 static HRESULT WINAPI
HTMLDOMImplementation_GetIDsOfNames(IHTMLDOMImplementation
*iface
, REFIID riid
,
120 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
122 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
124 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
,
125 cNames
, lcid
, rgDispId
);
128 static HRESULT WINAPI
HTMLDOMImplementation_Invoke(IHTMLDOMImplementation
*iface
, DISPID dispIdMember
,
129 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
130 EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
132 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
134 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
,
135 lcid
, wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
138 static HRESULT WINAPI
HTMLDOMImplementation_hasFeature(IHTMLDOMImplementation
*iface
, BSTR feature
,
139 VARIANT version
, VARIANT_BOOL
*pfHasFeature
)
141 HTMLDOMImplementation
*This
= impl_from_IHTMLDOMImplementation(iface
);
143 FIXME("(%p)->(%s %s %p) returning false\n", This
, debugstr_w(feature
), debugstr_variant(&version
), pfHasFeature
);
145 *pfHasFeature
= VARIANT_FALSE
;
149 static const IHTMLDOMImplementationVtbl HTMLDOMImplementationVtbl
= {
150 HTMLDOMImplementation_QueryInterface
,
151 HTMLDOMImplementation_AddRef
,
152 HTMLDOMImplementation_Release
,
153 HTMLDOMImplementation_GetTypeInfoCount
,
154 HTMLDOMImplementation_GetTypeInfo
,
155 HTMLDOMImplementation_GetIDsOfNames
,
156 HTMLDOMImplementation_Invoke
,
157 HTMLDOMImplementation_hasFeature
160 static const tid_t HTMLDOMImplementation_iface_tids
[] = {
161 IHTMLDOMImplementation_tid
,
164 static dispex_static_data_t HTMLDOMImplementation_dispex
= {
166 IHTMLDOMImplementation_tid
,
167 HTMLDOMImplementation_iface_tids
170 HRESULT
create_dom_implementation(IHTMLDOMImplementation
**ret
)
172 HTMLDOMImplementation
*dom_implementation
;
174 dom_implementation
= heap_alloc_zero(sizeof(*dom_implementation
));
175 if(!dom_implementation
)
176 return E_OUTOFMEMORY
;
178 dom_implementation
->IHTMLDOMImplementation_iface
.lpVtbl
= &HTMLDOMImplementationVtbl
;
179 dom_implementation
->ref
= 1;
181 init_dispex(&dom_implementation
->dispex
, (IUnknown
*)&dom_implementation
->IHTMLDOMImplementation_iface
,
182 &HTMLDOMImplementation_dispex
);
184 *ret
= &dom_implementation
->IHTMLDOMImplementation_iface
;
190 IHTMLScreen IHTMLScreen_iface
;
195 static inline HTMLScreen
*impl_from_IHTMLScreen(IHTMLScreen
*iface
)
197 return CONTAINING_RECORD(iface
, HTMLScreen
, IHTMLScreen_iface
);
200 static HRESULT WINAPI
HTMLScreen_QueryInterface(IHTMLScreen
*iface
, REFIID riid
, void **ppv
)
202 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
204 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
206 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
207 *ppv
= &This
->IHTMLScreen_iface
;
208 }else if(IsEqualGUID(&IID_IHTMLScreen
, riid
)) {
209 *ppv
= &This
->IHTMLScreen_iface
;
210 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
211 return *ppv
? S_OK
: E_NOINTERFACE
;
214 WARN("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
215 return E_NOINTERFACE
;
218 IUnknown_AddRef((IUnknown
*)*ppv
);
222 static ULONG WINAPI
HTMLScreen_AddRef(IHTMLScreen
*iface
)
224 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
225 LONG ref
= InterlockedIncrement(&This
->ref
);
227 TRACE("(%p) ref=%d\n", This
, ref
);
232 static ULONG WINAPI
HTMLScreen_Release(IHTMLScreen
*iface
)
234 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
235 LONG ref
= InterlockedDecrement(&This
->ref
);
237 TRACE("(%p) ref=%d\n", This
, ref
);
240 release_dispex(&This
->dispex
);
247 static HRESULT WINAPI
HTMLScreen_GetTypeInfoCount(IHTMLScreen
*iface
, UINT
*pctinfo
)
249 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
250 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
253 static HRESULT WINAPI
HTMLScreen_GetTypeInfo(IHTMLScreen
*iface
, UINT iTInfo
,
254 LCID lcid
, ITypeInfo
**ppTInfo
)
256 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
257 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
260 static HRESULT WINAPI
HTMLScreen_GetIDsOfNames(IHTMLScreen
*iface
, REFIID riid
,
261 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
263 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
264 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
268 static HRESULT WINAPI
HTMLScreen_Invoke(IHTMLScreen
*iface
, DISPID dispIdMember
,
269 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
270 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
272 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
273 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
, wFlags
,
274 pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
277 static HRESULT WINAPI
HTMLScreen_get_colorDepth(IHTMLScreen
*iface
, LONG
*p
)
279 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
282 TRACE("(%p)->(%p)\n", This
, p
);
284 *p
= GetDeviceCaps(hdc
, BITSPIXEL
);
289 static HRESULT WINAPI
HTMLScreen_put_bufferDepth(IHTMLScreen
*iface
, LONG v
)
291 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
292 FIXME("(%p)->(%d)\n", This
, v
);
296 static HRESULT WINAPI
HTMLScreen_get_bufferDepth(IHTMLScreen
*iface
, LONG
*p
)
298 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
299 FIXME("(%p)->(%p)\n", This
, p
);
303 static HRESULT WINAPI
HTMLScreen_get_width(IHTMLScreen
*iface
, LONG
*p
)
305 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
307 TRACE("(%p)->(%p)\n", This
, p
);
309 *p
= GetSystemMetrics(SM_CXSCREEN
);
313 static HRESULT WINAPI
HTMLScreen_get_height(IHTMLScreen
*iface
, LONG
*p
)
315 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
317 TRACE("(%p)->(%p)\n", This
, p
);
319 *p
= GetSystemMetrics(SM_CYSCREEN
);
323 static HRESULT WINAPI
HTMLScreen_put_updateInterval(IHTMLScreen
*iface
, LONG v
)
325 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
326 FIXME("(%p)->(%d)\n", This
, v
);
330 static HRESULT WINAPI
HTMLScreen_get_updateInterval(IHTMLScreen
*iface
, LONG
*p
)
332 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
333 FIXME("(%p)->(%p)\n", This
, p
);
337 static HRESULT WINAPI
HTMLScreen_get_availHeight(IHTMLScreen
*iface
, LONG
*p
)
339 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
342 TRACE("(%p)->(%p)\n", This
, p
);
344 if(!SystemParametersInfoW(SPI_GETWORKAREA
, 0, &work_area
, 0))
347 *p
= work_area
.bottom
-work_area
.top
;
351 static HRESULT WINAPI
HTMLScreen_get_availWidth(IHTMLScreen
*iface
, LONG
*p
)
353 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
356 TRACE("(%p)->(%p)\n", This
, p
);
358 if(!SystemParametersInfoW(SPI_GETWORKAREA
, 0, &work_area
, 0))
361 *p
= work_area
.right
-work_area
.left
;
365 static HRESULT WINAPI
HTMLScreen_get_fontSmoothingEnabled(IHTMLScreen
*iface
, VARIANT_BOOL
*p
)
367 HTMLScreen
*This
= impl_from_IHTMLScreen(iface
);
368 FIXME("(%p)->(%p)\n", This
, p
);
372 static const IHTMLScreenVtbl HTMLSreenVtbl
= {
373 HTMLScreen_QueryInterface
,
376 HTMLScreen_GetTypeInfoCount
,
377 HTMLScreen_GetTypeInfo
,
378 HTMLScreen_GetIDsOfNames
,
380 HTMLScreen_get_colorDepth
,
381 HTMLScreen_put_bufferDepth
,
382 HTMLScreen_get_bufferDepth
,
383 HTMLScreen_get_width
,
384 HTMLScreen_get_height
,
385 HTMLScreen_put_updateInterval
,
386 HTMLScreen_get_updateInterval
,
387 HTMLScreen_get_availHeight
,
388 HTMLScreen_get_availWidth
,
389 HTMLScreen_get_fontSmoothingEnabled
392 static const tid_t HTMLScreen_iface_tids
[] = {
396 static dispex_static_data_t HTMLScreen_dispex
= {
399 HTMLScreen_iface_tids
402 HRESULT
HTMLScreen_Create(IHTMLScreen
**ret
)
406 screen
= heap_alloc_zero(sizeof(HTMLScreen
));
408 return E_OUTOFMEMORY
;
410 screen
->IHTMLScreen_iface
.lpVtbl
= &HTMLSreenVtbl
;
413 init_dispex(&screen
->dispex
, (IUnknown
*)&screen
->IHTMLScreen_iface
, &HTMLScreen_dispex
);
415 *ret
= &screen
->IHTMLScreen_iface
;
419 static inline OmHistory
*impl_from_IOmHistory(IOmHistory
*iface
)
421 return CONTAINING_RECORD(iface
, OmHistory
, IOmHistory_iface
);
424 static HRESULT WINAPI
OmHistory_QueryInterface(IOmHistory
*iface
, REFIID riid
, void **ppv
)
426 OmHistory
*This
= impl_from_IOmHistory(iface
);
428 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
430 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
431 *ppv
= &This
->IOmHistory_iface
;
432 }else if(IsEqualGUID(&IID_IOmHistory
, riid
)) {
433 *ppv
= &This
->IOmHistory_iface
;
434 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
435 return *ppv
? S_OK
: E_NOINTERFACE
;
437 WARN("Unsupported interface %s\n", debugstr_mshtml_guid(riid
));
439 return E_NOINTERFACE
;
442 IUnknown_AddRef((IUnknown
*)*ppv
);
446 static ULONG WINAPI
OmHistory_AddRef(IOmHistory
*iface
)
448 OmHistory
*This
= impl_from_IOmHistory(iface
);
449 LONG ref
= InterlockedIncrement(&This
->ref
);
451 TRACE("(%p) ref=%d\n", This
, ref
);
456 static ULONG WINAPI
OmHistory_Release(IOmHistory
*iface
)
458 OmHistory
*This
= impl_from_IOmHistory(iface
);
459 LONG ref
= InterlockedDecrement(&This
->ref
);
461 TRACE("(%p) ref=%d\n", This
, ref
);
464 release_dispex(&This
->dispex
);
471 static HRESULT WINAPI
OmHistory_GetTypeInfoCount(IOmHistory
*iface
, UINT
*pctinfo
)
473 OmHistory
*This
= impl_from_IOmHistory(iface
);
474 FIXME("(%p)->(%p)\n", This
, pctinfo
);
478 static HRESULT WINAPI
OmHistory_GetTypeInfo(IOmHistory
*iface
, UINT iTInfo
,
479 LCID lcid
, ITypeInfo
**ppTInfo
)
481 OmHistory
*This
= impl_from_IOmHistory(iface
);
483 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
486 static HRESULT WINAPI
OmHistory_GetIDsOfNames(IOmHistory
*iface
, REFIID riid
, LPOLESTR
*rgszNames
, UINT cNames
,
487 LCID lcid
, DISPID
*rgDispId
)
489 OmHistory
*This
= impl_from_IOmHistory(iface
);
491 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
495 static HRESULT WINAPI
OmHistory_Invoke(IOmHistory
*iface
, DISPID dispIdMember
, REFIID riid
, LCID lcid
,
496 WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
498 OmHistory
*This
= impl_from_IOmHistory(iface
);
500 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
, wFlags
,
501 pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
504 static HRESULT WINAPI
OmHistory_get_length(IOmHistory
*iface
, short *p
)
506 OmHistory
*This
= impl_from_IOmHistory(iface
);
508 TRACE("(%p)->(%p)\n", This
, p
);
510 if(!This
->window
|| !This
->window
->base
.outer_window
->doc_obj
511 || !This
->window
->base
.outer_window
->doc_obj
->travel_log
) {
514 *p
= ITravelLog_CountEntries(This
->window
->base
.outer_window
->doc_obj
->travel_log
,
515 This
->window
->base
.outer_window
->doc_obj
->browser_service
);
520 static HRESULT WINAPI
OmHistory_back(IOmHistory
*iface
, VARIANT
*pvargdistance
)
522 OmHistory
*This
= impl_from_IOmHistory(iface
);
523 FIXME("(%p)->(%s)\n", This
, debugstr_variant(pvargdistance
));
527 static HRESULT WINAPI
OmHistory_forward(IOmHistory
*iface
, VARIANT
*pvargdistance
)
529 OmHistory
*This
= impl_from_IOmHistory(iface
);
530 FIXME("(%p)->(%s)\n", This
, debugstr_variant(pvargdistance
));
534 static HRESULT WINAPI
OmHistory_go(IOmHistory
*iface
, VARIANT
*pvargdistance
)
536 OmHistory
*This
= impl_from_IOmHistory(iface
);
537 FIXME("(%p)->(%s)\n", This
, debugstr_variant(pvargdistance
));
541 static const IOmHistoryVtbl OmHistoryVtbl
= {
542 OmHistory_QueryInterface
,
545 OmHistory_GetTypeInfoCount
,
546 OmHistory_GetTypeInfo
,
547 OmHistory_GetIDsOfNames
,
549 OmHistory_get_length
,
555 static const tid_t OmHistory_iface_tids
[] = {
559 static dispex_static_data_t OmHistory_dispex
= {
566 HRESULT
create_history(HTMLInnerWindow
*window
, OmHistory
**ret
)
570 history
= heap_alloc_zero(sizeof(*history
));
572 return E_OUTOFMEMORY
;
574 init_dispex(&history
->dispex
, (IUnknown
*)&history
->IOmHistory_iface
, &OmHistory_dispex
);
575 history
->IOmHistory_iface
.lpVtbl
= &OmHistoryVtbl
;
578 history
->window
= window
;
584 struct HTMLPluginsCollection
{
586 IHTMLPluginsCollection IHTMLPluginsCollection_iface
;
590 OmNavigator
*navigator
;
593 static inline HTMLPluginsCollection
*impl_from_IHTMLPluginsCollection(IHTMLPluginsCollection
*iface
)
595 return CONTAINING_RECORD(iface
, HTMLPluginsCollection
, IHTMLPluginsCollection_iface
);
598 static HRESULT WINAPI
HTMLPluginsCollection_QueryInterface(IHTMLPluginsCollection
*iface
, REFIID riid
, void **ppv
)
600 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
602 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
604 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
605 *ppv
= &This
->IHTMLPluginsCollection_iface
;
606 }else if(IsEqualGUID(&IID_IHTMLPluginsCollection
, riid
)) {
607 *ppv
= &This
->IHTMLPluginsCollection_iface
;
608 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
609 return *ppv
? S_OK
: E_NOINTERFACE
;
612 WARN("Unsupported interface %s\n", debugstr_mshtml_guid(riid
));
613 return E_NOINTERFACE
;
616 IUnknown_AddRef((IUnknown
*)*ppv
);
620 static ULONG WINAPI
HTMLPluginsCollection_AddRef(IHTMLPluginsCollection
*iface
)
622 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
623 LONG ref
= InterlockedIncrement(&This
->ref
);
625 TRACE("(%p) ref=%d\n", This
, ref
);
630 static ULONG WINAPI
HTMLPluginsCollection_Release(IHTMLPluginsCollection
*iface
)
632 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
633 LONG ref
= InterlockedDecrement(&This
->ref
);
635 TRACE("(%p) ref=%d\n", This
, ref
);
639 This
->navigator
->plugins
= NULL
;
640 release_dispex(&This
->dispex
);
647 static HRESULT WINAPI
HTMLPluginsCollection_GetTypeInfoCount(IHTMLPluginsCollection
*iface
, UINT
*pctinfo
)
649 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
650 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
653 static HRESULT WINAPI
HTMLPluginsCollection_GetTypeInfo(IHTMLPluginsCollection
*iface
, UINT iTInfo
,
654 LCID lcid
, ITypeInfo
**ppTInfo
)
656 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
657 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
660 static HRESULT WINAPI
HTMLPluginsCollection_GetIDsOfNames(IHTMLPluginsCollection
*iface
, REFIID riid
,
661 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
663 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
664 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
668 static HRESULT WINAPI
HTMLPluginsCollection_Invoke(IHTMLPluginsCollection
*iface
, DISPID dispIdMember
,
669 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
670 EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
672 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
673 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
674 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
677 static HRESULT WINAPI
HTMLPluginsCollection_get_length(IHTMLPluginsCollection
*iface
, LONG
*p
)
679 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
681 TRACE("(%p)->(%p)\n", This
, p
);
683 /* IE always returns 0 here */
688 static HRESULT WINAPI
HTMLPluginsCollection_refresh(IHTMLPluginsCollection
*iface
, VARIANT_BOOL reload
)
690 HTMLPluginsCollection
*This
= impl_from_IHTMLPluginsCollection(iface
);
692 TRACE("(%p)->(%x)\n", This
, reload
);
694 /* Nothing to do here. */
698 static const IHTMLPluginsCollectionVtbl HTMLPluginsCollectionVtbl
= {
699 HTMLPluginsCollection_QueryInterface
,
700 HTMLPluginsCollection_AddRef
,
701 HTMLPluginsCollection_Release
,
702 HTMLPluginsCollection_GetTypeInfoCount
,
703 HTMLPluginsCollection_GetTypeInfo
,
704 HTMLPluginsCollection_GetIDsOfNames
,
705 HTMLPluginsCollection_Invoke
,
706 HTMLPluginsCollection_get_length
,
707 HTMLPluginsCollection_refresh
710 static const tid_t HTMLPluginsCollection_iface_tids
[] = {
711 IHTMLPluginsCollection_tid
,
714 static dispex_static_data_t HTMLPluginsCollection_dispex
= {
717 HTMLPluginsCollection_iface_tids
720 static HRESULT
create_plugins_collection(OmNavigator
*navigator
, HTMLPluginsCollection
**ret
)
722 HTMLPluginsCollection
*col
;
724 col
= heap_alloc_zero(sizeof(*col
));
726 return E_OUTOFMEMORY
;
728 col
->IHTMLPluginsCollection_iface
.lpVtbl
= &HTMLPluginsCollectionVtbl
;
730 col
->navigator
= navigator
;
732 init_dispex(&col
->dispex
, (IUnknown
*)&col
->IHTMLPluginsCollection_iface
,
733 &HTMLPluginsCollection_dispex
);
739 struct HTMLMimeTypesCollection
{
741 IHTMLMimeTypesCollection IHTMLMimeTypesCollection_iface
;
745 OmNavigator
*navigator
;
748 static inline HTMLMimeTypesCollection
*impl_from_IHTMLMimeTypesCollection(IHTMLMimeTypesCollection
*iface
)
750 return CONTAINING_RECORD(iface
, HTMLMimeTypesCollection
, IHTMLMimeTypesCollection_iface
);
753 static HRESULT WINAPI
HTMLMimeTypesCollection_QueryInterface(IHTMLMimeTypesCollection
*iface
, REFIID riid
, void **ppv
)
755 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
757 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
759 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
760 *ppv
= &This
->IHTMLMimeTypesCollection_iface
;
761 }else if(IsEqualGUID(&IID_IHTMLMimeTypesCollection
, riid
)) {
762 *ppv
= &This
->IHTMLMimeTypesCollection_iface
;
763 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
764 return *ppv
? S_OK
: E_NOINTERFACE
;
766 WARN("Unsupported interface %s\n", debugstr_mshtml_guid(riid
));
768 return E_NOINTERFACE
;
771 IUnknown_AddRef((IUnknown
*)*ppv
);
775 static ULONG WINAPI
HTMLMimeTypesCollection_AddRef(IHTMLMimeTypesCollection
*iface
)
777 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
778 LONG ref
= InterlockedIncrement(&This
->ref
);
780 TRACE("(%p) ref=%d\n", This
, ref
);
785 static ULONG WINAPI
HTMLMimeTypesCollection_Release(IHTMLMimeTypesCollection
*iface
)
787 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
788 LONG ref
= InterlockedDecrement(&This
->ref
);
790 TRACE("(%p) ref=%d\n", This
, ref
);
794 This
->navigator
->mime_types
= NULL
;
795 release_dispex(&This
->dispex
);
802 static HRESULT WINAPI
HTMLMimeTypesCollection_GetTypeInfoCount(IHTMLMimeTypesCollection
*iface
, UINT
*pctinfo
)
804 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
805 return IDispatchEx_GetTypeInfoCount(&This
->dispex
.IDispatchEx_iface
, pctinfo
);
808 static HRESULT WINAPI
HTMLMimeTypesCollection_GetTypeInfo(IHTMLMimeTypesCollection
*iface
, UINT iTInfo
,
809 LCID lcid
, ITypeInfo
**ppTInfo
)
811 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
812 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
815 static HRESULT WINAPI
HTMLMimeTypesCollection_GetIDsOfNames(IHTMLMimeTypesCollection
*iface
, REFIID riid
,
816 LPOLESTR
*rgszNames
, UINT cNames
, LCID lcid
, DISPID
*rgDispId
)
818 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
819 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
823 static HRESULT WINAPI
HTMLMimeTypesCollection_Invoke(IHTMLMimeTypesCollection
*iface
, DISPID dispIdMember
,
824 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
825 EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
827 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
828 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
,
829 wFlags
, pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
832 static HRESULT WINAPI
HTMLMimeTypesCollection_get_length(IHTMLMimeTypesCollection
*iface
, LONG
*p
)
834 HTMLMimeTypesCollection
*This
= impl_from_IHTMLMimeTypesCollection(iface
);
836 TRACE("(%p)->(%p)\n", This
, p
);
838 /* This is just a stub for compatibility with other browser in IE */
843 static const IHTMLMimeTypesCollectionVtbl HTMLMimeTypesCollectionVtbl
= {
844 HTMLMimeTypesCollection_QueryInterface
,
845 HTMLMimeTypesCollection_AddRef
,
846 HTMLMimeTypesCollection_Release
,
847 HTMLMimeTypesCollection_GetTypeInfoCount
,
848 HTMLMimeTypesCollection_GetTypeInfo
,
849 HTMLMimeTypesCollection_GetIDsOfNames
,
850 HTMLMimeTypesCollection_Invoke
,
851 HTMLMimeTypesCollection_get_length
854 static const tid_t HTMLMimeTypesCollection_iface_tids
[] = {
855 IHTMLMimeTypesCollection_tid
,
858 static dispex_static_data_t HTMLMimeTypesCollection_dispex
= {
860 IHTMLMimeTypesCollection_tid
,
861 HTMLMimeTypesCollection_iface_tids
864 static HRESULT
create_mime_types_collection(OmNavigator
*navigator
, HTMLMimeTypesCollection
**ret
)
866 HTMLMimeTypesCollection
*col
;
868 col
= heap_alloc_zero(sizeof(*col
));
870 return E_OUTOFMEMORY
;
872 col
->IHTMLMimeTypesCollection_iface
.lpVtbl
= &HTMLMimeTypesCollectionVtbl
;
874 col
->navigator
= navigator
;
876 init_dispex(&col
->dispex
, (IUnknown
*)&col
->IHTMLMimeTypesCollection_iface
,
877 &HTMLMimeTypesCollection_dispex
);
883 static inline OmNavigator
*impl_from_IOmNavigator(IOmNavigator
*iface
)
885 return CONTAINING_RECORD(iface
, OmNavigator
, IOmNavigator_iface
);
888 static HRESULT WINAPI
OmNavigator_QueryInterface(IOmNavigator
*iface
, REFIID riid
, void **ppv
)
890 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
892 TRACE("(%p)->(%s %p)\n", This
, debugstr_mshtml_guid(riid
), ppv
);
894 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
895 *ppv
= &This
->IOmNavigator_iface
;
896 }else if(IsEqualGUID(&IID_IOmNavigator
, riid
)) {
897 *ppv
= &This
->IOmNavigator_iface
;
898 }else if(dispex_query_interface(&This
->dispex
, riid
, ppv
)) {
899 return *ppv
? S_OK
: E_NOINTERFACE
;
901 WARN("Unsupported interface %s\n", debugstr_mshtml_guid(riid
));
903 return E_NOINTERFACE
;
906 IUnknown_AddRef((IUnknown
*)*ppv
);
910 static ULONG WINAPI
OmNavigator_AddRef(IOmNavigator
*iface
)
912 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
913 LONG ref
= InterlockedIncrement(&This
->ref
);
915 TRACE("(%p) ref=%d\n", This
, ref
);
920 static ULONG WINAPI
OmNavigator_Release(IOmNavigator
*iface
)
922 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
923 LONG ref
= InterlockedDecrement(&This
->ref
);
925 TRACE("(%p) ref=%d\n", This
, ref
);
929 This
->plugins
->navigator
= NULL
;
931 This
->mime_types
->navigator
= NULL
;
932 release_dispex(&This
->dispex
);
939 static HRESULT WINAPI
OmNavigator_GetTypeInfoCount(IOmNavigator
*iface
, UINT
*pctinfo
)
941 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
942 FIXME("(%p)->(%p)\n", This
, pctinfo
);
946 static HRESULT WINAPI
OmNavigator_GetTypeInfo(IOmNavigator
*iface
, UINT iTInfo
,
947 LCID lcid
, ITypeInfo
**ppTInfo
)
949 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
951 return IDispatchEx_GetTypeInfo(&This
->dispex
.IDispatchEx_iface
, iTInfo
, lcid
, ppTInfo
);
954 static HRESULT WINAPI
OmNavigator_GetIDsOfNames(IOmNavigator
*iface
, REFIID riid
,
955 LPOLESTR
*rgszNames
, UINT cNames
,
956 LCID lcid
, DISPID
*rgDispId
)
958 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
960 return IDispatchEx_GetIDsOfNames(&This
->dispex
.IDispatchEx_iface
, riid
, rgszNames
, cNames
,
964 static HRESULT WINAPI
OmNavigator_Invoke(IOmNavigator
*iface
, DISPID dispIdMember
,
965 REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
*pDispParams
,
966 VARIANT
*pVarResult
, EXCEPINFO
*pExcepInfo
, UINT
*puArgErr
)
968 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
970 return IDispatchEx_Invoke(&This
->dispex
.IDispatchEx_iface
, dispIdMember
, riid
, lcid
, wFlags
,
971 pDispParams
, pVarResult
, pExcepInfo
, puArgErr
);
974 static HRESULT WINAPI
OmNavigator_get_appCodeName(IOmNavigator
*iface
, BSTR
*p
)
976 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
978 static const WCHAR mozillaW
[] = {'M','o','z','i','l','l','a',0};
980 TRACE("(%p)->(%p)\n", This
, p
);
982 *p
= SysAllocString(mozillaW
);
986 static HRESULT WINAPI
OmNavigator_get_appName(IOmNavigator
*iface
, BSTR
*p
)
988 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
990 static const WCHAR app_nameW
[] =
991 {'M','i','c','r','o','s','o','f','t',' ',
992 'I','n','t','e','r','n','e','t',' ',
993 'E','x','p','l','o','r','e','r',0};
995 TRACE("(%p)->(%p)\n", This
, p
);
997 *p
= SysAllocString(app_nameW
);
999 return E_OUTOFMEMORY
;
1004 static HRESULT WINAPI
OmNavigator_get_appVersion(IOmNavigator
*iface
, BSTR
*p
)
1006 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1008 char user_agent
[512];
1012 TRACE("(%p)->(%p)\n", This
, p
);
1014 size
= sizeof(user_agent
);
1015 hres
= ObtainUserAgentString(0, user_agent
, &size
);
1019 if(strncmp(user_agent
, "Mozilla/", 8)) {
1020 FIXME("Unsupported user agent\n");
1024 size
= MultiByteToWideChar(CP_ACP
, 0, user_agent
+8, -1, NULL
, 0);
1025 *p
= SysAllocStringLen(NULL
, size
-1);
1027 return E_OUTOFMEMORY
;
1029 MultiByteToWideChar(CP_ACP
, 0, user_agent
+8, -1, *p
, size
);
1033 static HRESULT WINAPI
OmNavigator_get_userAgent(IOmNavigator
*iface
, BSTR
*p
)
1035 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1036 char user_agent
[512];
1040 TRACE("(%p)->(%p)\n", This
, p
);
1042 size
= sizeof(user_agent
);
1043 hres
= ObtainUserAgentString(0, user_agent
, &size
);
1047 size
= MultiByteToWideChar(CP_ACP
, 0, user_agent
, -1, NULL
, 0);
1048 *p
= SysAllocStringLen(NULL
, size
-1);
1050 return E_OUTOFMEMORY
;
1052 MultiByteToWideChar(CP_ACP
, 0, user_agent
, -1, *p
, size
);
1056 static HRESULT WINAPI
OmNavigator_javaEnabled(IOmNavigator
*iface
, VARIANT_BOOL
*enabled
)
1058 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1060 FIXME("(%p)->(%p) semi-stub\n", This
, enabled
);
1062 *enabled
= VARIANT_TRUE
;
1066 static HRESULT WINAPI
OmNavigator_taintEnabled(IOmNavigator
*iface
, VARIANT_BOOL
*enabled
)
1068 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1069 FIXME("(%p)->(%p)\n", This
, enabled
);
1073 static HRESULT WINAPI
OmNavigator_get_mimeTypes(IOmNavigator
*iface
, IHTMLMimeTypesCollection
**p
)
1075 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1077 TRACE("(%p)->(%p)\n", This
, p
);
1079 if(!This
->mime_types
) {
1082 hres
= create_mime_types_collection(This
, &This
->mime_types
);
1086 IHTMLMimeTypesCollection_AddRef(&This
->mime_types
->IHTMLMimeTypesCollection_iface
);
1089 *p
= &This
->mime_types
->IHTMLMimeTypesCollection_iface
;
1093 static HRESULT WINAPI
OmNavigator_get_plugins(IOmNavigator
*iface
, IHTMLPluginsCollection
**p
)
1095 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1097 TRACE("(%p)->(%p)\n", This
, p
);
1099 if(!This
->plugins
) {
1102 hres
= create_plugins_collection(This
, &This
->plugins
);
1106 IHTMLPluginsCollection_AddRef(&This
->plugins
->IHTMLPluginsCollection_iface
);
1109 *p
= &This
->plugins
->IHTMLPluginsCollection_iface
;
1113 static HRESULT WINAPI
OmNavigator_get_cookieEnabled(IOmNavigator
*iface
, VARIANT_BOOL
*p
)
1115 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1117 WARN("(%p)->(%p) semi-stub\n", This
, p
);
1123 static HRESULT WINAPI
OmNavigator_get_opsProfile(IOmNavigator
*iface
, IHTMLOpsProfile
**p
)
1125 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1126 FIXME("(%p)->(%p)\n", This
, p
);
1130 static HRESULT WINAPI
OmNavigator_toString(IOmNavigator
*iface
, BSTR
*String
)
1132 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1134 static const WCHAR objectW
[] = {'[','o','b','j','e','c','t',']',0};
1136 TRACE("(%p)->(%p)\n", This
, String
);
1139 return E_INVALIDARG
;
1141 *String
= SysAllocString(objectW
);
1142 return *String
? S_OK
: E_OUTOFMEMORY
;
1145 static HRESULT WINAPI
OmNavigator_get_cpuClass(IOmNavigator
*iface
, BSTR
*p
)
1147 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1149 static const WCHAR cpu_classW
[] =
1156 TRACE("(%p)->(%p)\n", This
, p
);
1158 *p
= SysAllocString(cpu_classW
);
1159 return *p
? S_OK
: E_OUTOFMEMORY
;
1162 static HRESULT
get_language_string(LCID lcid
, BSTR
*p
)
1167 len
= LCIDToLocaleName(lcid
, NULL
, 0, 0);
1169 WARN("LCIDToLocaleName failed: %u\n", GetLastError());
1173 ret
= SysAllocStringLen(NULL
, len
-1);
1175 return E_OUTOFMEMORY
;
1177 len
= LCIDToLocaleName(lcid
, ret
, len
, 0);
1179 WARN("LCIDToLocaleName failed: %u\n", GetLastError());
1188 static HRESULT WINAPI
OmNavigator_get_systemLanguage(IOmNavigator
*iface
, BSTR
*p
)
1190 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1192 TRACE("(%p)->(%p)\n", This
, p
);
1194 return get_language_string(LOCALE_SYSTEM_DEFAULT
, p
);
1197 static HRESULT WINAPI
OmNavigator_get_browserLanguage(IOmNavigator
*iface
, BSTR
*p
)
1199 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1201 TRACE("(%p)->(%p)\n", This
, p
);
1203 return get_language_string(GetUserDefaultUILanguage(), p
);
1206 static HRESULT WINAPI
OmNavigator_get_userLanguage(IOmNavigator
*iface
, BSTR
*p
)
1208 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1210 TRACE("(%p)->(%p)\n", This
, p
);
1212 return get_language_string(LOCALE_USER_DEFAULT
, p
);
1215 static HRESULT WINAPI
OmNavigator_get_platform(IOmNavigator
*iface
, BSTR
*p
)
1217 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1220 static const WCHAR platformW
[] = {'W','i','n','6','4',0};
1222 static const WCHAR platformW
[] = {'W','i','n','3','2',0};
1225 TRACE("(%p)->(%p)\n", This
, p
);
1227 *p
= SysAllocString(platformW
);
1231 static HRESULT WINAPI
OmNavigator_get_appMinorVersion(IOmNavigator
*iface
, BSTR
*p
)
1233 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1235 static const WCHAR zeroW
[] = {'0',0};
1237 TRACE("(%p)->(%p)\n", This
, p
);
1239 /* NOTE: MSIE returns "0" or values like ";SP2;". Returning "0" should be enough. */
1240 *p
= SysAllocString(zeroW
);
1244 static HRESULT WINAPI
OmNavigator_get_connectionSpeed(IOmNavigator
*iface
, LONG
*p
)
1246 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1247 FIXME("(%p)->(%p)\n", This
, p
);
1251 static HRESULT WINAPI
OmNavigator_get_onLine(IOmNavigator
*iface
, VARIANT_BOOL
*p
)
1253 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1255 WARN("(%p)->(%p) semi-stub, returning true\n", This
, p
);
1261 static HRESULT WINAPI
OmNavigator_get_userProfile(IOmNavigator
*iface
, IHTMLOpsProfile
**p
)
1263 OmNavigator
*This
= impl_from_IOmNavigator(iface
);
1264 FIXME("(%p)->(%p)\n", This
, p
);
1268 static const IOmNavigatorVtbl OmNavigatorVtbl
= {
1269 OmNavigator_QueryInterface
,
1271 OmNavigator_Release
,
1272 OmNavigator_GetTypeInfoCount
,
1273 OmNavigator_GetTypeInfo
,
1274 OmNavigator_GetIDsOfNames
,
1276 OmNavigator_get_appCodeName
,
1277 OmNavigator_get_appName
,
1278 OmNavigator_get_appVersion
,
1279 OmNavigator_get_userAgent
,
1280 OmNavigator_javaEnabled
,
1281 OmNavigator_taintEnabled
,
1282 OmNavigator_get_mimeTypes
,
1283 OmNavigator_get_plugins
,
1284 OmNavigator_get_cookieEnabled
,
1285 OmNavigator_get_opsProfile
,
1286 OmNavigator_toString
,
1287 OmNavigator_get_cpuClass
,
1288 OmNavigator_get_systemLanguage
,
1289 OmNavigator_get_browserLanguage
,
1290 OmNavigator_get_userLanguage
,
1291 OmNavigator_get_platform
,
1292 OmNavigator_get_appMinorVersion
,
1293 OmNavigator_get_connectionSpeed
,
1294 OmNavigator_get_onLine
,
1295 OmNavigator_get_userProfile
1298 static const tid_t OmNavigator_iface_tids
[] = {
1302 static dispex_static_data_t OmNavigator_dispex
= {
1304 DispHTMLNavigator_tid
,
1305 OmNavigator_iface_tids
1308 IOmNavigator
*OmNavigator_Create(void)
1312 ret
= heap_alloc_zero(sizeof(*ret
));
1316 ret
->IOmNavigator_iface
.lpVtbl
= &OmNavigatorVtbl
;
1319 init_dispex(&ret
->dispex
, (IUnknown
*)&ret
->IOmNavigator_iface
, &OmNavigator_dispex
);
1321 return &ret
->IOmNavigator_iface
;