summaryrefslogtreecommitdiffstats
path: root/testprogs/win32/midltests/todo/midltests-transmit-as.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:47:29 +0000
commit4f5791ebd03eaec1c7da0865a383175b05102712 (patch)
tree8ce7b00f7a76baa386372422adebbe64510812d4 /testprogs/win32/midltests/todo/midltests-transmit-as.idl
parentInitial commit. (diff)
downloadsamba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz
samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testprogs/win32/midltests/todo/midltests-transmit-as.idl')
-rwxr-xr-xtestprogs/win32/midltests/todo/midltests-transmit-as.idl59
1 files changed, 59 insertions, 0 deletions
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