blob: bf5bc3f9c5e0b306b139a6574c1c108eb249b486 (
plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#ifndef MIDLTESTS_C_CODE
[
uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"),
pointer_default(unique)
]
interface midltests
{
typedef struct st_wire {
char data[20];
} st_wire_t;
struct st_local {
short s1;
short s2;
};
typedef [transmit_as(st_wire_t)] struct st_local st_local_t;
long midltests_fn(
[in] st_local_t st
);
}
#elif MIDLTESTS_C_CODE
void __RPC_USER st_local_t_to_xmit(st_local_t *l, st_wire_t **w)
{
*w = malloc(sizeof(st_wire_t));
memset(*w, 0xcd, sizeof(st_wire_t));
}
void __RPC_USER st_local_t_from_xmit(st_wire_t *w, st_local_t *l)
{
memset(l, 0, sizeof(st_local_t));
}
void __RPC_USER st_local_t_free_inst(st_local_t *l)
{
}
void __RPC_USER st_local_t_free_xmit(st_wire_t *w)
{
free(w);
}
static void midltests()
{
char s[64];
st_local_t st;
strcpy(s, "TestString");
cli_midltests_fn(st);
}
long srv_midltests_fn(st_local_t st)
{
printf("srv_midltests_fn: Start\n");
printf("srv_midltests_fn: End\n");
return 0x65757254;
}
#endif
|