Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
25c70bac
Commit
25c70bac
authored
Jul 15, 2011
by
Alexander Morozov
Committed by
Alexandre Julliard
Jul 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IProvideClassInfo::GetClassInfo implementation.
parent
b3fbdfa9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
14 deletions
+75
-14
dispex.c
dlls/mshtml/dispex.c
+34
-11
htmldoc.c
dlls/mshtml/htmldoc.c
+2
-3
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
dom.c
dlls/mshtml/tests/dom.c
+38
-0
No files found.
dlls/mshtml/dispex.c
View file @
25c70bac
...
...
@@ -88,22 +88,30 @@ TID_LIST
#undef XDIID
};
static
HRESULT
get_typeinfo
(
tid_t
tid
,
ITypeInfo
**
typeinfo
)
static
HRESULT
load_typelib
(
void
)
{
HRESULT
hres
;
ITypeLib
*
tl
;
if
(
!
typelib
)
{
ITypeLib
*
tl
;
hres
=
LoadRegTypeLib
(
&
LIBID_MSHTML
,
4
,
0
,
LOCALE_SYSTEM_DEFAULT
,
&
tl
);
if
(
FAILED
(
hres
))
{
ERR
(
"LoadRegTypeLib failed: %08x
\n
"
,
hres
);
return
hres
;
}
hres
=
LoadRegTypeLib
(
&
LIBID_MSHTML
,
4
,
0
,
LOCALE_SYSTEM_DEFAULT
,
&
tl
);
if
(
FAILED
(
hres
))
{
ERR
(
"LoadRegTypeLib failed: %08x
\n
"
,
hres
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
typelib
,
tl
,
NULL
))
ITypeLib_Release
(
tl
);
return
hres
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
typelib
,
tl
,
NULL
))
ITypeLib_Release
(
tl
);
}
static
HRESULT
get_typeinfo
(
tid_t
tid
,
ITypeInfo
**
typeinfo
)
{
HRESULT
hres
;
if
(
!
typelib
)
hres
=
load_typelib
();
if
(
!
typelib
)
return
hres
;
if
(
!
typeinfos
[
tid
])
{
ITypeInfo
*
ti
;
...
...
@@ -149,6 +157,21 @@ void release_typelib(void)
ITypeLib_Release
(
typelib
);
}
HRESULT
get_htmldoc_classinfo
(
ITypeInfo
**
typeinfo
)
{
HRESULT
hres
;
if
(
!
typelib
)
hres
=
load_typelib
();
if
(
!
typelib
)
return
hres
;
hres
=
ITypeLib_GetTypeInfoOfGuid
(
typelib
,
&
CLSID_HTMLDocument
,
typeinfo
);
if
(
FAILED
(
hres
))
ERR
(
"GetTypeInfoOfGuid failed: %08x
\n
"
,
hres
);
return
hres
;
}
static
void
add_func_info
(
dispex_data_t
*
data
,
DWORD
*
size
,
tid_t
tid
,
const
FUNCDESC
*
desc
,
ITypeInfo
*
dti
)
{
HRESULT
hres
;
...
...
dlls/mshtml/htmldoc.c
View file @
25c70bac
...
...
@@ -1798,9 +1798,8 @@ static HRESULT WINAPI ProvideClassInfo_GetClassInfo(IProvideClassInfo* iface,
ITypeInfo
**
ppTI
)
{
HTMLDocument
*
This
=
impl_from_IProvideClassInfo
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppTI
);
*
ppTI
=
NULL
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppTI
);
return
get_htmldoc_classinfo
(
ppTI
);
}
static
const
IProvideClassInfoVtbl
ProvideClassInfoVtbl
=
{
...
...
dlls/mshtml/mshtml_private.h
View file @
25c70bac
...
...
@@ -213,6 +213,7 @@ HRESULT dispex_get_dprop_ref(DispatchEx*,const WCHAR*,BOOL,VARIANT**) DECLSPEC_H
HRESULT
get_dispids
(
tid_t
,
DWORD
*
,
DISPID
**
)
DECLSPEC_HIDDEN
;
HRESULT
remove_prop
(
DispatchEx
*
,
BSTR
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
void
release_typelib
(
void
)
DECLSPEC_HIDDEN
;
HRESULT
get_htmldoc_classinfo
(
ITypeInfo
**
typeinfo
)
DECLSPEC_HIDDEN
;
typedef
struct
HTMLWindow
HTMLWindow
;
typedef
struct
HTMLDocumentNode
HTMLDocumentNode
;
...
...
dlls/mshtml/tests/dom.c
View file @
25c70bac
...
...
@@ -594,6 +594,42 @@ static void _test_disp2(unsigned line, IUnknown *unk, const IID *diid, const IID
_test_disp_value
(
line
,
unk
,
val
);
}
#define test_class_info(u) _test_class_info(__LINE__,u)
static
void
_test_class_info
(
unsigned
line
,
IUnknown
*
unk
)
{
IProvideClassInfo
*
classinfo
;
ITypeInfo
*
typeinfo
;
TYPEATTR
*
type_attr
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IProvideClassInfo
,
(
void
**
)
&
classinfo
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Could not get IProvideClassInfo interface: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
hres
=
IProvideClassInfo_GetClassInfo
(
classinfo
,
&
typeinfo
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"Could not get ITypeInfo interface: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
{
IProvideClassInfo_Release
(
classinfo
);
return
;
}
hres
=
ITypeInfo_GetTypeAttr
(
typeinfo
,
&
type_attr
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"GetTypeAttr failed: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
ok_
(
__FILE__
,
line
)(
IsEqualGUID
(
&
type_attr
->
guid
,
&
CLSID_HTMLDocument
),
"unexpected guid %s
\n
"
,
dbgstr_guid
(
&
type_attr
->
guid
));
ok_
(
__FILE__
,
line
)(
type_attr
->
typekind
==
TKIND_COCLASS
,
"unexpected typekind %d
\n
"
,
type_attr
->
typekind
);
ITypeInfo_ReleaseTypeAttr
(
typeinfo
,
type_attr
);
}
ITypeInfo_Release
(
typeinfo
);
IProvideClassInfo_Release
(
classinfo
);
}
#define set_dispex_value(a,b,c) _set_dispex_value(__LINE__,a,b,c)
static
void
_set_dispex_value
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
name
,
VARIANT
*
val
)
{
...
...
@@ -5958,9 +5994,11 @@ static void test_window(IHTMLDocument2 *doc)
test_ifaces
((
IUnknown
*
)
doc2
,
doc_node_iids
);
test_disp
((
IUnknown
*
)
doc2
,
&
DIID_DispHTMLDocument
,
"[object]"
);
test_class_info
((
IUnknown
*
)
doc2
);
test_ifaces
((
IUnknown
*
)
doc
,
doc_obj_iids
);
test_disp
((
IUnknown
*
)
doc
,
&
DIID_DispHTMLDocument
,
"[object]"
);
test_class_info
((
IUnknown
*
)
doc
);
unk
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLDocument2_QueryInterface
(
doc2
,
&
IID_ICustomDoc
,
(
void
**
)
&
unk
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment