Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
0151f474
Commit
0151f474
authored
Dec 14, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Added IXMLDOMParseError2 support.
parent
19a86fea
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
42 deletions
+94
-42
dispex.c
dlls/msxml3/dispex.c
+1
-1
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-1
parseerror.c
dlls/msxml3/parseerror.c
+82
-40
domdoc.c
dlls/msxml3/tests/domdoc.c
+10
-0
No files found.
dlls/msxml3/dispex.c
View file @
0151f474
...
...
@@ -126,7 +126,7 @@ static tid_id_t tid_ids[] = {
{
&
IID_IXMLDOMNamedNodeMap
,
LibXml2
},
{
&
IID_IXMLDOMNode
,
LibXml2
},
{
&
IID_IXMLDOMNodeList
,
LibXml2
},
{
&
IID_IXMLDOMParseError
,
LibXml2
},
{
&
IID_IXMLDOMParseError
2
,
LibXml2
},
{
&
IID_IXMLDOMProcessingInstruction
,
LibXml2
},
{
&
IID_IXMLDOMSchemaCollection
,
LibXml2
},
{
&
IID_IXMLDOMSchemaCollection2
,
LibXml2
},
...
...
dlls/msxml3/msxml_private.h
View file @
0151f474
...
...
@@ -53,7 +53,7 @@ typedef enum tid_t {
IXMLDOMNamedNodeMap_tid
,
IXMLDOMNode_tid
,
IXMLDOMNodeList_tid
,
IXMLDOMParseError_tid
,
IXMLDOMParseError
2
_tid
,
IXMLDOMProcessingInstruction_tid
,
IXMLDOMSchemaCollection_tid
,
IXMLDOMSchemaCollection2_tid
,
...
...
dlls/msxml3/parseerror.c
View file @
0151f474
...
...
@@ -45,29 +45,30 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef
struct
{
DispatchEx
dispex
;
IXMLDOMParseError
IXMLDOMParseError
_iface
;
IXMLDOMParseError
2
IXMLDOMParseError2
_iface
;
LONG
ref
;
LONG
code
,
line
,
linepos
,
filepos
;
BSTR
url
,
reason
,
srcText
;
}
parse_error_t
;
static
inline
parse_error_t
*
impl_from_IXMLDOMParseError
(
IXMLDOMParseError
*
iface
)
static
inline
parse_error_t
*
impl_from_IXMLDOMParseError
2
(
IXMLDOMParseError2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
parse_error_t
,
IXMLDOMParseError_iface
);
return
CONTAINING_RECORD
(
iface
,
parse_error_t
,
IXMLDOMParseError
2
_iface
);
}
static
HRESULT
WINAPI
parseError_QueryInterface
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IXMLDOMParseError
)
)
IsEqualGUID
(
riid
,
&
IID_IXMLDOMParseError
)
||
IsEqualGUID
(
riid
,
&
IID_IXMLDOMParseError2
)
)
{
*
ppvObject
=
iface
;
}
...
...
@@ -82,24 +83,24 @@ static HRESULT WINAPI parseError_QueryInterface(
return
E_NOINTERFACE
;
}
IXMLDOMParseError_AddRef
(
iface
);
IXMLDOMParseError
2
_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
parseError_AddRef
(
IXMLDOMParseError
*
iface
)
IXMLDOMParseError
2
*
iface
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
parseError_Release
(
IXMLDOMParseError
*
iface
)
IXMLDOMParseError
2
*
iface
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
...
...
@@ -116,39 +117,39 @@ static ULONG WINAPI parseError_Release(
}
static
HRESULT
WINAPI
parseError_GetTypeInfoCount
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
UINT
*
pctinfo
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
parseError_GetTypeInfo
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
parseError_GetIDsOfNames
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
return
IDispatchEx_GetIDsOfNames
(
&
This
->
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
static
HRESULT
WINAPI
parseError_Invoke
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
...
...
@@ -158,16 +159,16 @@ static HRESULT WINAPI parseError_Invoke(
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
return
IDispatchEx_Invoke
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
parseError_get_errorCode
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
LONG
*
code
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
code
);
*
code
=
This
->
code
;
...
...
@@ -179,19 +180,19 @@ static HRESULT WINAPI parseError_get_errorCode(
}
static
HRESULT
WINAPI
parseError_get_url
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
BSTR
*
url
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
url
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
parseError_get_reason
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
BSTR
*
reason
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
reason
);
if
(
!
This
->
reason
)
...
...
@@ -204,10 +205,10 @@ static HRESULT WINAPI parseError_get_reason(
}
static
HRESULT
WINAPI
parseError_get_srcText
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
BSTR
*
srcText
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
srcText
);
...
...
@@ -219,10 +220,10 @@ static HRESULT WINAPI parseError_get_srcText(
}
static
HRESULT
WINAPI
parseError_get_line
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
LONG
*
line
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
TRACE
(
"(%p)->(%p): stub
\n
"
,
This
,
line
);
...
...
@@ -233,10 +234,10 @@ static HRESULT WINAPI parseError_get_line(
}
static
HRESULT
WINAPI
parseError_get_linepos
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
LONG
*
linepos
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
linepos
);
...
...
@@ -247,15 +248,52 @@ static HRESULT WINAPI parseError_get_linepos(
}
static
HRESULT
WINAPI
parseError_get_filepos
(
IXMLDOMParseError
*
iface
,
IXMLDOMParseError
2
*
iface
,
LONG
*
filepos
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
(
iface
);
parse_error_t
*
This
=
impl_from_IXMLDOMParseError
2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
filepos
);
return
E_NOTIMPL
;
}
static
const
struct
IXMLDOMParseErrorVtbl
parseError_vtbl
=
static
HRESULT
WINAPI
parseError_get_errorXPath
(
IXMLDOMParseError2
*
iface
,
BSTR
*
xpathexpr
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
xpathexpr
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
parseError_get_AllErrors
(
IXMLDOMParseError2
*
iface
,
IXMLDOMParseErrorCollection
**
allErrors
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
allErrors
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
parseError_errorParameters
(
IXMLDOMParseError2
*
iface
,
LONG
index
,
BSTR
*
param
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
param
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
parseError_get_errorParametersCount
(
IXMLDOMParseError2
*
iface
,
LONG
*
count
)
{
parse_error_t
*
This
=
impl_from_IXMLDOMParseError2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
count
);
return
E_NOTIMPL
;
}
static
const
struct
IXMLDOMParseError2Vtbl
XMLDOMParseError2Vtbl
=
{
parseError_QueryInterface
,
parseError_AddRef
,
...
...
@@ -270,17 +308,21 @@ static const struct IXMLDOMParseErrorVtbl parseError_vtbl =
parseError_get_srcText
,
parseError_get_line
,
parseError_get_linepos
,
parseError_get_filepos
parseError_get_filepos
,
parseError_get_errorXPath
,
parseError_get_AllErrors
,
parseError_errorParameters
,
parseError_get_errorParametersCount
};
static
const
tid_t
parseError_iface_tids
[]
=
{
IXMLDOMParseError_tid
,
IXMLDOMParseError
2
_tid
,
0
};
static
dispex_static_data_t
parseError_dispex
=
{
NULL
,
IXMLDOMParseError_tid
,
IXMLDOMParseError
2
_tid
,
NULL
,
parseError_iface_tids
};
...
...
@@ -294,7 +336,7 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src
if
(
!
This
)
return
NULL
;
This
->
IXMLDOMParseError
_iface
.
lpVtbl
=
&
parseError_v
tbl
;
This
->
IXMLDOMParseError
2_iface
.
lpVtbl
=
&
XMLDOMParseError2V
tbl
;
This
->
ref
=
1
;
This
->
code
=
code
;
...
...
@@ -305,7 +347,7 @@ IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR src
This
->
linepos
=
linepos
;
This
->
filepos
=
filepos
;
init_dispex
(
&
This
->
dispex
,
(
IUnknown
*
)
&
This
->
IXMLDOMParseError_iface
,
&
parseError_dispex
);
init_dispex
(
&
This
->
dispex
,
(
IUnknown
*
)
&
This
->
IXMLDOMParseError
2
_iface
,
&
parseError_dispex
);
return
&
This
->
IXMLDOMParseError
_iface
;
return
(
IXMLDOMParseError
*
)
&
This
->
IXMLDOMParseError2
_iface
;
}
dlls/msxml3/tests/domdoc.c
View file @
0151f474
...
...
@@ -10886,6 +10886,7 @@ static void test_dispex(void)
static
void
test_parseerror
(
void
)
{
IXMLDOMParseError2
*
error2
;
IXMLDOMParseError
*
error
;
IXMLDOMDocument
*
doc
;
HRESULT
hr
;
...
...
@@ -10905,7 +10906,16 @@ static void test_parseerror(void)
EXPECT_HR
(
hr
,
E_INVALIDARG
);
IXMLDOMParseError_Release
(
error
);
IXMLDOMDocument_Release
(
doc
);
doc
=
create_document_version
(
60
,
&
IID_IXMLDOMDocument
);
if
(
!
doc
)
return
;
hr
=
IXMLDOMDocument_get_parseError
(
doc
,
&
error
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
IXMLDOMParseError_QueryInterface
(
error
,
&
IID_IXMLDOMParseError2
,
(
void
**
)
&
error2
);
EXPECT_HR
(
hr
,
S_OK
);
IXMLDOMParseError2_Release
(
error2
);
IXMLDOMParseError_Release
(
error
);
IXMLDOMDocument_Release
(
doc
);
}
...
...
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