5 http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
12 uuid(18f70770-8e64-11cf-9af1-0020af6e72f4),
14 ] interface dcom_Unknown
16 void dcomu_UseProtSeq();
17 void dcomu_GetCustomProtseqInfo();
18 void dcomu_UpdateResolverBindings();
22 uuid(99fcfe60-5260-101b-bbcb-00aa0021347a),
23 pointer_default(unique)
25 interface ObjectRpcBaseTypes
29 /* Machine Identifier */
32 /* Object Exporter Identifier */
38 // Interface Pointer Identifier
41 // Causality Identifier
44 // Interface identifier
51 //////////////////////////////////////////////////////////////////
52 // ORPC Call Packet Format
53 //////////////////////////////////////////////////////////////////
54 // COM_MINOR_VERSION = 1 (NT4.0, SP1, SP2, DCOM95).
56 // - Must be used when talking to downlevel machines, including
57 // on Remote Activation calls.
58 // COM_MINOR_VERSION = 2 (NT4.0 SP3 and beyond).
59 // - Added ResolveOxid2 to IObjectExporter to retrieve the
60 // COM version number of the server. Passed to the NDR engine
61 // to fix fatal endian-ness flaw in the way OLEAUTOMATION marshals
62 // BSTRS. Previous way used trailing padding, which is not NDR
63 // compatible. See Bug# 69189.
64 // COM_MINOR_VERSION = 3 (NT4.0 SP4 and DCOM95 builds 1018 and beyond)
65 // - OLEAUT32 added two new types to the SAFEARRAY, but SAFEARRAY
66 // previously included the "default" keyword, which prevented
67 // downlevel NDR engines from correctly handling any extensions.
68 // Machines with version >=5.3 don't use "default" and will
69 // gracefully handle future extensions to SAFEARRAY.
70 // old constants (for convenience)
73 const uint16 COM_MAJOR_VERSION = 5;
74 const uint16 COM_MINOR_VERSION = 6;
77 const string dcom_ext_debugging = "f1f19680-4d2a-11ce-a66a-0020af6e72f4";
78 const string dcom_ext_extended_error = "f1f19681-4d2a-11ce-a66a-0020af6e72f4";
80 // Component Object Model version number
82 typedef [public] struct
84 uint16 MajorVersion; // Major version number
85 uint16 MinorVersion; // Minor version number
88 typedef [public] struct
94 typedef [public] struct
99 // enumeration of additional information present in the call packet.
100 // Should be an enum but DCE IDL does not support sparse enumerators.
102 ORPCF_NULL = 0, // no additional info in packet
103 ORPCF_LOCAL = 1, // call is local to this machine
104 ORPCF_RESERVED1 = 2, // reserved for local use
105 ORPCF_RESERVED2 = 4, // reserved for local use
106 ORPCF_RESERVED3 = 8, // reserved for local use
107 ORPCF_RESERVED4 = 16 // reserved for local use
110 // Extension to implicit parameters.
111 typedef [public] struct
113 GUID id; // Extension identifier.
114 uint32 size; // Extension size.
115 //FIXME[size_is((size+7)&~7)] uint8 data[]; // Extension data.
116 [size_is(size)] uint8 data[];
120 // Array of extensions.
123 uint32 size; // Num extents.
124 uint32 reserved; // Must be zero.
125 //FIXME[size_is((size+1)&~1,), unique] ORPC_EXTENT **extent; // extents
126 [size_is(size),unique] ORPC_EXTENT extent[];
130 // implicit 'this' pointer which is the first [in] parameter on
132 typedef [public] struct
134 COMVERSION version; // COM version number
135 uint32 flags; // ORPCF flags for presence of other data
136 uint32 reserved1; // set to zero
137 CID cid; // causality id of caller
139 [unique] ORPC_EXTENT_ARRAY *extensions;
143 // implicit 'that' pointer which is the first [out] parameter on
145 typedef [public] struct
147 uint32 flags; // ORPCF flags for presence of other data
149 [unique] ORPC_EXTENT_ARRAY *extensions;
153 // DUALSTRINGARRAYS are the return type for arrays of network addresses,
154 // arrays of endpoints and arrays of both used in many ORPC interfaces
157 uint16 wTowerId; // Cannot be zero.
158 uint16 aNetworkAddr; // Zero terminated.
162 const uint16 COM_C_AUTHZ_NONE = 0xffff;
165 uint16 wAuthnSvc; // Cannot be zero.
166 uint16 wAuthzSvc; // Must not be zero.
167 uint16 aPrincName; // Zero terminated.
171 typedef [public] struct
173 uint16 wNumEntries; // Number of entries in array.
174 uint16 wSecurityOffset; // Offset of security info.
175 // The array contains two parts, a set of STRINGBINDINGs
176 // and a set of SECURITYBINDINGs. Each set is terminated by an
177 // extra zero. The shortest array contains four zeros.
178 [size_is(wNumEntries)] uint16 aStringArray[];
182 // signature value for OBJREF (object reference, actually the
183 // marshaled form of a COM interface).
184 const uint32 OBJREF_SIGNATURE = 0x574f454d; // 'MEOW'
186 // flag values for OBJREF
188 OBJREF_NULL = 0x0, // NULL pointer
189 OBJREF_STANDARD = 0x1, // standard marshaled objref
190 OBJREF_HANDLER = 0x2, // handler marshaled objref
191 OBJREF_CUSTOM = 0x4 // custom marshaled objref
194 // Flag values for a STDOBJREF (standard part of an OBJREF).
195 // SORF_OXRES1 - SORF_OXRES8 are reserved for the object exporters
196 // use only, object importers must ignore them and must not enforce MBZ.
198 SORF_NULL = 0x0000, // convenient for initializing SORF
199 SORF_OXRES1 = 0x0001, // reserved for exporter
200 SORF_OXRES2 = 0x0020, // reserved for exporter
201 SORF_OXRES3 = 0x0040, // reserved for exporter
202 SORF_OXRES4 = 0x0080, // reserved for exporter
203 SORF_OXRES5 = 0x0100, // reserved for exporter
204 SORF_OXRES6 = 0x0200, // reserved for exporter
205 SORF_OXRES7 = 0x0400, // reserved for exporter
206 SORF_OXRES8 = 0x0800, // reserved for exporter
207 SORF_NOPING = 0x1000 // Pinging is not required
210 // standard object reference
211 typedef [public] struct
213 uint32 flags; // STDOBJREF flags (see above)
214 uint32 cPublicRefs; // count of references passed
215 OXID oxid; // oxid of server with this oid
216 OID oid; // oid of object with this ipid
217 IPID ipid; // ipid of Interface
222 STDOBJREF std; // standard objref
223 DUALSTRINGARRAY saResAddr; // resolver address
228 STDOBJREF std; // standard objref
229 GUID clsid; // Clsid of handler code
230 DUALSTRINGARRAY saResAddr; // resolver address
235 GUID clsid; // Clsid of unmarshaling code
236 uint32 cbExtension; // size of extension data
237 uint32 size; // size of data that follows
238 [size_is(size), ref] uint8 *pData; // extension + class specific data
247 [case(OBJREF_NULL)] u_null u_null;
248 [case(OBJREF_STANDARD)] u_standard u_standard;
249 [case(OBJREF_HANDLER)] u_handler u_handler;
250 [case(OBJREF_CUSTOM)] u_custom u_custom;
253 // OBJREF is the format of a marshaled interface pointer.
254 typedef [public] struct
257 uint32 flags; // OBJREF flags (see above)
258 GUID iid; // interface identifier
259 [switch_is(flags), switch_type(uint32)] OBJREF_Types u_objref;
262 // wire representation of a marshalled interface pointer
263 typedef [public] struct
265 [subcontext(4)] OBJREF abData; // data (OBJREF)
272 uuid(00000000-0000-0000-C000-000000000046),
273 helpstring("Base interface for most COM interfaces")
279 /* Returns the interface with the specified IID
280 if implemented by this object */
281 HRESULT QueryInterface([in] IID *riid
282 /*FIXME, [out] void **data*/);
296 uuid(00000001-0000-0000-C000-000000000046),
297 pointer_default(unique)
298 ] interface IClassFactory : IUnknown
300 HRESULT CreateInstance(/*FIXME[in] IUnknown *pUnknown,
302 [out, iid_is(riid)] void **ppv*/);
304 HRESULT RemoteCreateInstance();
306 /* Set lock to TRUE when you want to do a lock
307 and set it to FALSE when you want to unlock */
308 HRESULT LockServer([in] uint8 lock);
310 HRESULT RemoteLockServer();
313 //////////////////////////////////////////////////////////////////
315 // The remote version of IUnknown. This interface exists on every
316 // OXID (whether an OXID represents either a thread or a process is
317 // implementation specific). It is used by clients to query for new
318 // interfaces, get additional references (for marshaling), and release
319 // outstanding references.
320 // This interface is passed along during OXID resolution.
323 uuid(00000131-0000-0000-C000-000000000046),
325 helpstring("Remote version of IUnknown")
327 interface IRemUnknown : IUnknown
329 typedef [public] struct
331 HRESULT hResult; // result of call
332 STDOBJREF std; // data for returned interface
336 HRESULT RemQueryInterface (
337 [in] IPID *ripid, // interface to QI on
338 [in] uint32 cRefs, // count of AddRefs requested
339 [in] uint16 cIids, // count of IIDs that follow
340 [in, size_is(cIids)] IID* iids, //, // IIDs to QI for
341 [out] MInterfacePointer *ip
346 IPID ipid; // ipid to AddRef/Release
352 [in] uint16 cInterfaceRefs,
353 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
354 [out, size_is(cInterfaceRefs)] HRESULT* pResults
358 [in] uint16 cInterfaceRefs,
359 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
364 uuid(00000140-0000-0000-c000-000000000046),
366 ] interface IClassActivator : IUnknown
368 void RemoteGetClassObject([in] GUID classid,
371 [in] GUID iid/*FIXME,
372 [out, iid_is(iid)] void *data */);
375 /* Looks like this is the equivalent of .NET's
376 System.Activator class */
378 uuid(000001a0-0000-0000-c000-000000000046),
381 interface ISystemActivator : IClassActivator
383 void ISystemActivatorRemoteCreateInstance(
386 [out] MInterfacePointer res
392 // Derived from IRemUnknown, this interface supports Remote Query interface
393 // for objects that supply additional data beyond the STDOBJREF in their
394 // marshaled interface packets.
397 uuid(00000143-0000-0000-C000-000000000046)
400 interface IRemUnknown2 : IRemUnknown
402 HRESULT RemQueryInterface2 (
405 [in, size_is(cIids)] IID *iids,
406 [out, size_is(cIids)] HRESULT *phr,
407 [out, size_is(cIids)] MInterfacePointer *ppMIF
413 uuid(00000136-0000-0000-C000-000000000046)
414 ] interface ISCMActivator : IUnknown
416 WERROR SCMActivator_GetClassObject();
417 WERROR SCMActivator_CreateInstance();
422 uuid(00020400-0000-0000-C000-000000000046)
423 ] interface IDispatch : IUnknown
427 HRESULT GetTypeInfoCount(
428 [out] uint16 *pctinfo);
440 HRESULT GetTypeInfo (
443 [out] REF_ITypeInfo *ppTInfo);
447 HRESULT GetIDsOfNames(
449 /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
452 [out,size_is(cNames)] DISPID *rgDispId);
471 [in] DISPID dispIdMember,
475 [out,in] DISPPARAMS *pDispParams,
476 [out] VARIANT *pVarResult,
477 [out] EXCEPINFO *pExcepInfo,
478 [out] uint16 *puArgErr);
483 uuid(330E9E75-DF48-11CF-8E2C-00A0C90DC94B),
484 pointer_default(unique)
486 interface IDcomEchoServ : IDispatch
488 HRESULT EchoPlusOne([in] uint32 x, [out] uint32 *y);
493 uuid(00000003-0000-0000-C000-000000000046)
494 ] interface IMarshal : IUnknown
496 HRESULT MarshalInterface();
497 HRESULT UnMarshalInterface();