From 6fe216642a1003a2fda2b8332199ff84c8712984 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 12 Aug 2010 09:31:38 +0200 Subject: testprogs/midltests: add some example IDL files and there midltests.exe output metze --- .../midltests/valid/midltests_strings_array_02.idl | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 testprogs/win32/midltests/valid/midltests_strings_array_02.idl (limited to 'testprogs/win32/midltests/valid/midltests_strings_array_02.idl') diff --git a/testprogs/win32/midltests/valid/midltests_strings_array_02.idl b/testprogs/win32/midltests/valid/midltests_strings_array_02.idl new file mode 100644 index 0000000000..46154c967a --- /dev/null +++ b/testprogs/win32/midltests/valid/midltests_strings_array_02.idl @@ -0,0 +1,44 @@ +#ifndef MIDLTESTS_C_CODE + +[ + uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"), + pointer_default(unique) +] +interface midltests +{ + struct strings { + long count; + [size_is(count),string] char *val[]; + }; + + long midltests_fn( + [in,ref] struct strings *s + ); +} + +#elif MIDLTESTS_C_CODE + +static void midltests(void) +{ + const char *s1 = "foo"; + const char *s2 = "bar"; + char *a[] = { "foo", "bar2", NULL }; + char buffer[1024]; + struct strings *s = buffer; + + s->count = 3; + s->val[0] = "foo"; + s->val[1] = "bar2"; + s->val[2] = NULL; + + cli_midltests_fn(s); +} + +long srv_midltests_fn(struct strings *a) +{ + printf("srv_midltests_fn: Start\n"); + printf("srv_midltests_fn: End\n"); + return 0x65757254; +} + +#endif -- cgit