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
ed336395
Commit
ed336395
authored
Jan 21, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsWriteXmlBufferToBytes.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32e20cbf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletion
+39
-1
webservices.spec
dlls/webservices/webservices.spec
+1
-1
writer.c
dlls/webservices/writer.c
+38
-0
No files found.
dlls/webservices/webservices.spec
View file @
ed336395
...
@@ -188,6 +188,6 @@
...
@@ -188,6 +188,6 @@
@ stub WsWriteType
@ stub WsWriteType
@ stub WsWriteValue
@ stub WsWriteValue
@ stdcall WsWriteXmlBuffer(ptr ptr ptr)
@ stdcall WsWriteXmlBuffer(ptr ptr ptr)
@ st
ub WsWriteXmlBufferToBytes
@ st
dcall WsWriteXmlBufferToBytes(ptr ptr ptr ptr long ptr ptr ptr ptr)
@ stub WsWriteXmlnsAttribute
@ stub WsWriteXmlnsAttribute
@ stdcall WsXmlStringEquals(ptr ptr ptr)
@ stdcall WsXmlStringEquals(ptr ptr ptr)
dlls/webservices/writer.c
View file @
ed336395
...
@@ -792,3 +792,41 @@ HRESULT WINAPI WsWriteXmlBuffer( WS_XML_WRITER *handle, WS_XML_BUFFER *buffer, W
...
@@ -792,3 +792,41 @@ HRESULT WINAPI WsWriteXmlBuffer( WS_XML_WRITER *handle, WS_XML_BUFFER *buffer, W
write_bytes
(
writer
,
xmlbuf
->
ptr
,
xmlbuf
->
size
);
write_bytes
(
writer
,
xmlbuf
->
ptr
,
xmlbuf
->
size
);
return
S_OK
;
return
S_OK
;
}
}
/**************************************************************************
* WsWriteXmlBufferToBytes [webservices.@]
*/
HRESULT
WINAPI
WsWriteXmlBufferToBytes
(
WS_XML_WRITER
*
handle
,
WS_XML_BUFFER
*
buffer
,
const
WS_XML_WRITER_ENCODING
*
encoding
,
const
WS_XML_WRITER_PROPERTY
*
properties
,
ULONG
count
,
WS_HEAP
*
heap
,
void
**
bytes
,
ULONG
*
size
,
WS_ERROR
*
error
)
{
struct
writer
*
writer
=
(
struct
writer
*
)
handle
;
struct
xmlbuf
*
xmlbuf
=
(
struct
xmlbuf
*
)
buffer
;
HRESULT
hr
;
char
*
buf
;
ULONG
i
;
TRACE
(
"%p %p %p %p %u %p %p %p %p
\n
"
,
handle
,
buffer
,
encoding
,
properties
,
count
,
heap
,
bytes
,
size
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
writer
||
!
xmlbuf
||
!
heap
||
!
bytes
)
return
E_INVALIDARG
;
if
(
encoding
&&
encoding
->
encodingType
!=
WS_XML_WRITER_ENCODING_TYPE_TEXT
)
{
FIXME
(
"encoding type %u not supported
\n
"
,
encoding
->
encodingType
);
return
E_NOTIMPL
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
{
hr
=
set_writer_prop
(
writer
,
properties
[
i
].
id
,
properties
[
i
].
value
,
properties
[
i
].
valueSize
);
if
(
hr
!=
S_OK
)
return
hr
;
}
if
(
!
(
buf
=
ws_alloc
(
heap
,
xmlbuf
->
size
)))
return
WS_E_QUOTA_EXCEEDED
;
memcpy
(
buf
,
xmlbuf
->
ptr
,
xmlbuf
->
size
);
*
bytes
=
buf
;
return
S_OK
;
}
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