5 http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
9 pointer_default(unique)
11 interface ObjectRpcBaseTypes
13 /* COM_MINOR_VERSION = 1 (NT4.0, SP1, SP2, DCOM95). */
14 /* - Initial Release */
15 /* - Must be used when talking to downlevel machines, including */
16 /* on Remote Activation calls. */
17 /* COM_MINOR_VERSION = 2 (NT4.0 SP3 and beyond). */
18 /* - Added ResolveOxid2 to IObjectExporter to retrieve the */
19 /* COM version number of the server. Passed to the NDR engine */
20 /* to fix fatal endian-ness flaw in the way OLEAUTOMATION marshals */
21 /* BSTRS. Previous way used trailing padding, which is not NDR */
22 /* compatible. See Bug# 69189. */
23 /* COM_MINOR_VERSION = 3 (NT4.0 SP4 and DCOM95 builds 1018 and beyond) */
24 /* - OLEAUT32 added two new types to the SAFEARRAY, but SAFEARRAY */
25 /* previously included the "default" keyword, which prevented */
26 /* downlevel NDR engines from correctly handling any extensions. */
27 /* Machines with version >=5.3 don't use "default" and will */
28 /* gracefully handle future extensions to SAFEARRAY. */
29 /* old constants (for convenience) */
32 const uint16 COM_MAJOR_VERSION
= 5;
33 const uint16 COM_MINOR_VERSION
= 1;
36 const string dcom_ext_debugging
= "f1f19680-4d2a-11ce-a66a-0020af6e72f4";
37 const string dcom_ext_extended_error
= "f1f19681-4d2a-11ce-a66a-0020af6e72f4";
39 /* Component Object Model version number */
41 typedef [public] struct
43 uint16 MajorVersion
; /* Major version number */
44 uint16 MinorVersion
; /* Minor version number */
47 /* enumeration of additional information present in the call packet. */
49 ORPCF_NULL
= 0x00, /* no additional info in packet */
50 ORPCF_LOCAL
= 0x01, /* call is local to this machine */
51 ORPCF_RESERVED1
= 0x02, /* reserved for local use */
52 ORPCF_RESERVED2
= 0x04, /* reserved for local use */
53 ORPCF_RESERVED3
= 0x08, /* reserved for local use */
54 ORPCF_RESERVED4
= 0x10 /* reserved for local use */
57 /* Extension to implicit parameters. */
58 typedef [public] struct
60 GUID
id; /* Extension identifier. */
61 uint32 size
; /* Extension size. */
62 [size_is((size
+7)&~
7)] uint8 data
[]; /* Extension data. */
66 /* Array of extensions. */
69 uint32 size
; /* Num extents. */
70 uint32 reserved
; /* Must be zero. */
71 [size_is((size
+1)&~
1,), unique] ORPC_EXTENT
**extent
; /* extents */
75 /* implicit 'this' pointer which is the first [in] parameter on */
76 /* every ORPC call. */
77 typedef [public] struct
79 COMVERSION
version; /* COM version number */
80 uint32 flags
; /* ORPCF flags for presence of other data */
81 uint32 reserved1
; /* set to zero */
82 GUID cid
; /* causality id of caller */
84 [unique] ORPC_EXTENT_ARRAY
*extensions
;
88 /* implicit 'that' pointer which is the first [out] parameter on */
89 /* every ORPC call. */
90 typedef [public] struct
92 uint32 flags
; /* ORPCF flags for presence of other data */
94 [unique] ORPC_EXTENT_ARRAY
*extensions
;
98 /* DUALSTRINGARRAYS are the return type for arrays of network addresses, */
99 /* arrays of endpoints and arrays of both used in many ORPC interfaces */
100 typedef [public,flag
(NDR_NOALIGN
)] struct
102 uint16 wTowerId
; /* Cannot be zero. */
107 const uint16 COM_C_AUTHZ_NONE
= 0xffff;
108 typedef [public,flag
(NDR_NOALIGN
)] struct
110 uint16 wAuthnSvc
; /* Cannot be zero. */
115 /* signature value for OBJREF (object reference, actually the */
116 /* marshaled form of a COM interface).
117 * MEOW apparently stands for "Microsoft Extended Object Wireformat"
119 const uint32 OBJREF_SIGNATURE
= 0x574f454d; /* 'MEOW' */
121 /* flag values for OBJREF */
123 OBJREF_NULL
= 0x0, /* NULL pointer */
124 OBJREF_STANDARD
= 0x1, /* standard marshaled objref */
125 OBJREF_HANDLER
= 0x2, /* handler marshaled objref */
126 OBJREF_CUSTOM
= 0x4 /* custom marshaled objref */
129 /* Flag values for a STDOBJREF (standard part of an OBJREF). */
130 /* SORF_OXRES1 - SORF_OXRES8 are reserved for the object exporters */
131 /* use only, object importers must ignore them and must not enforce MBZ. */
133 SORF_NULL
= 0x0000, /* convenient for initializing SORF */
134 SORF_OXRES1
= 0x0001, /* reserved for exporter */
135 SORF_OXRES2
= 0x0020, /* reserved for exporter */
136 SORF_OXRES3
= 0x0040, /* reserved for exporter */
137 SORF_OXRES4
= 0x0080, /* reserved for exporter */
138 SORF_OXRES5
= 0x0100, /* reserved for exporter */
139 SORF_OXRES6
= 0x0200, /* reserved for exporter */
140 SORF_OXRES7
= 0x0400, /* reserved for exporter */
141 SORF_OXRES8
= 0x0800, /* reserved for exporter */
142 SORF_NOPING
= 0x1000 /* Pinging is not required */
145 /* standard object reference */
146 typedef [public] struct
148 uint32 flags
; /* STDOBJREF flags (see above) */
149 uint32 cPublicRefs
; /* count of references passed */
150 hyper oxid
; /* oxid of server with this oid */
151 hyper oid
; /* oid of object with this ipid */
152 GUID ipid
; /* ipid of interface pointer to this object */
157 STDOBJREF std
; /* standard objref */
158 STRINGARRAY saResAddr
; /* resolver address */
163 STDOBJREF std
; /* standard objref */
164 GUID clsid
; /* Clsid of handler code */
165 STRINGARRAY saResAddr
; /* resolver address */
170 GUID clsid
; /* Clsid of unmarshaling code */
171 uint32 cbExtension
; /* size of extension data */
172 uint32 size
; /* size of data that follows */
173 uint8 pData
[size
]; /* extension + class specific data */
180 typedef [nodiscriminant
] union
182 [case(OBJREF_NULL
)] u_null u_null
;
183 [case(OBJREF_STANDARD
)] u_standard u_standard
;
184 [case(OBJREF_HANDLER
)] u_handler u_handler
;
185 [case(OBJREF_CUSTOM
)] u_custom u_custom
;
188 /* OBJREF is the format of a marshaled interface pointer. */
189 typedef [public,flag
(NDR_LITTLE_ENDIAN
)] struct
192 uint32 flags
; /* OBJREF flags (see above) */
193 GUID iid
; /* interface identifier */
194 [switch_is(flags
), switch_type(uint32
)] OBJREF_Types u_objref
;
197 /* wire representation of a marshalled interface pointer */
198 typedef [public] struct
201 [subcontext
(4)] OBJREF obj
;