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
d73a6bae
Commit
d73a6bae
authored
Jan 23, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Run RPC tests in both mixed and fully interpreted mode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
68867176
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
965 additions
and
228 deletions
+965
-228
Makefile.in
dlls/rpcrt4/tests/Makefile.in
+5
-1
server.c
dlls/rpcrt4/tests/server.c
+798
-136
server.idl
dlls/rpcrt4/tests/server.idl
+137
-91
server_interp.idl
dlls/rpcrt4/tests/server_interp.idl
+25
-0
No files found.
dlls/rpcrt4/tests/Makefile.in
View file @
d73a6bae
...
...
@@ -3,6 +3,9 @@ IMPORTS = oleaut32 ole32 rpcrt4 secur32 advapi32
EXTRAIDLFLAGS
=
--prefix-server
=
s_
EXTRADEFS
=
-DPROXY_DELEGATION
server_EXTRAIDLFLAGS
=
-Os
server_interp_EXTRAIDLFLAGS
=
-Oicf
C_SRCS
=
\
cstub.c
\
generated.c
\
...
...
@@ -13,4 +16,5 @@ C_SRCS = \
IDL_SRCS
=
\
cstub.idl
\
server.idl
server.idl
\
server_interp.idl
dlls/rpcrt4/tests/server.c
View file @
d73a6bae
...
...
@@ -27,6 +27,8 @@
#include <netfw.h>
#include "wine/test.h"
#include "server.h"
#define SKIP_STRUCT_DECLS
#include "server_interp.h"
#include "server_defines.h"
#include <stddef.h>
...
...
@@ -53,12 +55,207 @@ static RPC_STATUS (WINAPI *pRpcServerRegisterAuthInfoA)(RPC_CSTR, ULONG, RPC_AUT
static
char
*
domain_and_user
;
static
int
(
__cdecl
*
int_return
)(
void
);
static
int
(
__cdecl
*
square
)(
int
x
);
static
int
(
__cdecl
*
sum
)(
int
x
,
int
y
);
static
signed
char
(
__cdecl
*
sum_char
)(
signed
char
x
,
signed
char
y
);
static
short
(
__cdecl
*
sum_short
)(
short
x
,
short
y
);
static
int
(
__cdecl
*
sum_float
)(
float
x
,
float
y
);
static
int
(
__cdecl
*
sum_double_int
)(
int
x
,
double
y
);
static
hyper
(
__cdecl
*
sum_hyper
)(
hyper
x
,
hyper
y
);
static
int
(
__cdecl
*
sum_hyper_int
)(
hyper
x
,
hyper
y
);
static
int
(
__cdecl
*
sum_char_hyper
)(
signed
char
x
,
hyper
y
);
static
void
(
__cdecl
*
square_out
)(
int
x
,
int
*
y
);
static
void
(
__cdecl
*
square_ref
)(
int
*
x
);
static
int
(
__cdecl
*
str_length
)(
const
char
*
s
);
static
int
(
__cdecl
*
str_t_length
)(
str_t
s
);
static
int
(
__cdecl
*
cstr_length
)(
const
char
*
s
,
int
n
);
static
int
(
__cdecl
*
dot_self
)(
vector_t
*
v
);
static
double
(
__cdecl
*
square_half
)(
double
x
,
double
*
y
);
static
float
(
__cdecl
*
square_half_float
)(
float
x
,
float
*
y
);
static
LONG
(
__cdecl
*
square_half_long
)(
LONG
x
,
LONG
*
y
);
static
int
(
__cdecl
*
sum_fixed_array
)(
int
a
[
5
]);
static
int
(
__cdecl
*
pints_sum
)(
pints_t
*
pints
);
static
double
(
__cdecl
*
ptypes_sum
)(
ptypes_t
*
ptypes
);
static
int
(
__cdecl
*
dot_pvectors
)(
pvectors_t
*
pvectors
);
static
int
(
__cdecl
*
sum_sp
)(
sp_t
*
sp
);
static
double
(
__cdecl
*
square_sun
)(
sun_t
*
su
);
static
int
(
__cdecl
*
test_list_length
)(
test_list_t
*
ls
);
static
int
(
__cdecl
*
sum_fixed_int_3d
)(
int
m
[
2
][
3
][
4
]);
static
int
(
__cdecl
*
sum_conf_array
)(
int
x
[],
int
n
);
static
int
(
__cdecl
*
sum_conf_ptr_by_conf_ptr
)(
int
n1
,
int
*
n2_then_x1
,
int
*
x2
);
static
int
(
__cdecl
*
sum_unique_conf_array
)(
int
x
[],
int
n
);
static
int
(
__cdecl
*
sum_unique_conf_ptr
)(
int
*
x
,
int
n
);
static
int
(
__cdecl
*
sum_var_array
)(
int
x
[
20
],
int
n
);
static
int
(
__cdecl
*
dot_two_vectors
)(
vector_t
vs
[
2
]);
static
void
(
__cdecl
*
get_number_array
)(
int
x
[
20
],
int
*
n
);
static
int
(
__cdecl
*
sum_cs
)(
cs_t
*
cs
);
static
int
(
__cdecl
*
sum_cps
)(
cps_t
*
cps
);
static
int
(
__cdecl
*
sum_cpsc
)(
cpsc_t
*
cpsc
);
static
int
(
__cdecl
*
get_cpsc
)(
int
n
,
cpsc_t
*
cpsc
);
static
int
(
__cdecl
*
sum_complex_array
)(
int
n
,
refpint_t
pi
[]);
static
int
(
__cdecl
*
square_puint
)(
puint_t
p
);
static
int
(
__cdecl
*
sum_puints
)(
puints_t
*
p
);
static
int
(
__cdecl
*
sum_cpuints
)(
cpuints_t
*
p
);
static
int
(
__cdecl
*
dot_copy_vectors
)(
vector_t
u
,
vector_t
v
);
static
double
(
__cdecl
*
square_encu
)(
encu_t
*
eu
);
static
double
(
__cdecl
*
square_unencu
)(
int
t
,
unencu_t
*
eu
);
static
int
(
__cdecl
*
sum_parr
)(
int
*
a
[
3
]);
static
int
(
__cdecl
*
sum_pcarr
)(
int
*
a
[],
int
n
);
static
int
(
__cdecl
*
enum_ord
)(
e_t
e
);
static
double
(
__cdecl
*
square_encue
)(
encue_t
*
eue
);
static
void
(
__cdecl
*
check_se2
)(
se_t
*
s
);
static
int
(
__cdecl
*
sum_toplev_conf_2n
)(
int
*
x
,
int
n
);
static
int
(
__cdecl
*
sum_toplev_conf_cond
)(
int
*
x
,
int
a
,
int
b
,
int
c
);
static
int
(
__cdecl
*
square_test_us
)(
test_us_t
*
tus
);
static
double
(
__cdecl
*
sum_aligns
)(
aligns_t
*
a
);
static
int
(
__cdecl
*
sum_padded
)(
padded_t
*
p
);
static
int
(
__cdecl
*
sum_padded2
)(
padded_t
ps
[
2
]);
static
int
(
__cdecl
*
sum_padded_conf
)(
padded_t
*
ps
,
int
n
);
static
int
(
__cdecl
*
sum_bogus
)(
bogus_t
*
b
);
static
void
(
__cdecl
*
check_null
)(
int
*
null
);
static
int
(
__cdecl
*
str_struct_len
)(
str_struct_t
*
s
);
static
int
(
__cdecl
*
wstr_struct_len
)(
wstr_struct_t
*
s
);
static
int
(
__cdecl
*
sum_doub_carr
)(
doub_carr_t
*
dc
);
static
void
(
__cdecl
*
make_pyramid_doub_carr
)(
unsigned
char
n
,
doub_carr_t
**
dc
);
static
unsigned
(
__cdecl
*
hash_bstr
)(
bstr_t
s
);
static
void
(
__cdecl
*
get_a_bstr
)(
bstr_t
*
s
);
static
void
(
__cdecl
*
get_name
)(
name_t
*
name
);
static
void
(
__cdecl
*
get_names
)(
int
*
n
,
str_array_t
*
names
);
static
void
(
__cdecl
*
get_namesw
)(
int
*
n
,
wstr_array_t
*
names
);
static
int
(
__cdecl
*
sum_pcarr2
)(
int
n
,
int
**
pa
);
static
int
(
__cdecl
*
sum_L1_norms
)(
int
n
,
vector_t
*
vs
);
static
s123_t
*
(
__cdecl
*
get_s123
)(
void
);
static
void
(
__cdecl
*
get_numbers
)(
int
length
,
int
size
,
pints_t
pn
[]);
static
void
(
__cdecl
*
get_numbers_struct
)(
numbers_struct_t
**
ns
);
static
str_t
(
__cdecl
*
get_filename
)(
void
);
static
rint_t
(
__cdecl
*
echo_ranged_int
)(
int
i
,
int
j
,
int
k
);
static
rint_t
(
__cdecl
*
echo_ranged_int2
)(
int
i
);
static
void
(
__cdecl
*
get_ranged_enum
)(
renum_t
*
re
);
static
void
(
__cdecl
*
context_handle_test
)(
void
);
static
void
(
__cdecl
*
full_pointer_test
)(
int
*
a
,
int
*
b
);
static
void
(
__cdecl
*
full_pointer_null_test
)(
int
*
a
,
int
*
b
);
static
void
(
__cdecl
*
authinfo_test
)(
unsigned
int
protseq
,
int
secure
);
static
void
(
__cdecl
*
stop
)(
void
);
static
void
(
__cdecl
*
stop_autolisten
)(
void
);
static
void
(
__cdecl
*
ip_test
)(
ipu_t
*
a
);
static
int
(
__cdecl
*
sum_ptr_array
)(
int
*
a
[
2
]);
static
int
(
__cdecl
*
sum_array_ptr
)(
int
(
*
a
)[
2
]);
#define SERVER_FUNCTIONS \
X(int_return) \
X(square) \
X(sum) \
X(sum_char) \
X(sum_short) \
X(sum_float) \
X(sum_double_int) \
X(sum_hyper) \
X(sum_hyper_int) \
X(sum_char_hyper) \
X(square_out) \
X(square_ref) \
X(str_length) \
X(str_t_length) \
X(cstr_length) \
X(dot_self) \
X(square_half) \
X(square_half_float) \
X(square_half_long) \
X(sum_fixed_array) \
X(pints_sum) \
X(ptypes_sum) \
X(dot_pvectors) \
X(sum_sp) \
X(square_sun) \
X(test_list_length) \
X(sum_fixed_int_3d) \
X(sum_conf_array) \
X(sum_conf_ptr_by_conf_ptr) \
X(sum_unique_conf_array) \
X(sum_unique_conf_ptr) \
X(sum_var_array) \
X(dot_two_vectors) \
X(get_number_array) \
X(sum_cs) \
X(sum_cps) \
X(sum_cpsc) \
X(get_cpsc) \
X(sum_complex_array) \
X(square_puint) \
X(sum_puints) \
X(sum_cpuints) \
X(dot_copy_vectors) \
X(square_encu) \
X(square_unencu) \
X(sum_parr) \
X(sum_pcarr) \
X(enum_ord) \
X(square_encue) \
X(check_se2) \
X(sum_toplev_conf_2n) \
X(sum_toplev_conf_cond) \
X(square_test_us) \
X(sum_aligns) \
X(sum_padded) \
X(sum_padded2) \
X(sum_padded_conf) \
X(sum_bogus) \
X(check_null) \
X(str_struct_len) \
X(wstr_struct_len) \
X(sum_doub_carr) \
X(make_pyramid_doub_carr) \
X(hash_bstr) \
X(get_a_bstr) \
X(get_name) \
X(get_names) \
X(get_namesw) \
X(sum_pcarr2) \
X(sum_L1_norms) \
X(get_s123) \
X(get_numbers) \
X(get_numbers_struct) \
X(get_filename) \
X(echo_ranged_int) \
X(echo_ranged_int2) \
X(get_ranged_enum) \
X(context_handle_test) \
X(full_pointer_test) \
X(full_pointer_null_test) \
X(authinfo_test) \
X(stop) \
X(stop_autolisten) \
X(ip_test) \
X(sum_ptr_array) \
X(sum_array_ptr)
/* type check statements generated in header file */
fnprintf
*
p_printf
=
printf
;
static
const
WCHAR
helloW
[]
=
{
'H'
,
'e'
,
'l'
,
'l'
,
'o'
,
0
};
static
const
WCHAR
worldW
[]
=
{
'W'
,
'o'
,
'r'
,
'l'
,
'd'
,
'!'
,
0
};
static
BOOL
is_interp
;
static
void
set_interp_interface
(
void
)
{
is_interp
=
TRUE
;
#define X(name) name = interp_##name;
SERVER_FUNCTIONS
#undef X
}
static
void
set_mixed_interface
(
void
)
{
is_interp
=
FALSE
;
#define X(name) name = mixed_##name;
SERVER_FUNCTIONS
#undef X
}
static
void
InitFunctionPointers
(
void
)
{
HMODULE
hrpcrt4
=
GetModuleHandleA
(
"rpcrt4.dll"
);
...
...
@@ -92,77 +289,147 @@ xstrdup(const char *s)
return
d
;
}
int
__cdecl
s_int_return
(
void
)
int
__cdecl
s_
mixed_
int_return
(
void
)
{
return
INT_CODE
;
}
int
__cdecl
s_square
(
int
x
)
int
__cdecl
s_interp_int_return
(
void
)
{
return
s_mixed_int_return
();
}
int
__cdecl
s_mixed_square
(
int
x
)
{
return
x
*
x
;
}
int
__cdecl
s_sum
(
int
x
,
int
y
)
int
__cdecl
s_interp_square
(
int
x
)
{
return
s_mixed_square
(
x
);
}
int
__cdecl
s_mixed_sum
(
int
x
,
int
y
)
{
return
x
+
y
;
}
signed
char
__cdecl
s_sum_char
(
signed
char
x
,
signed
char
y
)
int
__cdecl
s_interp_sum
(
int
x
,
int
y
)
{
return
x
+
y
;
return
s_mixed_sum
(
x
,
y
)
;
}
s
hort
__cdecl
s_sum_short
(
short
x
,
short
y
)
s
igned
char
__cdecl
s_mixed_sum_char
(
signed
char
x
,
signed
char
y
)
{
return
x
+
y
;
}
int
__cdecl
s_sum_float
(
float
x
,
float
y
)
signed
char
__cdecl
s_interp_sum_char
(
signed
char
x
,
signed
char
y
)
{
return
x
+
y
;
return
s_mixed_sum_char
(
x
,
y
)
;
}
int
__cdecl
s_sum_double_int
(
int
x
,
double
y
)
short
__cdecl
s_mixed_sum_short
(
short
x
,
short
y
)
{
return
x
+
y
;
}
hyper
__cdecl
s_sum_hyper
(
hyper
x
,
hyper
y
)
short
__cdecl
s_interp_sum_short
(
short
x
,
short
y
)
{
return
s_mixed_sum_short
(
x
,
y
);
}
int
__cdecl
s_mixed_sum_float
(
float
x
,
float
y
)
{
return
x
+
y
;
}
int
__cdecl
s_sum_hyper_int
(
hyper
x
,
hyper
y
)
int
__cdecl
s_interp_sum_float
(
float
x
,
float
y
)
{
return
s_mixed_sum_float
(
x
,
y
);
}
int
__cdecl
s_mixed_sum_double_int
(
int
x
,
double
y
)
{
return
x
+
y
;
}
int
__cdecl
s_interp_sum_double_int
(
int
x
,
double
y
)
{
return
s_mixed_sum_double_int
(
x
,
y
);
}
hyper
__cdecl
s_mixed_sum_hyper
(
hyper
x
,
hyper
y
)
{
return
x
+
y
;
}
int
__cdecl
s_sum_char_hyper
(
signed
char
x
,
hyper
y
)
hyper
__cdecl
s_interp_sum_hyper
(
hyper
x
,
hyper
y
)
{
return
s_mixed_sum_hyper
(
x
,
y
);
}
int
__cdecl
s_mixed_sum_hyper_int
(
hyper
x
,
hyper
y
)
{
return
x
+
y
;
}
void
__cdecl
s_square_out
(
int
x
,
int
*
y
)
int
__cdecl
s_interp_sum_hyper_int
(
hyper
x
,
hyper
y
)
{
return
s_mixed_sum_hyper_int
(
x
,
y
);
}
int
__cdecl
s_mixed_sum_char_hyper
(
signed
char
x
,
hyper
y
)
{
*
y
=
s_square
(
x
);
return
x
+
y
;
}
int
__cdecl
s_interp_sum_char_hyper
(
signed
char
x
,
hyper
y
)
{
return
s_mixed_sum_char_hyper
(
x
,
y
);
}
void
__cdecl
s_mixed_square_out
(
int
x
,
int
*
y
)
{
*
y
=
s_mixed_square
(
x
);
}
void
__cdecl
s_interp_square_out
(
int
x
,
int
*
y
)
{
s_mixed_square_out
(
x
,
y
);
}
void
__cdecl
s_square_ref
(
int
*
x
)
void
__cdecl
s_
mixed_
square_ref
(
int
*
x
)
{
*
x
=
s_square
(
*
x
);
*
x
=
s_
mixed_
square
(
*
x
);
}
int
__cdecl
s_str_length
(
const
char
*
s
)
void
__cdecl
s_interp_square_ref
(
int
*
x
)
{
return
s_mixed_square_ref
(
x
);
}
int
__cdecl
s_mixed_str_length
(
const
char
*
s
)
{
return
strlen
(
s
);
}
int
__cdecl
s_str_t_length
(
str_t
s
)
int
__cdecl
s_interp_str_length
(
const
char
*
s
)
{
return
s_mixed_str_length
(
s
);
}
int
__cdecl
s_mixed_str_t_length
(
str_t
s
)
{
return
strlen
(
s
);
}
int
__cdecl
s_cstr_length
(
const
char
*
s
,
int
n
)
int
__cdecl
s_interp_str_t_length
(
str_t
s
)
{
return
s_mixed_str_t_length
(
s
);
}
int
__cdecl
s_mixed_cstr_length
(
const
char
*
s
,
int
n
)
{
int
len
=
0
;
while
(
0
<
n
--
&&
*
s
++
)
...
...
@@ -170,55 +437,105 @@ int __cdecl s_cstr_length(const char *s, int n)
return
len
;
}
int
__cdecl
s_
dot_self
(
vector_t
*
v
)
int
__cdecl
s_
interp_cstr_length
(
const
char
*
s
,
int
n
)
{
return
s_
square
(
v
->
x
)
+
s_square
(
v
->
y
)
+
s_square
(
v
->
z
);
return
s_
mixed_cstr_length
(
s
,
n
);
}
double
__cdecl
s_square_half
(
double
x
,
double
*
y
)
int
__cdecl
s_mixed_dot_self
(
vector_t
*
v
)
{
return
s_mixed_square
(
v
->
x
)
+
s_mixed_square
(
v
->
y
)
+
s_mixed_square
(
v
->
z
);
}
int
__cdecl
s_interp_dot_self
(
vector_t
*
v
)
{
return
s_mixed_dot_self
(
v
);
}
double
__cdecl
s_mixed_square_half
(
double
x
,
double
*
y
)
{
*
y
=
x
/
2
.
0
;
return
x
*
x
;
}
float
__cdecl
s_square_half_float
(
float
x
,
float
*
y
)
double
__cdecl
s_interp_square_half
(
double
x
,
double
*
y
)
{
return
s_mixed_square_half
(
x
,
y
);
}
float
__cdecl
s_mixed_square_half_float
(
float
x
,
float
*
y
)
{
*
y
=
x
/
2
.
0
f
;
return
x
*
x
;
}
LONG
__cdecl
s_square_half_long
(
LONG
x
,
LONG
*
y
)
float
__cdecl
s_interp_square_half_float
(
float
x
,
float
*
y
)
{
return
s_mixed_square_half_float
(
x
,
y
);
}
LONG
__cdecl
s_mixed_square_half_long
(
LONG
x
,
LONG
*
y
)
{
*
y
=
x
/
2
;
return
x
*
x
;
}
int
__cdecl
s_sum_fixed_array
(
int
a
[
5
])
LONG
__cdecl
s_interp_square_half_long
(
LONG
x
,
LONG
*
y
)
{
return
s_mixed_square_half_long
(
x
,
y
);
}
int
__cdecl
s_mixed_sum_fixed_array
(
int
a
[
5
])
{
return
a
[
0
]
+
a
[
1
]
+
a
[
2
]
+
a
[
3
]
+
a
[
4
];
}
int
__cdecl
s_pints_sum
(
pints_t
*
pints
)
int
__cdecl
s_interp_sum_fixed_array
(
int
a
[
5
])
{
return
s_mixed_sum_fixed_array
(
a
);
}
int
__cdecl
s_mixed_pints_sum
(
pints_t
*
pints
)
{
return
*
pints
->
pi
+
**
pints
->
ppi
+
***
pints
->
pppi
;
}
double
__cdecl
s_ptypes_sum
(
ptypes_t
*
pt
)
int
__cdecl
s_interp_pints_sum
(
pints_t
*
pints
)
{
return
s_mixed_pints_sum
(
pints
);
}
double
__cdecl
s_mixed_ptypes_sum
(
ptypes_t
*
pt
)
{
return
*
pt
->
pc
+
*
pt
->
ps
+
*
pt
->
pl
+
*
pt
->
pf
+
*
pt
->
pd
;
}
int
__cdecl
s_dot_pvectors
(
pvectors_t
*
p
)
double
__cdecl
s_interp_ptypes_sum
(
ptypes_t
*
pt
)
{
return
s_mixed_ptypes_sum
(
pt
);
}
int
__cdecl
s_mixed_dot_pvectors
(
pvectors_t
*
p
)
{
return
p
->
pu
->
x
*
(
*
p
->
pv
)
->
x
+
p
->
pu
->
y
*
(
*
p
->
pv
)
->
y
+
p
->
pu
->
z
*
(
*
p
->
pv
)
->
z
;
}
int
__cdecl
s_sum_sp
(
sp_t
*
sp
)
int
__cdecl
s_interp_dot_pvectors
(
pvectors_t
*
p
)
{
return
s_mixed_dot_pvectors
(
p
);
}
int
__cdecl
s_mixed_sum_sp
(
sp_t
*
sp
)
{
return
sp
->
x
+
sp
->
s
->
x
;
}
double
__cdecl
s_square_sun
(
sun_t
*
su
)
int
__cdecl
s_interp_sum_sp
(
sp_t
*
sp
)
{
return
s_mixed_sum_sp
(
sp
);
}
double
__cdecl
s_mixed_square_sun
(
sun_t
*
su
)
{
switch
(
su
->
s
)
{
...
...
@@ -231,14 +548,24 @@ double __cdecl s_square_sun(sun_t *su)
}
}
int
__cdecl
s_test_list_length
(
test_list_t
*
list
)
double
__cdecl
s_interp_square_sun
(
sun_t
*
su
)
{
return
s_mixed_square_sun
(
su
);
}
int
__cdecl
s_mixed_test_list_length
(
test_list_t
*
list
)
{
return
(
list
->
t
==
TL_LIST
?
1
+
s_test_list_length
(
list
->
u
.
tail
)
?
1
+
s_
mixed_
test_list_length
(
list
->
u
.
tail
)
:
0
);
}
int
__cdecl
s_sum_fixed_int_3d
(
int
m
[
2
][
3
][
4
])
int
__cdecl
s_interp_test_list_length
(
test_list_t
*
list
)
{
return
s_mixed_test_list_length
(
list
);
}
int
__cdecl
s_mixed_sum_fixed_int_3d
(
int
m
[
2
][
3
][
4
])
{
int
i
,
j
,
k
;
int
sum
=
0
;
...
...
@@ -251,7 +578,12 @@ int __cdecl s_sum_fixed_int_3d(int m[2][3][4])
return
sum
;
}
int
__cdecl
s_sum_conf_array
(
int
x
[],
int
n
)
int
__cdecl
s_interp_sum_fixed_int_3d
(
int
m
[
2
][
3
][
4
])
{
return
s_mixed_sum_fixed_int_3d
(
m
);
}
int
__cdecl
s_mixed_sum_conf_array
(
int
x
[],
int
n
)
{
int
*
p
=
x
,
*
end
=
p
+
n
;
int
sum
=
0
;
...
...
@@ -262,7 +594,12 @@ int __cdecl s_sum_conf_array(int x[], int n)
return
sum
;
}
int
__cdecl
s_sum_conf_ptr_by_conf_ptr
(
int
n1
,
int
*
n2_then_x1
,
int
*
x2
)
int
__cdecl
s_interp_sum_conf_array
(
int
x
[],
int
n
)
{
return
s_mixed_sum_conf_array
(
x
,
n
);
}
int
__cdecl
s_mixed_sum_conf_ptr_by_conf_ptr
(
int
n1
,
int
*
n2_then_x1
,
int
*
x2
)
{
int
i
;
int
sum
=
0
;
...
...
@@ -278,25 +615,45 @@ int __cdecl s_sum_conf_ptr_by_conf_ptr(int n1, int *n2_then_x1, int *x2)
return
sum
;
}
int
__cdecl
s_sum_unique_conf_array
(
int
x
[],
int
n
)
int
__cdecl
s_interp_sum_conf_ptr_by_conf_ptr
(
int
n1
,
int
*
n2_then_x1
,
int
*
x2
)
{
return
s_mixed_sum_conf_ptr_by_conf_ptr
(
n1
,
n2_then_x1
,
x2
);
}
int
__cdecl
s_mixed_sum_unique_conf_array
(
int
x
[],
int
n
)
{
return
s_mixed_sum_conf_array
(
x
,
n
);
}
int
__cdecl
s_interp_sum_unique_conf_array
(
int
x
[],
int
n
)
{
return
s_mixed_sum_unique_conf_array
(
x
,
n
);
}
int
__cdecl
s_mixed_sum_unique_conf_ptr
(
int
*
x
,
int
n
)
{
return
s_sum_conf_array
(
x
,
n
)
;
return
x
?
s_mixed_sum_conf_array
(
x
,
n
)
:
0
;
}
int
__cdecl
s_sum_unique_conf_ptr
(
int
*
x
,
int
n
)
int
__cdecl
s_
interp_
sum_unique_conf_ptr
(
int
*
x
,
int
n
)
{
return
x
?
s_sum_conf_array
(
x
,
n
)
:
0
;
return
s_mixed_sum_unique_conf_ptr
(
x
,
n
)
;
}
int
__cdecl
s_sum_var_array
(
int
x
[
20
],
int
n
)
int
__cdecl
s_
mixed_
sum_var_array
(
int
x
[
20
],
int
n
)
{
ok
(
0
<=
n
,
"RPC sum_var_array
\n
"
);
ok
(
n
<=
20
,
"RPC sum_var_array
\n
"
);
return
s_sum_conf_array
(
x
,
n
);
return
s_
mixed_
sum_conf_array
(
x
,
n
);
}
int
__cdecl
s_sum_complex_array
(
int
n
,
refpint_t
pi
[])
int
__cdecl
s_interp_sum_var_array
(
int
x
[
20
],
int
n
)
{
return
s_mixed_sum_var_array
(
x
,
n
);
}
int
__cdecl
s_mixed_sum_complex_array
(
int
n
,
refpint_t
pi
[])
{
int
total
=
0
;
for
(;
n
>
0
;
n
--
)
...
...
@@ -304,24 +661,44 @@ int __cdecl s_sum_complex_array(int n, refpint_t pi[])
return
total
;
}
int
__cdecl
s_dot_two_vectors
(
vector_t
vs
[
2
])
int
__cdecl
s_interp_sum_complex_array
(
int
n
,
refpint_t
pi
[])
{
return
s_mixed_sum_complex_array
(
n
,
pi
);
}
int
__cdecl
s_mixed_dot_two_vectors
(
vector_t
vs
[
2
])
{
return
vs
[
0
].
x
*
vs
[
1
].
x
+
vs
[
0
].
y
*
vs
[
1
].
y
+
vs
[
0
].
z
*
vs
[
1
].
z
;
}
void
__cdecl
s_get_number_array
(
int
x
[
20
],
int
*
n
)
int
__cdecl
s_interp_dot_two_vectors
(
vector_t
vs
[
2
])
{
return
s_mixed_dot_two_vectors
(
vs
);
}
void
__cdecl
s_mixed_get_number_array
(
int
x
[
20
],
int
*
n
)
{
int
c
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
memcpy
(
x
,
c
,
sizeof
(
c
));
*
n
=
ARRAY_SIZE
(
c
);
}
int
__cdecl
s_sum_cs
(
cs_t
*
cs
)
void
__cdecl
s_interp_get_number_array
(
int
x
[
20
],
int
*
n
)
{
return
s_mixed_get_number_array
(
x
,
n
);
}
int
__cdecl
s_mixed_sum_cs
(
cs_t
*
cs
)
{
return
s_mixed_sum_conf_array
(
cs
->
ca
,
cs
->
n
);
}
int
__cdecl
s_interp_sum_cs
(
cs_t
*
cs
)
{
return
s_
sum_conf_array
(
cs
->
ca
,
cs
->
n
);
return
s_
mixed_sum_cs
(
cs
);
}
int
__cdecl
s_sum_cps
(
cps_t
*
cps
)
int
__cdecl
s_
mixed_
sum_cps
(
cps_t
*
cps
)
{
int
sum
=
0
;
int
i
;
...
...
@@ -335,7 +712,12 @@ int __cdecl s_sum_cps(cps_t *cps)
return
sum
;
}
int
__cdecl
s_sum_cpsc
(
cpsc_t
*
cpsc
)
int
__cdecl
s_interp_sum_cps
(
cps_t
*
cps
)
{
return
s_mixed_sum_cps
(
cps
);
}
int
__cdecl
s_mixed_sum_cpsc
(
cpsc_t
*
cpsc
)
{
int
sum
=
0
;
int
i
;
...
...
@@ -344,7 +726,12 @@ int __cdecl s_sum_cpsc(cpsc_t *cpsc)
return
sum
;
}
int
__cdecl
s_get_cpsc
(
int
n
,
cpsc_t
*
cpsc
)
int
__cdecl
s_interp_sum_cpsc
(
cpsc_t
*
cpsc
)
{
return
s_mixed_sum_cpsc
(
cpsc
);
}
int
__cdecl
s_mixed_get_cpsc
(
int
n
,
cpsc_t
*
cpsc
)
{
int
i
,
ret
;
...
...
@@ -357,13 +744,23 @@ int __cdecl s_get_cpsc(int n, cpsc_t *cpsc)
return
ret
;
}
int
__cdecl
s_square_puint
(
puint_t
p
)
int
__cdecl
s_interp_get_cpsc
(
int
n
,
cpsc_t
*
cpsc
)
{
return
s_mixed_get_cpsc
(
n
,
cpsc
);
}
int
__cdecl
s_mixed_square_puint
(
puint_t
p
)
{
int
n
=
atoi
(
p
);
return
n
*
n
;
}
int
__cdecl
s_sum_puints
(
puints_t
*
p
)
int
__cdecl
s_interp_square_puint
(
puint_t
p
)
{
return
s_mixed_square_puint
(
p
);
}
int
__cdecl
s_mixed_sum_puints
(
puints_t
*
p
)
{
int
sum
=
0
;
int
i
;
...
...
@@ -372,7 +769,12 @@ int __cdecl s_sum_puints(puints_t *p)
return
sum
;
}
int
__cdecl
s_sum_cpuints
(
cpuints_t
*
p
)
int
__cdecl
s_interp_sum_puints
(
puints_t
*
p
)
{
return
s_mixed_sum_puints
(
p
);
}
int
__cdecl
s_mixed_sum_cpuints
(
cpuints_t
*
p
)
{
int
sum
=
0
;
int
i
;
...
...
@@ -381,18 +783,33 @@ int __cdecl s_sum_cpuints(cpuints_t *p)
return
sum
;
}
int
__cdecl
s_dot_copy_vectors
(
vector_t
u
,
vector_t
v
)
int
__cdecl
s_interp_sum_cpuints
(
cpuints_t
*
p
)
{
return
s_mixed_sum_cpuints
(
p
);
}
int
__cdecl
s_mixed_dot_copy_vectors
(
vector_t
u
,
vector_t
v
)
{
return
u
.
x
*
v
.
x
+
u
.
y
*
v
.
y
+
u
.
z
*
v
.
z
;
}
int
__cdecl
s_square_test_us
(
test_us_t
*
tus
)
int
__cdecl
s_interp_dot_copy_vectors
(
vector_t
u
,
vector_t
v
)
{
return
s_mixed_dot_copy_vectors
(
u
,
v
);
}
int
__cdecl
s_mixed_square_test_us
(
test_us_t
*
tus
)
{
int
n
=
atoi
(
tus
->
us
.
x
);
return
n
*
n
;
}
double
__cdecl
s_square_encu
(
encu_t
*
eu
)
int
__cdecl
s_interp_square_test_us
(
test_us_t
*
tus
)
{
return
s_mixed_square_test_us
(
tus
);
}
double
__cdecl
s_mixed_square_encu
(
encu_t
*
eu
)
{
switch
(
eu
->
t
)
{
...
...
@@ -403,7 +820,12 @@ double __cdecl s_square_encu(encu_t *eu)
}
}
double
__cdecl
s_square_unencu
(
int
t
,
unencu_t
*
eu
)
double
__cdecl
s_interp_square_encu
(
encu_t
*
eu
)
{
return
s_mixed_square_encu
(
eu
);
}
double
__cdecl
s_mixed_square_unencu
(
int
t
,
unencu_t
*
eu
)
{
switch
(
t
)
{
...
...
@@ -414,17 +836,22 @@ double __cdecl s_square_unencu(int t, unencu_t *eu)
}
}
void
__cdecl
s_check_se2
(
se_t
*
s
)
double
__cdecl
s_interp_square_unencu
(
int
t
,
unencu_t
*
eu
)
{
return
s_mixed_square_unencu
(
t
,
eu
);
}
void
__cdecl
s_mixed_check_se2
(
se_t
*
s
)
{
ok
(
s
->
f
==
E2
,
"check_se2
\n
"
);
}
int
__cdecl
s_sum_parr
(
int
*
a
[
3
]
)
void
__cdecl
s_interp_check_se2
(
se_t
*
s
)
{
return
s_sum_pcarr
(
a
,
3
);
s_mixed_check_se2
(
s
);
}
int
__cdecl
s_sum_pcarr
(
int
*
a
[],
int
n
)
int
__cdecl
s_
mixed_
sum_pcarr
(
int
*
a
[],
int
n
)
{
int
i
,
s
=
0
;
for
(
i
=
0
;
i
<
n
;
++
i
)
...
...
@@ -432,7 +859,22 @@ int __cdecl s_sum_pcarr(int *a[], int n)
return
s
;
}
int
__cdecl
s_enum_ord
(
e_t
e
)
int
__cdecl
s_interp_sum_pcarr
(
int
*
a
[],
int
n
)
{
return
s_mixed_sum_pcarr
(
a
,
n
);
}
int
__cdecl
s_mixed_sum_parr
(
int
*
a
[
3
])
{
return
s_mixed_sum_pcarr
(
a
,
3
);
}
int
__cdecl
s_interp_sum_parr
(
int
*
a
[
3
])
{
return
s_mixed_sum_parr
(
a
);
}
int
__cdecl
s_mixed_enum_ord
(
e_t
e
)
{
switch
(
e
)
{
...
...
@@ -445,7 +887,12 @@ int __cdecl s_enum_ord(e_t e)
}
}
double
__cdecl
s_square_encue
(
encue_t
*
eue
)
int
__cdecl
s_interp_enum_ord
(
e_t
e
)
{
return
s_mixed_enum_ord
(
e
);
}
double
__cdecl
s_mixed_square_encue
(
encue_t
*
eue
)
{
switch
(
eue
->
t
)
{
...
...
@@ -456,7 +903,12 @@ double __cdecl s_square_encue(encue_t *eue)
}
}
int
__cdecl
s_sum_toplev_conf_2n
(
int
*
x
,
int
n
)
double
__cdecl
s_interp_square_encue
(
encue_t
*
eue
)
{
return
s_mixed_square_encue
(
eue
);
}
int
__cdecl
s_mixed_sum_toplev_conf_2n
(
int
*
x
,
int
n
)
{
int
sum
=
0
;
int
i
;
...
...
@@ -465,7 +917,12 @@ int __cdecl s_sum_toplev_conf_2n(int *x, int n)
return
sum
;
}
int
__cdecl
s_sum_toplev_conf_cond
(
int
*
x
,
int
a
,
int
b
,
int
c
)
int
__cdecl
s_interp_sum_toplev_conf_2n
(
int
*
x
,
int
n
)
{
return
s_mixed_sum_toplev_conf_2n
(
x
,
n
);
}
int
__cdecl
s_mixed_sum_toplev_conf_cond
(
int
*
x
,
int
a
,
int
b
,
int
c
)
{
int
sum
=
0
;
int
n
=
c
?
a
:
b
;
...
...
@@ -475,51 +932,96 @@ int __cdecl s_sum_toplev_conf_cond(int *x, int a, int b, int c)
return
sum
;
}
double
__cdecl
s_sum_aligns
(
aligns_t
*
a
)
int
__cdecl
s_interp_sum_toplev_conf_cond
(
int
*
x
,
int
a
,
int
b
,
int
c
)
{
return
s_mixed_sum_toplev_conf_cond
(
x
,
a
,
b
,
c
);
}
double
__cdecl
s_mixed_sum_aligns
(
aligns_t
*
a
)
{
return
a
->
c
+
a
->
i
+
a
->
s
+
a
->
d
;
}
int
__cdecl
s_sum_padded
(
padded_t
*
p
)
double
__cdecl
s_interp_sum_aligns
(
aligns_t
*
a
)
{
return
s_mixed_sum_aligns
(
a
);
}
int
__cdecl
s_mixed_sum_padded
(
padded_t
*
p
)
{
return
p
->
i
+
p
->
c
;
}
int
__cdecl
s_
sum_padded2
(
padded_t
ps
[
2
]
)
int
__cdecl
s_
interp_sum_padded
(
padded_t
*
p
)
{
return
s_
sum_padded
(
&
ps
[
0
])
+
s_sum_padded
(
&
ps
[
1
]
);
return
s_
mixed_sum_padded
(
p
);
}
int
__cdecl
s_sum_padded_conf
(
padded_t
*
ps
,
int
n
)
int
__cdecl
s_mixed_sum_padded2
(
padded_t
ps
[
2
])
{
return
s_mixed_sum_padded
(
&
ps
[
0
])
+
s_mixed_sum_padded
(
&
ps
[
1
]);
}
int
__cdecl
s_interp_sum_padded2
(
padded_t
ps
[
2
])
{
return
s_mixed_sum_padded2
(
ps
);
}
int
__cdecl
s_mixed_sum_padded_conf
(
padded_t
*
ps
,
int
n
)
{
int
sum
=
0
;
int
i
;
for
(
i
=
0
;
i
<
n
;
++
i
)
sum
+=
s_sum_padded
(
&
ps
[
i
]);
sum
+=
s_
mixed_
sum_padded
(
&
ps
[
i
]);
return
sum
;
}
int
__cdecl
s_sum_bogus
(
bogus_t
*
b
)
int
__cdecl
s_interp_sum_padded_conf
(
padded_t
*
ps
,
int
n
)
{
return
s_mixed_sum_padded_conf
(
ps
,
n
);
}
int
__cdecl
s_mixed_sum_bogus
(
bogus_t
*
b
)
{
return
*
b
->
h
.
p1
+
*
b
->
p2
+
*
b
->
p3
+
b
->
c
;
}
void
__cdecl
s_check_null
(
int
*
null
)
int
__cdecl
s_interp_sum_bogus
(
bogus_t
*
b
)
{
return
s_mixed_sum_bogus
(
b
);
}
void
__cdecl
s_mixed_check_null
(
int
*
null
)
{
ok
(
!
null
,
"RPC check_null
\n
"
);
}
int
__cdecl
s_str_struct_len
(
str_struct_t
*
s
)
void
__cdecl
s_interp_check_null
(
int
*
null
)
{
return
s_mixed_check_null
(
null
);
}
int
__cdecl
s_mixed_str_struct_len
(
str_struct_t
*
s
)
{
return
lstrlenA
(
s
->
s
);
}
int
__cdecl
s_wstr_struct_len
(
wstr_struct_t
*
s
)
int
__cdecl
s_interp_str_struct_len
(
str_struct_t
*
s
)
{
return
s_mixed_str_struct_len
(
s
);
}
int
__cdecl
s_mixed_wstr_struct_len
(
wstr_struct_t
*
s
)
{
return
lstrlenW
(
s
->
s
);
}
int
__cdecl
s_sum_doub_carr
(
doub_carr_t
*
dc
)
int
__cdecl
s_interp_wstr_struct_len
(
wstr_struct_t
*
s
)
{
return
s_mixed_wstr_struct_len
(
s
);
}
int
__cdecl
s_mixed_sum_doub_carr
(
doub_carr_t
*
dc
)
{
int
i
,
j
;
int
sum
=
0
;
...
...
@@ -529,7 +1031,12 @@ int __cdecl s_sum_doub_carr(doub_carr_t *dc)
return
sum
;
}
void
__cdecl
s_make_pyramid_doub_carr
(
unsigned
char
n
,
doub_carr_t
**
dc
)
int
__cdecl
s_interp_sum_doub_carr
(
doub_carr_t
*
dc
)
{
return
s_mixed_sum_doub_carr
(
dc
);
}
void
__cdecl
s_mixed_make_pyramid_doub_carr
(
unsigned
char
n
,
doub_carr_t
**
dc
)
{
doub_carr_t
*
t
;
int
i
,
j
;
...
...
@@ -546,7 +1053,12 @@ void __cdecl s_make_pyramid_doub_carr(unsigned char n, doub_carr_t **dc)
*
dc
=
t
;
}
unsigned
__cdecl
s_hash_bstr
(
bstr_t
b
)
void
__cdecl
s_interp_make_pyramid_doub_carr
(
unsigned
char
n
,
doub_carr_t
**
dc
)
{
return
s_mixed_make_pyramid_doub_carr
(
n
,
dc
);
}
unsigned
__cdecl
s_mixed_hash_bstr
(
bstr_t
b
)
{
short
n
=
b
[
-
1
];
short
*
s
=
b
;
...
...
@@ -557,7 +1069,12 @@ unsigned __cdecl s_hash_bstr(bstr_t b)
return
hash
;
}
void
__cdecl
s_get_a_bstr
(
bstr_t
*
b
)
unsigned
__cdecl
s_interp_hash_bstr
(
bstr_t
b
)
{
return
s_mixed_hash_bstr
(
b
);
}
void
__cdecl
s_mixed_get_a_bstr
(
bstr_t
*
b
)
{
bstr_t
bstr
;
short
str
[]
=
{
5
,
'W'
,
'i'
,
'n'
,
'e'
,
0
};
...
...
@@ -566,7 +1083,12 @@ void __cdecl s_get_a_bstr(bstr_t *b)
*
b
=
bstr
+
1
;
}
void
__cdecl
s_get_name
(
name_t
*
name
)
void
__cdecl
s_interp_get_a_bstr
(
bstr_t
*
b
)
{
return
s_mixed_get_a_bstr
(
b
);
}
void
__cdecl
s_mixed_get_name
(
name_t
*
name
)
{
const
char
bossman
[]
=
"Jeremy White"
;
memcpy
(
name
->
name
,
bossman
,
min
(
name
->
size
,
sizeof
(
bossman
)));
...
...
@@ -575,7 +1097,12 @@ void __cdecl s_get_name(name_t *name)
name
->
name
[
name
->
size
-
1
]
=
0
;
}
void
__cdecl
s_get_names
(
int
*
n
,
str_array_t
*
names
)
void
__cdecl
s_interp_get_name
(
name_t
*
name
)
{
s_mixed_get_name
(
name
);
}
void
__cdecl
s_mixed_get_names
(
int
*
n
,
str_array_t
*
names
)
{
str_array_t
list
;
...
...
@@ -589,7 +1116,12 @@ void __cdecl s_get_names(int *n, str_array_t *names)
*
n
=
2
;
}
void
__cdecl
s_get_namesw
(
int
*
n
,
wstr_array_t
*
names
)
void
__cdecl
s_interp_get_names
(
int
*
n
,
str_array_t
*
names
)
{
s_mixed_get_names
(
n
,
names
);
}
void
__cdecl
s_mixed_get_namesw
(
int
*
n
,
wstr_array_t
*
names
)
{
wstr_array_t
list
;
...
...
@@ -603,12 +1135,22 @@ void __cdecl s_get_namesw(int *n, wstr_array_t *names)
*
n
=
2
;
}
int
__cdecl
s_sum_pcarr2
(
int
n
,
int
**
pa
)
void
__cdecl
s_interp_get_namesw
(
int
*
n
,
wstr_array_t
*
names
)
{
s_mixed_get_namesw
(
n
,
names
);
}
int
__cdecl
s_mixed_sum_pcarr2
(
int
n
,
int
**
pa
)
{
return
s_mixed_sum_conf_array
(
*
pa
,
n
);
}
int
__cdecl
s_interp_sum_pcarr2
(
int
n
,
int
**
pa
)
{
return
s_
sum_conf_array
(
*
pa
,
n
);
return
s_
mixed_sum_pcarr2
(
n
,
pa
);
}
int
__cdecl
s_sum_L1_norms
(
int
n
,
vector_t
*
vs
)
int
__cdecl
s_
mixed_
sum_L1_norms
(
int
n
,
vector_t
*
vs
)
{
int
i
;
int
sum
=
0
;
...
...
@@ -617,7 +1159,12 @@ int __cdecl s_sum_L1_norms(int n, vector_t *vs)
return
sum
;
}
s123_t
*
__cdecl
s_get_s123
(
void
)
int
__cdecl
s_interp_sum_L1_norms
(
int
n
,
vector_t
*
vs
)
{
return
s_mixed_sum_L1_norms
(
n
,
vs
);
}
s123_t
*
__cdecl
s_mixed_get_s123
(
void
)
{
s123_t
*
s
=
MIDL_user_allocate
(
sizeof
*
s
);
s
->
f1
=
1
;
...
...
@@ -626,27 +1173,52 @@ s123_t * __cdecl s_get_s123(void)
return
s
;
}
str_t
__cdecl
s_get_filename
(
void
)
s123_t
*
__cdecl
s_interp_get_s123
(
void
)
{
return
s_mixed_get_s123
();
}
str_t
__cdecl
s_mixed_get_filename
(
void
)
{
return
(
char
*
)
__FILE__
;
}
int
__cdecl
s_echo_ranged_int
(
int
i
,
int
j
,
int
k
)
str_t
__cdecl
s_interp_get_filename
(
void
)
{
return
s_mixed_get_filename
();
}
int
__cdecl
s_mixed_echo_ranged_int
(
int
i
,
int
j
,
int
k
)
{
return
min
(
100
,
i
+
j
+
k
);
}
int
__cdecl
s_echo_ranged_int2
(
int
i
)
int
__cdecl
s_interp_echo_ranged_int
(
int
i
,
int
j
,
int
k
)
{
return
s_mixed_echo_ranged_int
(
i
,
j
,
k
);
}
int
__cdecl
s_mixed_echo_ranged_int2
(
int
i
)
{
return
i
;
}
void
__cdecl
s_get_ranged_enum
(
renum_t
*
re
)
int
__cdecl
s_interp_echo_ranged_int2
(
int
i
)
{
return
s_mixed_echo_ranged_int2
(
i
);
}
void
__cdecl
s_mixed_get_ranged_enum
(
renum_t
*
re
)
{
*
re
=
RE3
;
}
void
__cdecl
s_context_handle_test
(
void
)
void
__cdecl
s_interp_get_ranged_enum
(
renum_t
*
re
)
{
s_mixed_get_ranged_enum
(
re
);
}
void
__cdecl
s_mixed_context_handle_test
(
void
)
{
NDR_SCONTEXT
h
;
RPC_BINDING_HANDLE
binding
;
...
...
@@ -786,7 +1358,12 @@ void __cdecl s_context_handle_test(void)
}
}
void
__cdecl
s_get_numbers
(
int
length
,
int
size
,
pints_t
n
[])
void
__cdecl
s_interp_context_handle_test
(
void
)
{
s_mixed_context_handle_test
();
}
void
__cdecl
s_mixed_get_numbers
(
int
length
,
int
size
,
pints_t
n
[])
{
int
i
;
for
(
i
=
0
;
i
<
length
;
i
++
)
...
...
@@ -798,7 +1375,12 @@ void __cdecl s_get_numbers(int length, int size, pints_t n[])
}
}
void
__cdecl
s_get_numbers_struct
(
numbers_struct_t
**
ns
)
void
__cdecl
s_interp_get_numbers
(
int
length
,
int
size
,
pints_t
n
[])
{
s_mixed_get_numbers
(
length
,
size
,
n
);
}
void
__cdecl
s_mixed_get_numbers_struct
(
numbers_struct_t
**
ns
)
{
int
i
;
*
ns
=
midl_user_allocate
(
FIELD_OFFSET
(
numbers_struct_t
,
numbers
[
5
]));
...
...
@@ -815,20 +1397,35 @@ void __cdecl s_get_numbers_struct(numbers_struct_t **ns)
*
(
*
ns
)
->
numbers
[
0
].
pi
=
5
;
}
void
__cdecl
s_full_pointer_test
(
int
*
a
,
int
*
b
)
void
__cdecl
s_interp_get_numbers_struct
(
numbers_struct_t
**
ns
)
{
s_mixed_get_numbers_struct
(
ns
);
}
void
__cdecl
s_mixed_full_pointer_test
(
int
*
a
,
int
*
b
)
{
ok
(
*
a
==
42
,
"Expected *a to be 42 instead of %d
\n
"
,
*
a
);
ok
(
*
b
==
42
,
"Expected *b to be 42 instead of %d
\n
"
,
*
a
);
ok
(
a
==
b
,
"Expected a (%p) to point to the same memory as b (%p)
\n
"
,
a
,
b
);
}
void
__cdecl
s_full_pointer_null_test
(
int
*
a
,
int
*
b
)
void
__cdecl
s_interp_full_pointer_test
(
int
*
a
,
int
*
b
)
{
return
s_mixed_full_pointer_test
(
a
,
b
);
}
void
__cdecl
s_mixed_full_pointer_null_test
(
int
*
a
,
int
*
b
)
{
ok
(
*
a
==
42
,
"Expected *a to be 42 instead of %d
\n
"
,
*
a
);
ok
(
b
==
NULL
,
"Expected b to be NULL instead of %p
\n
"
,
b
);
}
void
__cdecl
s_stop
(
void
)
void
__cdecl
s_interp_full_pointer_null_test
(
int
*
a
,
int
*
b
)
{
s_mixed_full_pointer_null_test
(
a
,
b
);
}
void
__cdecl
s_mixed_stop
(
void
)
{
if
(
!
stop_wait_event
)
{
...
...
@@ -844,7 +1441,12 @@ void __cdecl s_stop(void)
}
}
void
__cdecl
s_stop_autolisten
(
void
)
void
__cdecl
s_interp_stop
(
void
)
{
s_mixed_stop
();
}
void
__cdecl
s_mixed_stop_autolisten
(
void
)
{
RPC_STATUS
status
;
status
=
RpcServerUnregisterIf
(
NULL
,
NULL
,
FALSE
);
...
...
@@ -852,7 +1454,12 @@ todo_wine
ok
(
status
==
RPC_S_UNKNOWN_MGR_TYPE
,
"got %u
\n
"
,
status
);
}
void
__cdecl
s_ip_test
(
ipu_t
*
a
)
void
__cdecl
s_interp_stop_autolisten
(
void
)
{
s_mixed_stop_autolisten
();
}
void
__cdecl
s_mixed_ip_test
(
ipu_t
*
a
)
{
STATSTG
st
;
HRESULT
hr
;
...
...
@@ -861,16 +1468,31 @@ void __cdecl s_ip_test(ipu_t *a)
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
}
int
__cdecl
s_sum_ptr_array
(
int
*
a
[
2
])
void
__cdecl
s_interp_ip_test
(
ipu_t
*
a
)
{
s_mixed_ip_test
(
a
);
}
int
__cdecl
s_mixed_sum_ptr_array
(
int
*
a
[
2
])
{
return
*
a
[
0
]
+
*
a
[
1
];
}
int
__cdecl
s_sum_array_ptr
(
int
(
*
a
)[
2
])
int
__cdecl
s_interp_sum_ptr_array
(
int
*
a
[
2
])
{
return
s_mixed_sum_ptr_array
(
a
);
}
int
__cdecl
s_mixed_sum_array_ptr
(
int
(
*
a
)[
2
])
{
return
(
*
a
)[
0
]
+
(
*
a
)[
1
];
}
int
__cdecl
s_interp_sum_array_ptr
(
int
(
*
a
)[
2
])
{
return
s_mixed_sum_array_ptr
(
a
);
}
static
void
make_cmdline
(
char
buffer
[
MAX_PATH
],
const
char
*
test
)
{
...
...
@@ -1043,9 +1665,11 @@ basic_tests(void)
check_null
(
NULL
);
if
(
!
is_interp
||
sizeof
(
void
*
)
!=
8
)
{
/* broken in widl for win64 */
str
=
get_filename
();
ok
(
!
strcmp
(
str
,
__FILE__
),
"get_filename() returned %s instead of %s
\n
"
,
str
,
__FILE__
);
midl_user_free
(
str
);
}
x
=
echo_ranged_int
(
0
,
0
,
0
);
ok
(
x
==
0
,
"echo_ranged_int() returned %d instead of 0
\n
"
,
x
);
...
...
@@ -1300,10 +1924,10 @@ pointer_tests(void)
pa
[
3
]
=
&
a
[
3
];
ok
(
sum_pcarr
(
pa
,
4
)
==
10
,
"RPC sum_pcarr
\n
"
);
ok
(
hash_bstr
(
bstr
)
==
s_hash_bstr
(
bstr
),
"RPC hash_bstr_data
\n
"
);
ok
(
hash_bstr
(
bstr
)
==
s_
mixed_
hash_bstr
(
bstr
),
"RPC hash_bstr_data
\n
"
);
get_a_bstr
(
&
bstr
);
s_get_a_bstr
(
&
bstr2
);
s_
mixed_
get_a_bstr
(
&
bstr2
);
ok
(
!
lstrcmpW
((
LPCWSTR
)
bstr
,
(
LPCWSTR
)
bstr2
),
"bstr mismatch
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
bstr
-
1
);
HeapFree
(
GetProcessHeap
(),
0
,
bstr2
-
1
);
...
...
@@ -1323,6 +1947,7 @@ pointer_tests(void)
ok
(
!
strcmp
(
name
.
name
,
"Jeremy Wh"
),
"name didn't unmarshall properly, expected
\"
Jeremy Wh
\"
, but got
\"
%s
\"\n
"
,
name
.
name
);
HeapFree
(
GetProcessHeap
(),
0
,
name
.
name
);
if
(
!
is_interp
)
{
/* broken in widl */
n
=
-
1
;
names
=
NULL
;
get_names
(
&
n
,
&
names
);
...
...
@@ -1342,10 +1967,13 @@ pointer_tests(void)
MIDL_user_free
(
namesw
[
0
]);
MIDL_user_free
(
namesw
[
1
]);
MIDL_user_free
(
namesw
);
}
}
if
(
!
is_interp
)
{
/* broken in widl */
pa2
=
a
;
ok
(
sum_pcarr2
(
4
,
&
pa2
)
==
10
,
"RPC sum_pcarr2
\n
"
);
}
s123
=
get_s123
();
ok
(
s123
->
f1
==
1
&&
s123
->
f2
==
2
&&
s123
->
f3
==
3
,
"RPC get_s123
\n
"
);
...
...
@@ -1534,7 +2162,7 @@ array_tests(void)
ok
(
sum_array_ptr
(
&
array
)
==
7
,
"RPC sum_array_ptr
\n
"
);
}
void
__cdecl
s_authinfo_test
(
unsigned
int
protseq
,
int
secure
)
void
__cdecl
s_
mixed_
authinfo_test
(
unsigned
int
protseq
,
int
secure
)
{
RPC_BINDING_HANDLE
binding
;
RPC_STATUS
status
;
...
...
@@ -1606,6 +2234,11 @@ void __cdecl s_authinfo_test(unsigned int protseq, int secure)
}
}
void
__cdecl
s_interp_authinfo_test
(
unsigned
int
protseq
,
int
secure
)
{
s_mixed_authinfo_test
(
protseq
,
secure
);
}
static
void
run_tests
(
void
)
{
...
...
@@ -1669,81 +2302,96 @@ client(const char *test)
if
(
strcmp
(
test
,
"tcp_basic"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
iptcp
,
address
,
port
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
run_tests
();
authinfo_test
(
RPC_PROTSEQ_TCP
,
0
);
test_is_server_listening2
(
IServer_IfHandle
,
RPC_S_OK
,
RPC_S_ACCESS_DENIED
);
test_is_server_listening2
(
mixed_
IServer_IfHandle
,
RPC_S_OK
,
RPC_S_ACCESS_DENIED
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
mixed_
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"tcp_secure"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
iptcp
,
address
,
port
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
set_auth_info
(
IServer_IfHandle
);
set_auth_info
(
mixed_
IServer_IfHandle
);
authinfo_test
(
RPC_PROTSEQ_TCP
,
1
);
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_ACCESS_DENIED
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_ACCESS_DENIED
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
mixed_
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"ncalrpc_basic"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
ncalrpc
,
NULL
,
guid
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
run_tests
();
/* can cause RPC_X_BAD_STUB_DATA exception */
authinfo_test
(
RPC_PROTSEQ_LRPC
,
0
);
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_OK
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_OK
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
mixed_
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"ncalrpc_autolisten"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
ncalrpc
,
NULL
,
guid
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
run_tests
();
authinfo_test
(
RPC_PROTSEQ_LRPC
,
0
);
todo_wine
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_NOT_LISTENING
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_NOT_LISTENING
);
stop_autolisten
();
ok
(
int_return
()
==
INT_CODE
,
"RPC int_return
\n
"
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
mixed_
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"ncalrpc_secure"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
ncalrpc
,
NULL
,
guid
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
set_auth_info
(
IServer_IfHandle
);
set_auth_info
(
mixed_
IServer_IfHandle
);
authinfo_test
(
RPC_PROTSEQ_LRPC
,
1
);
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_OK
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_OK
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
mixed_
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"np_basic"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
np
,
address_np
,
pipe
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_OK
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_OK
);
run_tests
();
authinfo_test
(
RPC_PROTSEQ_NMP
,
0
);
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_OK
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_OK
);
stop
();
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_NOT_LISTENING
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_NOT_LISTENING
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
mixed_IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"np_basic_interp"
)
==
0
)
{
set_interp_interface
();
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
np
,
address_np
,
pipe
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
interp_IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
test_is_server_listening
(
interp_IServer_IfHandle
,
RPC_S_OK
);
run_tests
();
authinfo_test
(
RPC_PROTSEQ_NMP
,
0
);
test_is_server_listening
(
interp_IServer_IfHandle
,
RPC_S_OK
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
interp_IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
}
...
...
@@ -1777,13 +2425,22 @@ server(void)
if
(
pRpcServerRegisterIfEx
)
{
trace
(
"Using RpcServerRegisterIfEx
\n
"
);
status
=
pRpcServerRegisterIfEx
(
s_IServer_v0_0_s_ifspec
,
NULL
,
NULL
,
status
=
pRpcServerRegisterIfEx
(
s_
mixed_
IServer_v0_0_s_ifspec
,
NULL
,
NULL
,
RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH
,
RPC_C_LISTEN_MAX_CALLS_DEFAULT
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIfEx failed with status %d
\n
"
,
status
);
status
=
pRpcServerRegisterIfEx
(
s_interp_IServer_v0_0_s_ifspec
,
NULL
,
NULL
,
RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH
,
RPC_C_LISTEN_MAX_CALLS_DEFAULT
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIfEx failed with status %d
\n
"
,
status
);
}
else
status
=
RpcServerRegisterIf
(
s_IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed with status %d
\n
"
,
status
);
{
status
=
RpcServerRegisterIf
(
s_mixed_IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed with status %d
\n
"
,
status
);
status
=
RpcServerRegisterIf
(
s_interp_IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed with status %d
\n
"
,
status
);
}
test_is_server_listening
(
NULL
,
RPC_S_NOT_LISTENING
);
status
=
RpcServerListen
(
1
,
20
,
TRUE
);
ok
(
status
==
RPC_S_OK
,
"RpcServerListen failed with status %d
\n
"
,
status
);
...
...
@@ -1807,7 +2464,10 @@ server(void)
skip
(
"lrpc tests skipped due to earlier failure
\n
"
);
if
(
np_status
==
RPC_S_OK
)
{
run_client
(
"np_basic_interp"
);
run_client
(
"np_basic"
);
}
else
{
skip
(
"np_basic tests skipped due to earlier failure
\n
"
);
...
...
@@ -1817,6 +2477,7 @@ server(void)
ret
=
WaitForSingleObject
(
stop_event
,
1000
);
ok
(
WAIT_OBJECT_0
==
ret
,
"WaitForSingleObject
\n
"
);
/* if the stop event didn't fire then RpcMgmtWaitServerListen will wait
* forever, so don't bother calling it in this case */
if
(
ret
==
WAIT_OBJECT_0
)
...
...
@@ -1830,14 +2491,14 @@ server(void)
if
(
pRpcServerRegisterIfEx
)
{
status
=
pRpcServerRegisterIfEx
(
s_IServer_v0_0_s_ifspec
,
NULL
,
NULL
,
status
=
pRpcServerRegisterIfEx
(
s_
mixed_
IServer_v0_0_s_ifspec
,
NULL
,
NULL
,
RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH
|
RPC_IF_AUTOLISTEN
,
RPC_C_LISTEN_MAX_CALLS_DEFAULT
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf() failed: %u
\n
"
,
status
);
run_client
(
"ncalrpc_autolisten"
);
status
=
RpcServerUnregisterIf
(
s_IServer_v0_0_s_ifspec
,
NULL
,
TRUE
);
status
=
RpcServerUnregisterIf
(
s_
mixed_
IServer_v0_0_s_ifspec
,
NULL
,
TRUE
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUnregisterIf() failed: %u
\n
"
,
status
);
}
...
...
@@ -1848,14 +2509,14 @@ static DWORD WINAPI listen_test_client_thread(void *binding)
{
RPC_STATUS
status
;
status
=
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
);
status
=
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding
\n
"
);
test_is_server_listening
(
IServer_IfHandle
,
RPC_S_OK
);
test_is_server_listening
(
mixed_
IServer_IfHandle
,
RPC_S_OK
);
stop
();
trace
(
"stopped
\n
"
);
status
=
RpcBindingFree
(
&
IServer_IfHandle
);
status
=
RpcBindingFree
(
&
mixed_
IServer_IfHandle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFree
\n
"
);
return
0
;
}
...
...
@@ -1930,7 +2591,7 @@ static void test_server_listening(void)
status
=
RpcServerUseProtseqEpA
(
np
,
0
,
pipe
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncacn_np) failed with status %d
\n
"
,
status
);
status
=
RpcServerRegisterIf
(
s_IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
status
=
RpcServerRegisterIf
(
s_
mixed_
IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed with status %d
\n
"
,
status
);
test_is_server_listening
(
NULL
,
RPC_S_NOT_LISTENING
);
...
...
@@ -2009,7 +2670,7 @@ static void run_server(HANDLE ready_event)
status
=
RpcServerUseProtseqEpA
(
np
,
0
,
pipe
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncacn_np) failed with status %d
\n
"
,
status
);
status
=
RpcServerRegisterIf
(
s_IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
status
=
RpcServerRegisterIf
(
s_
mixed_
IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed with status %d
\n
"
,
status
);
test_is_server_listening
(
NULL
,
RPC_S_NOT_LISTENING
);
...
...
@@ -2052,7 +2713,7 @@ static void test_reconnect(void)
server_process
=
create_server_process
();
ok
(
RPC_S_OK
==
RpcStringBindingComposeA
(
NULL
,
np
,
address_np
,
pipe
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBindingA
(
binding
,
&
mixed_
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
threads
);
i
++
)
{
...
...
@@ -2082,7 +2743,7 @@ static void test_reconnect(void)
ok
(
CloseHandle
(
server_process
),
"CloseHandle
\n
"
);
ok
(
RPC_S_OK
==
RpcStringFreeA
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
mixed_
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
static
BOOL
is_process_elevated
(
void
)
...
...
@@ -2214,6 +2875,7 @@ START_TEST(server)
BOOL
firewall_enabled
=
is_firewall_enabled
(),
firewall_disabled
=
FALSE
;
InitFunctionPointers
();
set_mixed_interface
();
ok
(
!
GetUserNameExA
(
NameSamCompatible
,
NULL
,
&
size
),
"GetUserNameExA
\n
"
);
domain_and_user
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
...
...
dlls/rpcrt4/tests/server.idl
View file @
d73a6bae
...
...
@@ -25,25 +25,36 @@ import "objidl.idl";
#
include
"server_defines.h"
#
ifndef
NAME
#
define
NAME
(
x
)
mixed_
##
x
#
endif
#
ifndef
ISERVER_UUID
#
define
ISERVER_UUID
00000000
-
4114
-
0704
-
2301
-
000000000000
#
endif
cpp_quote
(
"#ifndef SKIP_STRUCT_DECLS"
)
typedef
struct
tag_vector
{
int
x
;
int
y
;
int
z
;
}
vector_t
;
cpp_quote
(
"#endif"
)
typedef
int
fnprintf
(
const
char
*
format
,
...
)
;
[
uuid
(
00000000
-
4114
-
0704
-
2301
-
000000000000
),
implicit_handle
(
handle_t
IServer_IfHandle
)
uuid
(
ISERVER_UUID
),
implicit_handle
(
handle_t
NAME
(
IServer_IfHandle
)
)
]
interface
IServer
interface
NAME
(
IServer
)
{
cpp_quote
(
"#if 0"
)
typedef
wchar_t
WCHAR
;
cpp_quote
(
"#endif"
)
cpp_quote
(
"#ifndef SKIP_STRUCT_DECLS"
)
typedef
[
string
]
char
*
str_t
;
typedef
[
string
]
WCHAR
*
wstr_t
;
...
...
@@ -80,31 +91,33 @@ cpp_quote("#endif")
int
s
;
}
sun_t
;
cpp_quote
(
"#endif"
)
int
int_return
(
void
)
;
int
square
(
int
x
)
;
int
sum
(
int
x
,
int
y
)
;
signed
char
sum_char
(
signed
char
x
,
signed
char
y
)
;
short
sum_short
(
short
x
,
short
y
)
;
int
sum_float
(
float
x
,
float
y
)
;
int
sum_double_int
(
int
x
,
double
y
)
;
hyper
sum_hyper
(
hyper
x
,
hyper
y
)
;
int
sum_hyper_int
(
hyper
x
,
hyper
y
)
;
int
sum_char_hyper
(
signed
char
x
,
hyper
y
)
;
void
square_out
(
int
x
,
[
out
]
int
*
y
)
;
void
square_ref
(
[
in
,
out
]
int
*
x
)
;
int
str_length
(
[
string
]
const
char
*
s
)
;
int
str_t_length
(
str_t
s
)
;
int
cstr_length
(
[
string
,
size_is
(
n
)
]
const
char
*
s
,
int
n
)
;
int
dot_self
(
vector_t
*
v
)
;
double
square_half
(
double
x
,
[
out
]
double
*
y
)
;
float
square_half_float
(
float
x
,
[
out
]
float
*
y
)
;
long
square_half_long
(
long
x
,
[
out
]
long
*
y
)
;
int
sum_fixed_array
(
int
a
[
5
]
)
;
int
pints_sum
(
pints_t
*
pints
)
;
double
ptypes_sum
(
ptypes_t
*
ptypes
)
;
int
dot_pvectors
(
pvectors_t
*
pvectors
)
;
int
NAME
(
int_return
)(
void
)
;
int
NAME
(
square
)(
int
x
)
;
int
NAME
(
sum
)(
int
x
,
int
y
)
;
signed
char
NAME
(
sum_char
)(
signed
char
x
,
signed
char
y
)
;
short
NAME
(
sum_short
)(
short
x
,
short
y
)
;
int
NAME
(
sum_float
)(
float
x
,
float
y
)
;
int
NAME
(
sum_double_int
)(
int
x
,
double
y
)
;
hyper
NAME
(
sum_hyper
)(
hyper
x
,
hyper
y
)
;
int
NAME
(
sum_hyper_int
)(
hyper
x
,
hyper
y
)
;
int
NAME
(
sum_char_hyper
)(
signed
char
x
,
hyper
y
)
;
void
NAME
(
square_out
)(
int
x
,
[
out
]
int
*
y
)
;
void
NAME
(
square_ref
)(
[
in
,
out
]
int
*
x
)
;
int
NAME
(
str_length
)(
[
string
]
const
char
*
s
)
;
int
NAME
(
str_t_length
)(
str_t
s
)
;
int
NAME
(
cstr_length
)(
[
string
,
size_is
(
n
)
]
const
char
*
s
,
int
n
)
;
int
NAME
(
dot_self
)(
vector_t
*
v
)
;
double
NAME
(
square_half
)(
double
x
,
[
out
]
double
*
y
)
;
float
NAME
(
square_half_float
)(
float
x
,
[
out
]
float
*
y
)
;
long
NAME
(
square_half_long
)(
long
x
,
[
out
]
long
*
y
)
;
int
NAME
(
sum_fixed_array
)(
int
a
[
5
]
)
;
int
NAME
(
pints_sum
)(
pints_t
*
pints
)
;
double
NAME
(
ptypes_sum
)(
ptypes_t
*
ptypes
)
;
int
NAME
(
dot_pvectors
)(
pvectors_t
*
pvectors
)
;
cpp_quote
(
"#ifndef SKIP_STRUCT_DECLS"
)
/*
don
't use this anywhere except in sp_t */
typedef struct
{
...
...
@@ -116,10 +129,12 @@ cpp_quote("#endif")
int x;
sp_inner_t *s;
} sp_t;
cpp_quote("#endif")
int
sum_sp
(sp_t *sp);
double
square_sun
(sun_t *su);
int
NAME(sum_sp)
(sp_t *sp);
double
NAME(square_sun)
(sun_t *su);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct test_list
{
int t;
...
...
@@ -131,17 +146,19 @@ cpp_quote("#endif")
} test_list_t;
typedef [ref] int *refpint_t;
cpp_quote("#endif")
int test_list_length(test_list_t *ls);
int sum_fixed_int_3d(int m[2][3][4]);
int sum_conf_array([size_is(n)] int x[], int n);
int sum_conf_ptr_by_conf_ptr(int n1, [size_is(n1)] int *n2_then_x1, [size_is(*n2_then_x1)] int *x2);
int sum_unique_conf_array([size_is(n), unique] int x[], int n);
int sum_unique_conf_ptr([size_is(n), unique] int *x, int n);
int sum_var_array([length_is(n)] int x[20], int n);
int dot_two_vectors(vector_t vs[2]);
void get_number_array([out, length_is(*n)] int x[20], [out] int *n);
int NAME(test_list_length)(test_list_t *ls);
int NAME(sum_fixed_int_3d)(int m[2][3][4]);
int NAME(sum_conf_array)([size_is(n)] int x[], int n);
int NAME(sum_conf_ptr_by_conf_ptr)(int n1, [size_is(n1)] int *n2_then_x1, [size_is(*n2_then_x1)] int *x2);
int NAME(sum_unique_conf_array)([size_is(n), unique] int x[], int n);
int NAME(sum_unique_conf_ptr)([size_is(n), unique] int *x, int n);
int NAME(sum_var_array)([length_is(n)] int x[20], int n);
int NAME(dot_two_vectors)(vector_t vs[2]);
void NAME(get_number_array)([out, length_is(*n)] int x[20], [out] int *n);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
int n;
...
...
@@ -163,16 +180,18 @@ cpp_quote("#endif")
int b;
int c;
} cpsc_t;
cpp_quote("#endif")
int
sum_cs
(cs_t *cs);
int
sum_cps
(cps_t *cps);
int
sum_cpsc
(cpsc_t *cpsc);
int
get_cpsc
(int n, [out] cpsc_t *cpsc );
int
sum_complex_array
(int n, [size_is(n)] refpint_t pi[]);
int
NAME(sum_cs)
(cs_t *cs);
int
NAME(sum_cps)
(cps_t *cps);
int
NAME(sum_cpsc)
(cpsc_t *cpsc);
int
NAME(get_cpsc)
(int n, [out] cpsc_t *cpsc );
int
NAME(sum_complex_array)
(int n, [size_is(n)] refpint_t pi[]);
typedef [wire_marshal(int)] void *puint_t;
int
square_puint
(puint_t p);
int
NAME(square_puint)
(puint_t p);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
[size_is(n)] puint_t *ps;
...
...
@@ -185,11 +204,13 @@ cpp_quote("#endif")
[size_is(n)] puint_t *ps;
char n;
} cpuints_t;
cpp_quote("#endif")
int
sum_puints
(puints_t *p);
int
sum_cpuints
(cpuints_t *p);
int
dot_copy_vectors
(vector_t u, vector_t v);
int
NAME(sum_puints)
(puints_t *p);
int
NAME(sum_cpuints)
(cpuints_t *p);
int
NAME(dot_copy_vectors)
(vector_t u, vector_t v);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct wire_us *wire_us_t;
typedef [wire_marshal(wire_us_t)] struct us us_t;
struct us
...
...
@@ -204,9 +225,11 @@ cpp_quote("#endif")
{
us_t us;
} test_us_t;
cpp_quote("#endif")
int
square_test_us
(test_us_t *tus);
int
NAME(square_test_us)
(test_us_t *tus);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef union encu switch (int t)
{
case ENCU_I: int i;
...
...
@@ -237,18 +260,20 @@ cpp_quote("#endif")
{
e_t f;
} se_t;
cpp_quote("#endif")
double
square_encu
(encu_t *eu);
double
square_unencu
(int t, [switch_is(t)] unencu_t *eu);
int
sum_parr
(int *a[3]);
int
sum_pcarr
([size_is(n)] int *a[], int n);
int
enum_ord
(e_t e);
double
square_encue
(encue_t *eue);
void
check_se2
(se_t *s);
double
NAME(square_encu)
(encu_t *eu);
double
NAME(square_unencu)
(int t, [switch_is(t)] unencu_t *eu);
int
NAME(sum_parr)
(int *a[3]);
int
NAME(sum_pcarr)
([size_is(n)] int *a[], int n);
int
NAME(enum_ord)
(e_t e);
double
NAME(square_encue)
(encue_t *eue);
void
NAME(check_se2)
(se_t *s);
int
sum_toplev_conf_2n
([size_is(n * 2)] int *x, int n);
int
sum_toplev_conf_cond
([size_is(c ? a : b)] int *x, int a, int b, int c);
int
NAME(sum_toplev_conf_2n)
([size_is(n * 2)] int *x, int n);
int
NAME(sum_toplev_conf_cond)
([size_is(c ? a : b)] int *x, int a, int b, int c);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
char c;
...
...
@@ -256,19 +281,23 @@ cpp_quote("#endif")
short s;
double d;
} aligns_t;
cpp_quote("#endif")
double
sum_aligns
(aligns_t *a);
double
NAME(sum_aligns)
(aligns_t *a);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
int i;
char c;
} padded_t;
cpp_quote("#endif")
int
sum_padded
(padded_t *p);
int
sum_padded2
(padded_t ps[2]);
int
sum_padded_conf
([size_is(n)] padded_t *ps, int n);
int
NAME(sum_padded)
(padded_t *p);
int
NAME(sum_padded2)
(padded_t ps[2]);
int
NAME(sum_padded_conf)
([size_is(n)] padded_t *ps, int n);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
int *p1;
...
...
@@ -281,10 +310,12 @@ cpp_quote("#endif")
int *p3;
char c;
} bogus_t;
cpp_quote("#endif")
int
sum_bogus
(bogus_t *b);
void
check_null
([unique] int *null);
int
NAME(sum_bogus)
(bogus_t *b);
void
NAME(check_null)
([unique] int *null);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
str_t s;
...
...
@@ -294,10 +325,12 @@ cpp_quote("#endif")
{
wstr_t s;
} wstr_struct_t;
cpp_quote("#endif")
int
str_struct_len
(str_struct_t *s);
int
wstr_struct_len
(wstr_struct_t *s);
int
NAME(str_struct_len)
(str_struct_t *s);
int
NAME(wstr_struct_len)
(wstr_struct_t *s);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
unsigned int n;
...
...
@@ -309,35 +342,41 @@ cpp_quote("#endif")
int n;
[size_is(n)] doub_carr_1_t *a[];
} doub_carr_t;
cpp_quote("#endif")
int
sum_doub_carr
(doub_carr_t *dc);
void
make_pyramid_doub_carr
(unsigned char n, [out] doub_carr_t **dc);
int
NAME(sum_doub_carr)
(doub_carr_t *dc);
void
NAME(make_pyramid_doub_carr)
(unsigned char n, [out] doub_carr_t **dc);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
short n;
[size_is(n)] short data[];
} user_bstr_t;
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);
unsigned NAME(hash_bstr)(bstr_t s);
void NAME(get_a_bstr)([out]bstr_t *s);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
typedef struct
{
[string, size_is(size)] char *name;
unsigned int size;
} name_t;
void get_name([in,out] name_t *name);
cpp_quote("#endif")
void NAME(get_name)([in,out] name_t *name);
typedef char **str_array_t;
void
get_names
([out] int *n, [out, string, size_is(,*n)] str_array_t *names);
void
NAME(get_names)
([out] int *n, [out, string, size_is(,*n)] str_array_t *names);
typedef WCHAR **wstr_array_t;
void
get_namesw
([out] int *n, [out, string, size_is(,*n)] wstr_array_t *names);
void
NAME(get_namesw)
([out] int *n, [out, string, size_is(,*n)] wstr_array_t *names);
int
sum_pcarr2
(int n, [size_is(, n)] int **pa);
int
sum_L1_norms
(int n, [size_is(n)] vector_t *vs);
int
NAME(sum_pcarr2)
(int n, [size_is(, n)] int **pa);
int
NAME(sum_L1_norms)
(int n, [size_is(n)] vector_t *vs);
cpp_quote("#ifndef SKIP_STRUCT_DECLS")
/* Don'
t
use
this
except
in
the
get_s123
test
.
*/
typedef
struct
{
...
...
@@ -345,23 +384,27 @@ cpp_quote("#endif")
int
f2
;
int
f3
;
}
s123_t
;
cpp_quote
(
"#endif"
)
/*
Make
sure
WIDL
generates
a
type
format
string
for
a
previously
unseen
type
as
a
return
value
.
*/
s123_t
*
get_s123
(
void
)
;
s123_t
*
NAME
(
get_s123
)
(
void
)
;
cpp_quote
(
"#ifndef SKIP_STRUCT_DECLS"
)
typedef
struct
{
unsigned
int
length
;
unsigned
int
size
;
[
size_is
(
size
),
length_is
(
length
)
]
pints_t
numbers
[]
;
}
numbers_struct_t
;
cpp_quote
(
"#endif"
)
void
get_numbers
(
[
in
]
int
length
,
[
in
]
int
size
,
[
out
,
length_is
(
length
),
size_is
(
size
)
]
pints_t
pn
[]
)
;
void
get_numbers_struct
(
[
out
]
numbers_struct_t
**
ns
)
;
void
NAME
(
get_numbers
)
(
[
in
]
int
length
,
[
in
]
int
size
,
[
out
,
length_is
(
length
),
size_is
(
size
)
]
pints_t
pn
[]
)
;
void
NAME
(
get_numbers_struct
)
(
[
out
]
numbers_struct_t
**
ns
)
;
str_t
get_filename
(
void
)
;
str_t
NAME
(
get_filename
)
(
void
)
;
cpp_quote
(
"#ifndef SKIP_STRUCT_DECLS"
)
enum
renum
{
RE0
,
...
...
@@ -373,27 +416,30 @@ cpp_quote("#endif")
const
int
RE_MAX
=
RE3
;
typedef
[
range
(
RE_MIN
,
RE_MAX
)
]
enum
renum
renum_t
;
typedef
[
range
(
0
,
100
)
]
int
rint_t
;
rint_t
echo_ranged_int
(
[
range
(
0
,
10
)
]
int
i
,
[
range
(
0
,
20
)
]
int
j
,
[
range
(
0
,
100
)
]
int
k
)
;
rint_t
echo_ranged_int2
(
[
range
(
0
,
40
)
]
int
i
)
;
void
get_ranged_enum
(
[
out
]
renum_t
*
re
)
;
cpp_quote
(
"#endif"
)
rint_t
NAME
(
echo_ranged_int
)(
[
range
(
0
,
10
)
]
int
i
,
[
range
(
0
,
20
)
]
int
j
,
[
range
(
0
,
100
)
]
int
k
)
;
rint_t
NAME
(
echo_ranged_int2
)(
[
range
(
0
,
40
)
]
int
i
)
;
void
NAME
(
get_ranged_enum
)(
[
out
]
renum_t
*
re
)
;
void
context_handle_test
(
void
)
;
void
NAME
(
context_handle_test
)
(
void
)
;
void
full_pointer_test
(
[
in
,
ptr
]
int
*
a
,
[
in
,
ptr
]
int
*
b
)
;
void
full_pointer_null_test
(
[
in
,
ptr
]
int
*
a
,
[
in
,
ptr
]
int
*
b
)
;
void
NAME
(
full_pointer_test
)
(
[
in
,
ptr
]
int
*
a
,
[
in
,
ptr
]
int
*
b
)
;
void
NAME
(
full_pointer_null_test
)
(
[
in
,
ptr
]
int
*
a
,
[
in
,
ptr
]
int
*
b
)
;
void
authinfo_test
(
unsigned
int
protseq
,
int
secure
)
;
void
NAME
(
authinfo_test
)
(
unsigned
int
protseq
,
int
secure
)
;
void
stop
(
void
)
;
void
stop_autolisten
(
void
)
;
void
NAME
(
stop
)
(
void
)
;
void
NAME
(
stop_autolisten
)
(
void
)
;
cpp_quote
(
"#ifndef SKIP_STRUCT_DECLS"
)
typedef
union
ipu
switch
(
int
t
)
{
default
:
IStream
*
stream
;
}
ipu_t
;
cpp_quote
(
"#endif"
)
void
ip_test
(
[
in
]
ipu_t
*
a
)
;
void
NAME
(
ip_test
)
(
[
in
]
ipu_t
*
a
)
;
int
sum_ptr_array
(
[
in
]
int
*
a
[
2
]
)
;
int
sum_array_ptr
(
[
in
]
int
(
*
a
)
[
2
]
)
;
int
NAME
(
sum_ptr_array
)
(
[
in
]
int
*
a
[
2
]
)
;
int
NAME
(
sum_array_ptr
)
(
[
in
]
int
(
*
a
)
[
2
]
)
;
}
dlls/rpcrt4/tests/server_interp.idl
0 → 100644
View file @
d73a6bae
/*
*
Copyright
2019
Jacek
Caban
for
CodeWeavers
*
*
This
library
is
free
software
; you can redistribute it and/or
*
modify
it
under
the
terms
of
the
GNU
Lesser
General
Public
*
License
as
published
by
the
Free
Software
Foundation
; either
*
version
2.1
of
the
License
,
or
(
at
your
option
)
any
later
version
.
*
*
This
library
is
distributed
in
the
hope
that
it
will
be
useful
,
*
but
WITHOUT
ANY
WARRANTY
; without even the implied warranty of
*
MERCHANTABILITY
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
*
Lesser
General
Public
License
for
more
details
.
*
*
You
should
have
received
a
copy
of
the
GNU
Lesser
General
Public
*
License
along
with
this
library
; if not, write to the Free Software
*
Foundation
,
Inc
.
,
51
Franklin
St
,
Fifth
Floor
,
Boston
,
MA
02110
-
1301
,
USA
*/
#
pragma
makedep
client
#
pragma
makedep
server
#
define
NAME
(
x
)
interp_
##
x
#
define
ISERVER_UUID
00000000
-
4114
-
0704
-
2301
-
000000000001
#
include
"server.idl"
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