Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
ae6ef458
Commit
ae6ef458
authored
13 years ago
by
Nikolay Sivov
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msxml3: Added IDispatchEx support for IXMLDOMSchemaCollection2.
parent
c381abd8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/msxml3/dispex.c
+1
-0
1 addition, 0 deletions
dlls/msxml3/dispex.c
dlls/msxml3/msxml_private.h
+1
-0
1 addition, 0 deletions
dlls/msxml3/msxml_private.h
dlls/msxml3/schema.c
+26
-45
26 additions, 45 deletions
dlls/msxml3/schema.c
dlls/msxml3/tests/schema.c
+66
-0
66 additions, 0 deletions
dlls/msxml3/tests/schema.c
with
94 additions
and
45 deletions
dlls/msxml3/dispex.c
+
1
−
0
View file @
ae6ef458
...
...
@@ -129,6 +129,7 @@ static tid_id_t tid_ids[] = {
{
&
IID_IXMLDOMParseError
,
LibXml2
},
{
&
IID_IXMLDOMProcessingInstruction
,
LibXml2
},
{
&
IID_IXMLDOMSchemaCollection
,
LibXml2
},
{
&
IID_IXMLDOMSchemaCollection2
,
LibXml2
},
{
&
IID_IXMLDOMSelection
,
LibXml2
},
{
&
IID_IXMLDOMText
,
LibXml2
},
{
&
IID_IXMLElement
,
LibXml
},
...
...
This diff is collapsed.
Click to expand it.
dlls/msxml3/msxml_private.h
+
1
−
0
View file @
ae6ef458
...
...
@@ -56,6 +56,7 @@ typedef enum tid_t {
IXMLDOMParseError_tid
,
IXMLDOMProcessingInstruction_tid
,
IXMLDOMSchemaCollection_tid
,
IXMLDOMSchemaCollection2_tid
,
IXMLDOMSelection_tid
,
IXMLDOMText_tid
,
IXMLElement_tid
,
...
...
This diff is collapsed.
Click to expand it.
dlls/msxml3/schema.c
+
26
−
45
View file @
ae6ef458
...
...
@@ -89,6 +89,7 @@ typedef enum _SCHEMA_TYPE {
typedef
struct
{
DispatchEx
dispex
;
IXMLDOMSchemaCollection2
IXMLDOMSchemaCollection2_iface
;
LONG
ref
;
...
...
@@ -961,6 +962,10 @@ static HRESULT WINAPI schema_cache_QueryInterface(IXMLDOMSchemaCollection2* ifac
{
*
ppvObject
=
iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppvObject
))
{
return
*
ppvObject
?
S_OK
:
E_NOINTERFACE
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -995,6 +1000,7 @@ static ULONG WINAPI schema_cache_Release(IXMLDOMSchemaCollection2* iface)
if
(
ref
==
0
)
{
xmlHashFree
(
This
->
cache
,
cache_free
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
}
...
...
@@ -1005,25 +1011,15 @@ static HRESULT WINAPI schema_cache_GetTypeInfoCount(IXMLDOMSchemaCollection2* if
UINT
*
pctinfo
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
*
pctinfo
=
1
;
return
S_OK
;
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
schema_cache_GetTypeInfo
(
IXMLDOMSchemaCollection2
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
hr
=
get_typeinfo
(
IXMLDOMSchemaCollection_tid
,
ppTInfo
);
return
hr
;
return
IDispatchEx_GetTypeInfo
(
&
This
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
schema_cache_GetIDsOfNames
(
IXMLDOMSchemaCollection2
*
iface
,
...
...
@@ -1031,23 +1027,8 @@ static HRESULT WINAPI schema_cache_GetIDsOfNames(IXMLDOMSchemaCollection2* iface
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
if
(
!
rgszNames
||
cNames
==
0
||
!
rgDispId
)
return
E_INVALIDARG
;
hr
=
get_typeinfo
(
IXMLDOMSchemaCollection_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
rgszNames
,
cNames
,
rgDispId
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
return
IDispatchEx_GetIDsOfNames
(
&
This
->
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
static
HRESULT
WINAPI
schema_cache_Invoke
(
IXMLDOMSchemaCollection2
*
iface
,
...
...
@@ -1057,21 +1038,8 @@ static HRESULT WINAPI schema_cache_Invoke(IXMLDOMSchemaCollection2* iface,
UINT
*
puArgErr
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p)->(%d %s %d %d %p %p %p %p)
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
hr
=
get_typeinfo
(
IXMLDOMSchemaCollection_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
&
This
->
IXMLDOMSchemaCollection2_iface
.
lpVtbl
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
return
IDispatchEx_Invoke
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
schema_cache_add
(
IXMLDOMSchemaCollection2
*
iface
,
BSTR
uri
,
VARIANT
var
)
...
...
@@ -1437,6 +1405,18 @@ XDR_DT SchemaCache_get_node_dt(IXMLDOMSchemaCollection2* iface, xmlNodePtr node)
return
dt
;
}
static
const
tid_t
schemacache_iface_tids
[]
=
{
IXMLDOMSchemaCollection2_tid
,
0
};
static
dispex_static_data_t
schemacache_dispex
=
{
NULL
,
IXMLDOMSchemaCollection2_tid
,
NULL
,
schemacache_iface_tids
};
HRESULT
SchemaCache_create
(
MSXML_VERSION
version
,
IUnknown
*
outer
,
void
**
obj
)
{
schema_cache
*
This
=
heap_alloc
(
sizeof
(
schema_cache
));
...
...
@@ -1450,6 +1430,7 @@ HRESULT SchemaCache_create(MSXML_VERSION version, IUnknown* outer, void** obj)
This
->
ref
=
1
;
This
->
version
=
version
;
This
->
validateOnLoad
=
VARIANT_TRUE
;
init_dispex
(
&
This
->
dispex
,
(
IUnknown
*
)
&
This
->
IXMLDOMSchemaCollection2_iface
,
&
schemacache_dispex
);
*
obj
=
&
This
->
IXMLDOMSchemaCollection2_iface
;
return
S_OK
;
...
...
This diff is collapsed.
Click to expand it.
dlls/msxml3/tests/schema.c
+
66
−
0
View file @
ae6ef458
...
...
@@ -27,6 +27,7 @@
#include
"windows.h"
#include
"ole2.h"
#include
"msxml2.h"
#include
"msxml2did.h"
#include
"dispex.h"
#include
"wine/test.h"
...
...
@@ -1996,6 +1997,70 @@ static void test_validate_on_load(void)
IXMLDOMSchemaCollection2_Release
(
cache
);
}
static
void
test_obj_dispex
(
IUnknown
*
obj
)
{
static
const
WCHAR
starW
[]
=
{
'*'
,
0
};
DISPID
dispid
=
DISPID_SAX_XMLREADER_GETFEATURE
;
IDispatchEx
*
dispex
;
IUnknown
*
unk
;
DWORD
props
;
UINT
ticnt
;
HRESULT
hr
;
BSTR
name
;
hr
=
IUnknown_QueryInterface
(
obj
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
EXPECT_HR
(
hr
,
S_OK
);
if
(
FAILED
(
hr
))
return
;
ticnt
=
0
;
hr
=
IDispatchEx_GetTypeInfoCount
(
dispex
,
&
ticnt
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
ticnt
==
1
,
"ticnt=%u
\n
"
,
ticnt
);
name
=
SysAllocString
(
starW
);
hr
=
IDispatchEx_DeleteMemberByName
(
dispex
,
name
,
fdexNameCaseSensitive
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
SysFreeString
(
name
);
hr
=
IDispatchEx_DeleteMemberByDispID
(
dispex
,
dispid
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
props
=
0
;
hr
=
IDispatchEx_GetMemberProperties
(
dispex
,
dispid
,
grfdexPropCanAll
,
&
props
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
ok
(
props
==
0
,
"expected 0 got %d
\n
"
,
props
);
hr
=
IDispatchEx_GetMemberName
(
dispex
,
dispid
,
&
name
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
if
(
SUCCEEDED
(
hr
))
SysFreeString
(
name
);
hr
=
IDispatchEx_GetNextDispID
(
dispex
,
fdexEnumDefault
,
DISPID_XMLDOM_SCHEMACOLLECTION_ADD
,
&
dispid
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
hr
=
IDispatchEx_GetNameSpaceParent
(
dispex
,
&
unk
);
EXPECT_HR
(
hr
,
E_NOTIMPL
);
if
(
hr
==
S_OK
&&
unk
)
IUnknown_Release
(
unk
);
IDispatchEx_Release
(
dispex
);
}
static
void
test_dispex
(
void
)
{
IXMLDOMSchemaCollection
*
cache
;
IUnknown
*
unk
;
HRESULT
hr
;
cache
=
create_cache
(
&
IID_IXMLDOMSchemaCollection
);
if
(
!
cache
)
return
;
hr
=
IXMLDOMSchemaCollection_QueryInterface
(
cache
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
EXPECT_HR
(
hr
,
S_OK
);
test_obj_dispex
(
unk
);
IUnknown_Release
(
unk
);
IXMLDOMSchemaCollection_Release
(
cache
);
}
START_TEST
(
schema
)
{
HRESULT
r
;
...
...
@@ -2010,6 +2075,7 @@ START_TEST(schema)
test_XDR_schemas
();
test_XDR_datatypes
();
test_validate_on_load
();
test_dispex
();
CoUninitialize
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment