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
9061ee4e
Commit
9061ee4e
authored
Sep 14, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Implement WsGetHeapProperty.
parent
5db34f7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
1 deletion
+96
-1
reader.c
dlls/webservices/reader.c
+23
-0
reader.c
dlls/webservices/tests/reader.c
+72
-0
webservices.spec
dlls/webservices/webservices.spec
+1
-1
No files found.
dlls/webservices/reader.c
View file @
9061ee4e
...
...
@@ -200,6 +200,15 @@ static HRESULT set_heap_prop( struct heap *heap, WS_HEAP_PROPERTY_ID id, const v
return
S_OK
;
}
static
HRESULT
get_heap_prop
(
struct
heap
*
heap
,
WS_HEAP_PROPERTY_ID
id
,
void
*
buf
,
ULONG
size
)
{
if
(
id
>=
heap
->
prop_count
||
size
!=
heap_props
[
id
].
size
)
return
E_INVALIDARG
;
memcpy
(
buf
,
heap
->
prop
[
id
].
value
,
heap
->
prop
[
id
].
valueSize
);
return
S_OK
;
}
/**************************************************************************
* WsCreateHeap [webservices.@]
*/
...
...
@@ -254,6 +263,20 @@ HRESULT WINAPI WsGetErrorProperty( WS_ERROR *handle, WS_ERROR_PROPERTY_ID id, vo
}
/**************************************************************************
* WsGetHeapProperty [webservices.@]
*/
HRESULT
WINAPI
WsGetHeapProperty
(
WS_HEAP
*
handle
,
WS_HEAP_PROPERTY_ID
id
,
void
*
buf
,
ULONG
size
,
WS_ERROR
*
error
)
{
struct
heap
*
heap
=
(
struct
heap
*
)
handle
;
TRACE
(
"%p %u %p %u %p
\n
"
,
handle
,
id
,
buf
,
size
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
return
get_heap_prop
(
heap
,
id
,
buf
,
size
);
}
/**************************************************************************
* WsSetErrorProperty [webservices.@]
*/
HRESULT
WINAPI
WsSetErrorProperty
(
WS_ERROR
*
handle
,
WS_ERROR_PROPERTY_ID
id
,
const
void
*
value
,
...
...
dlls/webservices/tests/reader.c
View file @
9061ee4e
...
...
@@ -112,7 +112,79 @@ static void test_WsCreateError(void)
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
}
static
void
test_WsCreateHeap
(
void
)
{
HRESULT
hr
;
WS_HEAP
*
heap
;
WS_HEAP_PROPERTY
prop
;
SIZE_T
max
,
trim
,
requested
,
actual
;
ULONG
size
;
hr
=
WsCreateHeap
(
0
,
0
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
heap
=
NULL
;
hr
=
WsCreateHeap
(
0
,
0
,
NULL
,
0
,
&
heap
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
heap
!=
NULL
,
"heap not set
\n
"
);
WsFreeHeap
(
heap
);
hr
=
WsCreateHeap
(
1
<<
16
,
1
<<
6
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
heap
=
NULL
;
hr
=
WsCreateHeap
(
1
<<
16
,
0
,
NULL
,
0
,
&
heap
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
heap
!=
NULL
,
"heap not set
\n
"
);
WsFreeHeap
(
heap
);
hr
=
WsCreateHeap
(
1
<<
16
,
1
<<
6
,
NULL
,
0
,
&
heap
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
max
=
0xdeadbeef
;
size
=
sizeof
(
max
);
hr
=
WsGetHeapProperty
(
heap
,
WS_HEAP_PROPERTY_MAX_SIZE
,
&
max
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
max
==
1
<<
16
,
"got %u
\n
"
,
(
ULONG
)
max
);
trim
=
0xdeadbeef
;
size
=
sizeof
(
trim
);
hr
=
WsGetHeapProperty
(
heap
,
WS_HEAP_PROPERTY_TRIM_SIZE
,
&
trim
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
trim
==
1
<<
6
,
"got %u
\n
"
,
(
ULONG
)
trim
);
requested
=
0xdeadbeef
;
size
=
sizeof
(
requested
);
hr
=
WsGetHeapProperty
(
heap
,
WS_HEAP_PROPERTY_REQUESTED_SIZE
,
&
requested
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
!
requested
,
"got %u
\n
"
,
(
ULONG
)
requested
);
actual
=
0xdeadbeef
;
size
=
sizeof
(
actual
);
hr
=
WsGetHeapProperty
(
heap
,
WS_HEAP_PROPERTY_ACTUAL_SIZE
,
&
actual
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
!
actual
,
"got %u
\n
"
,
(
ULONG
)
actual
);
actual
=
0xdeadbeef
;
size
=
sizeof
(
actual
);
hr
=
WsGetHeapProperty
(
heap
,
WS_HEAP_PROPERTY_ACTUAL_SIZE
+
1
,
&
actual
,
size
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
ok
(
actual
==
0xdeadbeef
,
"got %u
\n
"
,
(
ULONG
)
actual
);
WsFreeHeap
(
heap
);
max
=
1
<<
16
;
prop
.
id
=
WS_HEAP_PROPERTY_MAX_SIZE
;
prop
.
value
=
&
max
;
prop
.
valueSize
=
sizeof
(
max
);
hr
=
WsCreateHeap
(
1
<<
16
,
1
<<
6
,
&
prop
,
1
,
&
heap
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
hr
=
WsCreateHeap
(
1
<<
16
,
1
<<
6
,
NULL
,
1
,
&
heap
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
}
START_TEST
(
reader
)
{
test_WsCreateError
();
test_WsCreateHeap
();
}
dlls/webservices/webservices.spec
View file @
9061ee4e
...
...
@@ -68,7 +68,7 @@
@ stub WsGetFaultErrorProperty
@ stub WsGetHeader
@ stub WsGetHeaderAttributes
@ st
ub WsGetHeapProperty
@ st
dcall WsGetHeapProperty(ptr long ptr long ptr)
@ stub WsGetListenerProperty
@ stub WsGetMappedHeader
@ stub WsGetMessageProperty
...
...
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