#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