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
760190b5
Commit
760190b5
authored
Jun 28, 2017
by
Owen Rudge
Committed by
Alexandre Julliard
Jul 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi: Implement WSDXMLGetValueFromAny.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db94c527
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
wsdapi.spec
dlls/wsdapi/wsdapi.spec
+1
-1
xml.c
dlls/wsdapi/xml.c
+40
-0
wsdutil.h
include/wsdutil.h
+1
-0
No files found.
dlls/wsdapi/wsdapi.spec
View file @
760190b5
...
...
@@ -42,4 +42,4 @@
@ stdcall WSDXMLCleanupElement(ptr)
@ stdcall WSDXMLCreateContext(ptr)
@ stub WSDXMLGetNameFromBuiltinNamespace
@ st
ub WSDXMLGetValueFromAny
@ st
dcall WSDXMLGetValueFromAny(wstr wstr ptr wstr)
dlls/wsdapi/xml.c
View file @
760190b5
...
...
@@ -238,6 +238,46 @@ HRESULT WINAPI WSDXMLCleanupElement(WSDXML_ELEMENT *pAny)
return
S_OK
;
}
HRESULT
WINAPI
WSDXMLGetValueFromAny
(
const
WCHAR
*
pszNamespace
,
const
WCHAR
*
pszName
,
WSDXML_ELEMENT
*
pAny
,
LPCWSTR
*
ppszValue
)
{
WSDXML_ELEMENT
*
element
;
WSDXML_TEXT
*
text
;
if
(
pAny
==
NULL
)
return
E_INVALIDARG
;
if
(
ppszValue
==
NULL
)
return
E_POINTER
;
if
((
pszNamespace
==
NULL
)
||
(
pszName
==
NULL
)
||
(
lstrlenW
(
pszNamespace
)
>
WSD_MAX_TEXT_LENGTH
)
||
(
lstrlenW
(
pszName
)
>
WSD_MAX_TEXT_LENGTH
))
return
E_INVALIDARG
;
element
=
pAny
;
while
(
element
!=
NULL
)
{
if
(
element
->
Node
.
Type
==
ElementType
)
{
if
((
lstrcmpW
(
element
->
Name
->
LocalName
,
pszName
)
==
0
)
&&
(
lstrcmpW
(
element
->
Name
->
Space
->
Uri
,
pszNamespace
)
==
0
))
{
if
((
element
->
FirstChild
==
NULL
)
||
(
element
->
FirstChild
->
Type
!=
TextType
))
{
return
E_FAIL
;
}
text
=
(
WSDXML_TEXT
*
)
element
->
FirstChild
;
*
ppszValue
=
(
LPCWSTR
)
text
->
Text
;
return
S_OK
;
}
}
element
=
(
WSDXML_ELEMENT
*
)
element
->
Node
.
Next
;
}
return
E_FAIL
;
}
/* IWSDXMLContext implementation */
struct
xmlNamespace
...
...
include/wsdutil.h
View file @
760190b5
...
...
@@ -28,5 +28,6 @@ HRESULT WINAPI WSDXMLAddChild(WSDXML_ELEMENT *pParent, WSDXML_ELEMENT *pChild);
HRESULT
WINAPI
WSDXMLAddSibling
(
WSDXML_ELEMENT
*
pFirst
,
WSDXML_ELEMENT
*
pSecond
);
HRESULT
WINAPI
WSDXMLBuildAnyForSingleElement
(
WSDXML_NAME
*
pElementName
,
LPCWSTR
pszText
,
WSDXML_ELEMENT
**
ppAny
);
HRESULT
WINAPI
WSDXMLCleanupElement
(
WSDXML_ELEMENT
*
pAny
);
HRESULT
WINAPI
WSDXMLGetValueFromAny
(
const
WCHAR
*
pszNamespace
,
const
WCHAR
*
pszName
,
WSDXML_ELEMENT
*
pAny
,
LPCWSTR
*
ppszValue
);
#endif
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