1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef MIDLTESTS_C_CODE
[
uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"),
pointer_default(unique)
]
interface midltests
{
long midltests_fn(
[out,ref] long *count,
[out,ref,size_is(,*count),range(0,1)] long **array,
[out,ref] long *error
);
}
#elif MIDLTESTS_C_CODE
static void midltests(void)
{
long count;
long *array;
long error;
cli_midltests_fn(&count, &array, &error);
}
long srv_midltests_fn(long *count, long **array, long *error)
{
printf("srv_midltests_fn: Start\n");
*count=2;
*array=(long *)malloc((*count) * sizeof(long));
(*array)[0] = 7;
(*array)[1] = 7;
*error=0;
printf("srv_midltests_fn: End\n");
return 0x65757254;
}
#endif
|