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
e3859dff
Commit
e3859dff
authored
Nov 10, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsAlloc.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ff990d34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
1 deletion
+46
-1
reader.c
dlls/webservices/reader.c
+17
-0
reader.c
dlls/webservices/tests/reader.c
+27
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
webservices.h
include/webservices.h
+1
-0
No files found.
dlls/webservices/reader.c
View file @
e3859dff
...
...
@@ -170,6 +170,23 @@ void ws_free( WS_HEAP *handle, void *ptr )
HeapFree
(
heap
->
handle
,
0
,
ptr
);
}
/**************************************************************************
* WsAlloc [webservices.@]
*/
HRESULT
WINAPI
WsAlloc
(
WS_HEAP
*
handle
,
SIZE_T
size
,
void
**
ptr
,
WS_ERROR
*
error
)
{
void
*
mem
;
TRACE
(
"%p %u %p %p
\n
"
,
handle
,
(
ULONG
)
size
,
ptr
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
handle
||
!
ptr
)
return
E_INVALIDARG
;
if
(
!
(
mem
=
ws_alloc
(
handle
,
size
)))
return
E_OUTOFMEMORY
;
*
ptr
=
mem
;
return
S_OK
;
}
static
struct
heap
*
alloc_heap
(
void
)
{
static
const
ULONG
count
=
sizeof
(
heap_props
)
/
sizeof
(
heap_props
[
0
]);
...
...
dlls/webservices/tests/reader.c
View file @
e3859dff
...
...
@@ -1453,6 +1453,32 @@ static void test_WsXmlStringEquals(void)
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
}
static
void
test_WsAlloc
(
void
)
{
HRESULT
hr
;
WS_HEAP
*
heap
;
void
*
ptr
;
hr
=
WsCreateHeap
(
256
,
0
,
NULL
,
0
,
&
heap
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ptr
=
NULL
;
hr
=
WsAlloc
(
NULL
,
16
,
&
ptr
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
ptr
==
NULL
,
"ptr set
\n
"
);
ptr
=
NULL
;
hr
=
WsAlloc
(
heap
,
512
,
&
ptr
,
NULL
);
todo_wine
ok
(
hr
==
WS_E_QUOTA_EXCEEDED
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
ptr
==
NULL
,
"ptr not set
\n
"
);
ptr
=
NULL
;
hr
=
WsAlloc
(
heap
,
16
,
&
ptr
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
ptr
!=
NULL
,
"ptr not set
\n
"
);
WsFreeHeap
(
heap
);
}
START_TEST
(
reader
)
{
test_WsCreateError
();
...
...
@@ -1468,4 +1494,5 @@ START_TEST(reader)
test_WsReadType
();
test_WsGetXmlAttribute
();
test_WsXmlStringEquals
();
test_WsAlloc
();
}
dlls/webservices/webservices.spec
View file @
e3859dff
...
...
@@ -9,7 +9,7 @@
@ stub WsAddErrorString
@ stub WsAddMappedHeader
@ stub WsAddressMessage
@ st
ub WsAlloc
@ st
dcall WsAlloc(ptr long ptr ptr)
@ stub WsAsyncExecute
@ stub WsCall
@ stub WsCheckMustUnderstandHeaders
...
...
include/webservices.h
View file @
e3859dff
...
...
@@ -464,6 +464,7 @@ typedef struct _WS_XML_NODE_POSITION {
void
*
node
;
}
WS_XML_NODE_POSITION
;
HRESULT
WINAPI
WsAlloc
(
WS_HEAP
*
,
SIZE_T
,
void
**
,
WS_ERROR
*
);
HRESULT
WINAPI
WsCreateError
(
const
WS_ERROR_PROPERTY
*
,
ULONG
,
WS_ERROR
**
);
HRESULT
WINAPI
WsCreateHeap
(
SIZE_T
,
SIZE_T
,
const
WS_HEAP_PROPERTY
*
,
ULONG
,
WS_HEAP
**
,
WS_ERROR
*
);
HRESULT
WINAPI
WsCreateReader
(
const
WS_XML_READER_PROPERTY
*
,
ULONG
,
WS_XML_READER
**
,
WS_ERROR
*
);
...
...
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