lib: Convert [up|low]case.dat to C
[Samba.git] / testprogs / win32 / midltests / valid / midltests_union_align_14.idl
blobc029f5a7d4148fafbef408b96f8cfa5b975ad70d
1 #ifndef MIDLTESTS_C_CODE
3 /*
4 * For midltests_tcp.exe you may want to
5 * redirect the traffic via rinetd
6 * with a /etc/rinetd.conf like this:
8 * 172.31.9.1 5032 172.31.9.8 5032
9 * 172.31.9.1 5064 172.31.9.8 5064
11 * This is useful to watch the traffic with
12 * a network sniffer.
15 cpp_quote("#define LISTEN_IP \"0.0.0.0\"")
16 cpp_quote("#define FORWARD_IP \"127.0.0.1\"")
17 cpp_quote("#define CONNECT_IP \"172.31.9.1\"")
21 * With midltests_tcp.exe NDR64 is enforced by default.
22 * For testing it might be needed to allow downgrades
23 * to NDR32. This is needed when you use 'pipe'.
25 //cpp_quote("#define DONOT_FORCE_NDR64 1")
28 uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"),
29 pointer_default(unique)
31 interface midltests
33 enum level_enum { ZERO = 0, ONE = 1, TWO = 2, FOUR = 4, EIGHT = 8 };
35 [switch_type(enum level_enum)] union u {
36 [case(ZERO)];
37 [case(ONE)] char c;
38 [case(TWO)] short s;
39 [case(FOUR)] long l;
40 [case(EIGHT)] hyper h;
43 long midltests_fn(
44 [in] enum level_enum level,
45 [in,switch_is(level)] union u u,
46 [in] char c
50 #elif MIDLTESTS_C_CODE
52 static void midltests(void)
54 union u u;
55 u.h = 0xFFFFFFFFFFFFFFFFLL;
57 cli_midltests_fn(ZERO, u, 'c');
58 cli_midltests_fn(ONE, u, 'c');
59 cli_midltests_fn(TWO, u, 'c');
60 cli_midltests_fn(FOUR, u, 'c');
61 cli_midltests_fn(EIGHT, u, 'c');
64 long srv_midltests_fn(char level, union u u, char c)
66 printf("srv_midltests_fn: Start\n");
67 printf("srv_midltests_fn: End\n");
68 return 0x65757254;
71 #endif