summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-01 08:52:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:24 -0500
commitcf476b09b53f26a185de13bb573b33d06c176820 (patch)
tree9f3446ca81b0906dd1b455cf09fc42db2d9ec087 /source4
parentbb6e2059ee0b07d15ef3f924a137321d5fd6aa0f (diff)
downloadsamba-cf476b09b53f26a185de13bb573b33d06c176820.tar.gz
samba-cf476b09b53f26a185de13bb573b33d06c176820.tar.bz2
samba-cf476b09b53f26a185de13bb573b33d06c176820.zip
r6545: some notes and experiments on ref ptrs, testing with midl
(This used to be commit 87d3d55bd38ddcdbf42a920c65b5cf94649ca607)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/pidl/ref_notes.txt220
1 files changed, 220 insertions, 0 deletions
diff --git a/source4/build/pidl/ref_notes.txt b/source4/build/pidl/ref_notes.txt
new file mode 100644
index 0000000000..00f44fddb7
--- /dev/null
+++ b/source4/build/pidl/ref_notes.txt
@@ -0,0 +1,220 @@
+some experiments with ref ptrs
+
+
+
+ typedef struct {
+ short x;
+ } xstruct;
+
+ uint16 echo_TestRef([in] xstruct foo);
+
+ short v = 13;
+ xstruct r;
+ r.x = v;
+ echo_TestRef(r);
+
+ [0D 00]
+
+----------------------------------------------------
+ typedef struct {
+ short *x;
+ } xstruct;
+
+ uint16 echo_TestRef([in] xstruct foo);
+
+ short v = 13;
+ xstruct r;
+ r.x = &v;
+ echo_TestRef(r);
+
+ [PP PP PP PP 0D 00]
+
+
+ xstruct r;
+ r.x = NULL;
+ echo_TestRef(r);
+
+ [00 00 00 00]
+
+----------------------------------------------------
+ typedef struct {
+ [ref] short *x;
+ } xstruct;
+
+ uint16 echo_TestRef([in] xstruct foo);
+
+ short v = 13;
+ xstruct r;
+ r.x = &v;
+ echo_TestRef(r);
+
+ [XX XX XX XX 0D 00]
+
+
+ xstruct r;
+ r.x = NULL;
+ echo_TestRef(r);
+
+ [client runtime error 0x6f4]
+
+
+----------------------------------------------------
+ typedef struct {
+ short x;
+ } xstruct;
+
+ uint16 echo_TestRef([in] xstruct *foo);
+
+ short v = 13;
+ xstruct r;
+ r.x = v;
+ echo_TestRef(&r);
+
+ [0D 00]
+
+
+ echo_TestRef(NULL);
+
+ [client runtime error 0x6f4]
+
+----------------------------------------------------
+ typedef struct {
+ short x;
+ } xstruct;
+
+ uint16 echo_TestRef([in,ref] xstruct *foo);
+
+ short v = 13;
+ xstruct r;
+ r.x = v;
+ echo_TestRef(&r);
+
+ [0D 00]
+
+
+ echo_TestRef(NULL);
+
+ [client runtime error 0x6f4]
+
+
+----------------------------------------------------
+ typedef struct {
+ short x;
+ } xstruct;
+
+ uint16 echo_TestRef([in,unique] xstruct *foo);
+
+ short v = 13;
+ xstruct r;
+ r.x = v;
+ echo_TestRef(&r);
+
+ [PP PP PP PP 0D 00]
+
+
+ echo_TestRef(NULL);
+
+ [00 00 00 00]
+
+
+----------------------------------------------------
+ typedef struct {
+ short x;
+ } xstruct;
+
+ uint16 echo_TestRef([out] xstruct foo);
+
+ [idl compiler error]
+
+----------------------------------------------------
+ typedef struct {
+ short x;
+ } xstruct;
+
+ void echo_TestRef([out] xstruct *foo);
+
+ xstruct r;
+ echo_TestRef(&r);
+ r.x -> 13;
+
+ [0D 00]
+
+
+ echo_TestRef(NULL);
+
+ [client runtime error 0x6f4]
+
+----------------------------------------------------
+ typedef struct {
+ short x;
+ } xstruct;
+
+ void echo_TestRef([out,ref] xstruct *foo);
+
+ xstruct r;
+ echo_TestRef(&r);
+ r.x -> 13;
+
+ [0D 00]
+
+
+ echo_TestRef(NULL);
+
+ [client runtime error 0x6f4]
+
+----------------------------------------------------
+ typedef struct {
+ short x;
+ } xstruct;
+
+ void echo_TestRef([out,unique] xstruct *foo);
+
+ [idl compiler error]
+
+
+----------------------------------------------------
+ void echo_TestRef([in] short **foo);
+
+ short v = 13;
+ short *pv = &v;
+
+ echo_TestRef(&pv);
+
+ [PP PP PP PP 0D 00]
+
+
+ short *pv = NULL;
+
+ echo_TestRef(&pv);
+
+ [00 00 00 00]
+
+
+ echo_TestRef(NULL);
+
+ [client runtime error 0x6f4]
+
+
+----------------------------------------------------
+ void echo_TestRef([in,ref] short **foo);
+
+ short v = 13;
+ short *pv = &v;
+
+ echo_TestRef(&pv);
+
+ [PP PP PP PP 0D 00]
+
+
+ short *pv = NULL;
+
+ echo_TestRef(&pv);
+
+ [00 00 00 00]
+
+
+ echo_TestRef(NULL);
+
+ [client runtime error 0x6f4]
+
+