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
5102d4df
Commit
5102d4df
authored
Feb 04, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Feb 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Add a test for marshalling a pointer to a user type, where the…
rpcrt4/tests: Add a test for marshalling a pointer to a user type, where the user type is itself a pointer.
parent
d10a4dce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
server.c
dlls/rpcrt4/tests/server.c
+17
-1
server.idl
dlls/rpcrt4/tests/server.idl
+1
-1
No files found.
dlls/rpcrt4/tests/server.c
View file @
5102d4df
...
...
@@ -562,6 +562,16 @@ s_hash_bstr(bstr_t b)
}
void
s_get_a_bstr
(
bstr_t
*
b
)
{
bstr_t
bstr
;
short
str
[]
=
{
5
,
'W'
,
'i'
,
'n'
,
'e'
,
0
};
bstr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
str
));
memcpy
(
bstr
,
str
,
sizeof
(
str
));
*
b
=
bstr
+
1
;
}
void
s_get_name
(
name_t
*
name
)
{
const
char
bossman
[]
=
"Jeremy White"
;
...
...
@@ -1119,7 +1129,7 @@ pointer_tests(void)
puints_t
pus
;
cpuints_t
cpus
;
short
bstr_data
[]
=
{
5
,
'H'
,
'e'
,
'l'
,
'l'
,
'o'
};
bstr_t
bstr
=
&
bstr_data
[
1
];
bstr_t
bstr
=
&
bstr_data
[
1
]
,
bstr2
;
name_t
name
;
void
*
buffer
;
int
*
pa2
;
...
...
@@ -1167,6 +1177,12 @@ pointer_tests(void)
ok
(
hash_bstr
(
bstr
)
==
s_hash_bstr
(
bstr
),
"RPC hash_bstr_data
\n
"
);
get_a_bstr
(
&
bstr
);
s_get_a_bstr
(
&
bstr2
);
ok
(
!
lstrcmpW
((
LPCWSTR
)
bstr
,
(
LPCWSTR
)
bstr2
),
"bstr mismatch
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
bstr
-
1
);
HeapFree
(
GetProcessHeap
(),
0
,
bstr2
-
1
);
free_list
(
list
);
if
(
!
old_windows_version
)
...
...
dlls/rpcrt4/tests/server.idl
View file @
5102d4df
...
...
@@ -311,7 +311,7 @@ cpp_quote("#endif")
typedef [unique] user_bstr_t *wire_bstr_t;
typedef [wire_marshal(wire_bstr_t)] short *bstr_t;
unsigned hash_bstr(bstr_t s);
void get_a_bstr([out]bstr_t *s);
typedef struct
{
[string, size_is(size)] char *name;
...
...
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