5 http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
12 uuid(99fcfe60-5260-101b-bbcb-00aa0021347a),
13 pointer_default(unique)
15 interface ObjectRpcBaseTypes
22 // Object Exporter Identifier
28 // Ping Set Identifier
31 // Interface Pointer Identifier
34 // Causality Identifier
40 // Interface identifier
47 //////////////////////////////////////////////////////////////////
48 // ORPC Call Packet Format
49 //////////////////////////////////////////////////////////////////
50 // COM_MINOR_VERSION = 1 (NT4.0, SP1, SP2, DCOM95).
52 // - Must be used when talking to downlevel machines, including
53 // on Remote Activation calls.
54 // COM_MINOR_VERSION = 2 (NT4.0 SP3 and beyond).
55 // - Added ResolveOxid2 to IObjectExporter to retrieve the
56 // COM version number of the server. Passed to the NDR engine
57 // to fix fatal endian-ness flaw in the way OLEAUTOMATION marshals
58 // BSTRS. Previous way used trailing padding, which is not NDR
59 // compatible. See Bug# 69189.
60 // COM_MINOR_VERSION = 3 (NT4.0 SP4 and DCOM95 builds 1018 and beyond)
61 // - OLEAUT32 added two new types to the SAFEARRAY, but SAFEARRAY
62 // previously included the "default" keyword, which prevented
63 // downlevel NDR engines from correctly handling any extensions.
64 // Machines with version >=5.3 don't use "default" and will
65 // gracefully handle future extensions to SAFEARRAY.
66 // old constants (for convenience)
67 const uint16 COM_MINOR_VERSION_1 = 1;
68 const uint16 COM_MINOR_VERSION_2 = 2;
71 const uint16 COM_MAJOR_VERSION = 5;
72 const uint16 COM_MINOR_VERSION = 3;
73 // Component Object Model version number
75 typedef [public] struct
77 uint16 MajorVersion; // Major version number
78 uint16 MinorVersion; // Minor version number
82 // enumeration of additional information present in the call packet.
83 // Should be an enum but DCE IDL does not support sparse enumerators.
85 ORPCF_NULL = 0, // no additional info in packet
86 ORPCF_LOCAL = 1, // call is local to this machine
87 ORPCF_RESERVED1 = 2, // reserved for local use
88 ORPCF_RESERVED2 = 4, // reserved for local use
89 ORPCF_RESERVED3 = 8, // reserved for local use
90 ORPCF_RESERVED4 = 16 // reserved for local use
93 // Extension to implicit parameters.
94 typedef [public] struct
96 GUID id; // Extension identifier.
97 uint32 size; // Extension size.
98 //FIXME[size_is((size+7)&~7)] uint8 data[]; // Extension data.
99 [size_is(size)] uint8 data[];
103 // Array of extensions.
106 uint32 size; // Num extents.
107 uint32 reserved; // Must be zero.
108 //FIXME[size_is((size+1)&~1,), unique] ORPC_EXTENT **extent; // extents
109 [size_is(size),unique] ORPC_EXTENT extent[];
113 // implicit 'this' pointer which is the first [in] parameter on
115 typedef [public] struct
117 COMVERSION version; // COM version number
118 uint32 flags; // ORPCF flags for presence of other data
119 uint32 reserved1; // set to zero
120 CID cid; // causality id of caller
122 [unique] ORPC_EXTENT_ARRAY *extensions;
126 // implicit 'that' pointer which is the first [out] parameter on
128 typedef [public] struct
130 uint32 flags; // ORPCF flags for presence of other data
132 [unique] ORPC_EXTENT_ARRAY *extensions;
136 // DUALSTRINGARRAYS are the return type for arrays of network addresses,
137 // arrays of endpoints and arrays of both used in many ORPC interfaces
140 uint16 wTowerId; // Cannot be zero.
141 uint16 aNetworkAddr; // Zero terminated.
145 const uint16 COM_C_AUTHZ_NONE = 0xffff;
148 uint16 wAuthnSvc; // Cannot be zero.
149 uint16 wAuthzSvc; // Must not be zero.
150 uint16 aPrincName; // Zero terminated.
154 typedef [public] struct
156 uint16 wNumEntries; // Number of entries in array.
157 uint16 wSecurityOffset; // Offset of security info.
158 // The array contains two parts, a set of STRINGBINDINGs
159 // and a set of SECURITYBINDINGs. Each set is terminated by an
160 // extra zero. The shortest array contains four zeros.
161 [size_is(wNumEntries)] uint16 aStringArray[];
165 // signature value for OBJREF (object reference, actually the
166 // marshaled form of a COM interface).
167 const uint32 OBJREF_SIGNATURE = 0x574f454d; // 'MEOW'
169 // flag values for OBJREF
171 OBJREF_STANDARD = 0x1, // standard marshaled objref
172 OBJREF_HANDLER = 0x2, // handler marshaled objref
173 OBJREF_CUSTOM = 0x4 // custom marshaled objref
176 // Flag values for a STDOBJREF (standard part of an OBJREF).
177 // SORF_OXRES1 - SORF_OXRES8 are reserved for the object exporters
178 // use only, object importers must ignore them and must not enforce MBZ.
180 SORF_NULL = 0x0000, // convenient for initializing SORF
181 SORF_OXRES1 = 0x0001, // reserved for exporter
182 SORF_OXRES2 = 0x0020, // reserved for exporter
183 SORF_OXRES3 = 0x0040, // reserved for exporter
184 SORF_OXRES4 = 0x0080, // reserved for exporter
185 SORF_OXRES5 = 0x0100, // reserved for exporter
186 SORF_OXRES6 = 0x0200, // reserved for exporter
187 SORF_OXRES7 = 0x0400, // reserved for exporter
188 SORF_OXRES8 = 0x0800, // reserved for exporter
189 SORF_NOPING = 0x1000 // Pinging is not required
192 // standard object reference
193 typedef [public] struct
195 uint32 flags; // STDOBJREF flags (see above)
196 uint32 cPublicRefs; // count of references passed
197 OXID oxid; // oxid of server with this oid
198 OID oid; // oid of object with this ipid
199 IPID ipid; // ipid of Interface
204 STDOBJREF std; // standard objref
205 DUALSTRINGARRAY saResAddr; // resolver address
210 STDOBJREF std; // standard objref
211 CLSID clsid; // Clsid of handler code
212 DUALSTRINGARRAY saResAddr; // resolver address
217 CLSID clsid; // Clsid of unmarshaling code
218 uint32 cbExtension; // size of extension data
219 uint32 size; // size of data that follows
220 [size_is(size), ref] uint8 *pData; // extension + class specific data
227 [case(OBJREF_STANDARD)] u_standard u_standard;
228 [case(OBJREF_HANDLER)] u_handler u_handler;
229 [case(OBJREF_CUSTOM)] u_custom u_custom;
232 // OBJREF is the format of a marshaled interface pointer.
235 uint32 flags; // OBJREF flags (see above)
236 GUID iid; // interface identifier
237 [switch_is(flags), switch_type(uint32)] OBJREF_Types u_objref;
240 // wire representation of a marshalled interface pointer
241 typedef [public] struct
243 uint32 ulCntData; // size of data
244 [size_is(ulCntData)] uint8 abData[]; // data (OBJREF)
250 uuid(00000000-0000-0000-C000-000000000046)
256 HRESULT QueryInterface([in] IID *riid
257 /*FIXME, [out] void **data*/);
268 //////////////////////////////////////////////////////////////////
270 // The remote version of Iunknown. This interface exists on every
271 // OXID (whether an OXID represents either a thread or a process is
272 // implementation specific). It is used by clients to query for new
273 // interfaces, get additional references (for marshaling), and release
274 // outstanding references.
275 // This interface is passed along during OXID resolution.
278 uuid(00000131-0000-0000-C000-000000000046),
282 interface IRemUnknown : IUnknown
286 HRESULT hResult; // result of call
287 STDOBJREF std; // data for returned interface
291 HRESULT RemQueryInterface (
292 [in] IPID *ripid, // interface to QI on
293 [in] uint32 cRefs, // count of AddRefs requested
294 [in] uint16 cIids, // count of IIDs that follow
296 IID* iids//, // IIDs to QI for
297 /*FIXME: [out, size_is(,cIids)]
298 REMQIRESULT** ppQIResults // results returned*/
302 IPID ipid; // ipid to AddRef/Release
308 [in] uint16 cInterfaceRefs,
309 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
310 [out, size_is(cInterfaceRefs)] HRESULT* pResults
314 [in] uint16 cInterfaceRefs,
315 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
321 // Derived from IRemUnknown, this interface supports Remote Query interface
322 // for objects that supply additional data beyond the STDOBJREF in their
323 // marshaled interface packets.
326 uuid(00000143-0000-0000-C000-000000000046),
330 interface IRemUnknown2 : IRemUnknown
332 HRESULT RemQueryInterface2 (
335 [in, size_is(cIids)] IID *iids,
336 [out, size_is(cIids)] HRESULT *phr,
337 [out, size_is(cIids)] MInterfacePointer *ppMIF[*]
341 [ uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
342 pointer_default(unique)
344 interface IOXIDResolver
346 // Method to get the protocol sequences, string bindings
347 // and machine id for an object server given its OXID.
349 typedef [public] struct {
350 DUALSTRINGARRAY *ppdsaOxidBindings;
351 } ppdsaOxidBindingsArray;
353 [idempotent] WERROR ResolveOxid (
354 [in,ref] policy_handle *hRpc,
356 [in] uint16 cRequestedProtseqs,
357 [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[],
358 [out, ref] ppdsaOxidBindingsArray *ppdsaOxidBindings,
359 [out, ref] IPID *pipidRemUnknown,
360 [out, ref] uint32 *pAuthnHint
363 // Simple ping is used to ping a Set. Client machines use this
364 // to inform the object exporter that it is still using the
365 // members of the set.
366 // Returns S_TRUE if the SetId is known by the object exporter,
368 [idempotent] WERROR SimplePing (
369 [in,ref] policy_handle *hRpc,
370 [in] SETID *pSetId // Must not be zero
373 // Complex ping is used to create sets of OIDs to ping. The
374 // whole set can subsequently be pinged using SimplePing,
375 // thus reducing network traffic.
376 [idempotent] WERROR ComplexPing (
377 [in,ref] policy_handle *hRpc,
378 [in, out] SETID *pSetId, // In of 0 on first call for new set.
379 [in] uint16 SequenceNum,
380 [in] uint16 cAddToSet,
381 [in] uint16 cDelFromSet,
382 // add these OIDs to the set
383 [in, unique, size_is(cAddToSet)] OID AddToSet[],
384 //remove these OIDs from the set
385 [in, unique, size_is(cDelFromSet)] OID DelFromSet[],
386 [out] uint16 *pPingBackoffFactor// 2^factor = multipler
388 // In some cases the client maybe unsure that a particular
389 // binding will reach the server. (For example, when the oxid
390 // bindings have more then one TCP/IP binding) This call
391 // can be used to validate the binding
393 [idempotent] WERROR ServerAlive (
394 [in,ref] policy_handle *hRpc
396 // Method to get the protocol sequences, string bindings,
397 // RemoteUnknown IPID and COM version for an object server
398 // given its OXID. Supported by DCOM
399 // version 5.2 and above.
400 [idempotent] WERROR ResolveOxid2 (
401 [in,ref] policy_handle *hRpc,
403 [in] uint16 cRequestedProtseqs,
404 [in, size_is(cRequestedProtseqs)]
405 uint16 arRequestedProtseqs[],
406 [out, ref] ppdsaOxidBindingsArray *ppdsaOxidBindings,
407 [out, ref] IPID *pipidRemUnknown,
408 [out, ref] uint32 *pAuthnHint,
409 [out, ref] COMVERSION *pComVersion
412 [idempotent] WERROR ServerAlive2 (
413 [out] COMVERSION version,
414 [out] uint8 unknown1[4],
415 [out] DUALSTRINGARRAY dualstring,
416 [out] uint8 unknown2[5]);
421 uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57),
423 pointer_default(unique)
425 interface IRemoteActivation
427 typedef [public] struct {
428 MInterfacePointer *ppInterfaceData;
429 } ppInterfaceDataArray;
431 const uint32 MODE_GET_CLASS_OBJECT = 0xffffffff;
432 HRESULT RemoteActivation (
433 [in,ref] policy_handle *hRpc,
434 [in] ORPCTHIS *ORPCthis,
435 [out] ORPCTHAT *ORPCthat,
437 [in, unique] unistr *pwszObjectName,
438 [in, unique] MInterfacePointer *pObjectStorage,
439 [in] uint32 ClientImpLevel,
441 [in] uint32 Interfaces,
442 [in,unique,size_is(Interfaces)] IID *pIIDs,
443 [in] uint16 cRequestedProtseqs,
444 [in, size_is(cRequestedProtseqs)]
445 uint16 RequestedProtseqs[],
447 [out] ppdsaOxidBindingsArray *ppdsaOxidBindings,
448 [out] IPID *pipidRemUnknown,
449 [out] uint32 *pAuthnHint,
450 [out] COMVERSION *pServerVersion,
452 [out,size_is(Interfaces)] ppInterfaceDataArray *ppInterfaceData,
453 [out,size_is(Interfaces)] HRESULT *pResults
458 /* The Win2k equivalent of IRemoteActivation */
460 uuid(000001a0-0000-0000-c000-000000000046),
463 interface ISystemActivator
468 NTSTATUS isa_Unknown0();
472 NTSTATUS isa_Unknown1();
476 NTSTATUS isa_Unknown2();
480 NTSTATUS isa_Unknown3();
482 // Binding strings and the OBJREF_SIGNATURE in this call
485 NTSTATUS isa_Unknown4();
489 uuid(00000132-0000-0000-C000-000000000046),
491 ] interface IObjServer
493 WERROR IObjServer_Unknown();
497 uuid(00000134-0000-0000-C000-000000000046),
501 WERROR IRunDown_Dummy();
505 // Service COntrol Manager
508 uuid(00000136-0000-0000-C000-000000000046),
510 ] interface ISCMLocalActivator
512 WERROR ISCMLocalActivator();
517 uuid(00020400-0000-0000-C000-000000000046),
519 ] interface IDispatch : IUnknown
523 HRESULT GetTypeInfoCount(
524 [out] uint16 *pctinfo);
528 HRESULT GetTypeInfo (
530 [in] LCID lcid/*FIXME,
531 [out] ITypeInfo **ppTInfo*/);
535 HRESULT GetIDsOfNames(
537 /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
540 [out,size_is(cNames)] DISPID *rgDispId);
559 [in] DISPID dispIdMember,
563 [out,in] DISPPARAMS *pDispParams,
564 [out] VARIANT *pVarResult,
565 [out] EXCEPINFO *pExcepInfo,
566 [out] uint16 *puArgErr);
571 uuid(330E9E75-DF48-11CF-8E2C-00A0C90DC94B),
572 pointer_default(unique)
574 interface IDcomEchoServ : IDispatch
576 HRESULT EchoPlusOne([in] uint32 x, [out] uint32 *y);