From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- .../win32/midltests/todo/midltests-transmit-as.idl | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 testprogs/win32/midltests/todo/midltests-transmit-as.idl (limited to 'testprogs/win32/midltests/todo/midltests-transmit-as.idl') diff --git a/testprogs/win32/midltests/todo/midltests-transmit-as.idl b/testprogs/win32/midltests/todo/midltests-transmit-as.idl new file mode 100755 index 0000000..bf5bc3f --- /dev/null +++ b/testprogs/win32/midltests/todo/midltests-transmit-as.idl @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.3