5 http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
11 uuid("18f70770-8e64-11cf-9af1-0020af6e72f4"),
13 ] interface dcom_Unknown
15 void dcomu_UseProtSeq();
16 void dcomu_GetCustomProtseqInfo();
17 void dcomu_UpdateResolverBindings();
21 uuid("99fcfe60-5260-101b-bbcb-00aa0021347a"),
22 pointer_default(unique)
24 interface ObjectRpcBaseTypes
28 /* Machine Identifier */
31 /* Object Exporter Identifier */
34 /* Object Identifer */
37 /* Interface Pointer Identifier */
40 /* Causality Identifier */
43 /* Interface identifier */
50 /*//////////////////////////////////////////////////////////////// */
51 /* ORPC Call Packet Format */
52 /*//////////////////////////////////////////////////////////////// */
53 /* COM_MINOR_VERSION = 1 (NT4.0, SP1, SP2, DCOM95). */
54 /* - Initial Release */
55 /* - Must be used when talking to downlevel machines, including */
56 /* on Remote Activation calls. */
57 /* COM_MINOR_VERSION = 2 (NT4.0 SP3 and beyond). */
58 /* - Added ResolveOxid2 to IObjectExporter to retrieve the */
59 /* COM version number of the server. Passed to the NDR engine */
60 /* to fix fatal endian-ness flaw in the way OLEAUTOMATION marshals */
61 /* BSTRS. Previous way used trailing padding, which is not NDR */
62 /* compatible. See Bug# 69189. */
63 /* COM_MINOR_VERSION = 3 (NT4.0 SP4 and DCOM95 builds 1018 and beyond) */
64 /* - OLEAUT32 added two new types to the SAFEARRAY, but SAFEARRAY */
65 /* previously included the "default" keyword, which prevented */
66 /* downlevel NDR engines from correctly handling any extensions. */
67 /* Machines with version >=5.3 don't use "default" and will */
68 /* gracefully handle future extensions to SAFEARRAY. */
69 /* old constants (for convenience) */
72 const uint16 COM_MAJOR_VERSION = 5;
73 const uint16 COM_MINOR_VERSION = 6;
76 const string dcom_ext_debugging = "f1f19680-4d2a-11ce-a66a-0020af6e72f4";
77 const string dcom_ext_extended_error = "f1f19681-4d2a-11ce-a66a-0020af6e72f4";
79 /* Component Object Model version number */
81 typedef [public] struct
83 uint16 MajorVersion; /* Major version number */
84 uint16 MinorVersion; /* Minor version number */
87 typedef [public] struct
93 typedef [public] struct
98 /* enumeration of additional information present in the call packet. */
99 /* Should be an enum but DCE IDL does not support sparse enumerators. */
101 ORPCF_NULL = 0, /* no additional info in packet */
102 ORPCF_LOCAL = 1, /* call is local to this machine */
103 ORPCF_RESERVED1 = 2, /* reserved for local use */
104 ORPCF_RESERVED2 = 4, /* reserved for local use */
105 ORPCF_RESERVED3 = 8, /* reserved for local use */
106 ORPCF_RESERVED4 = 16 /* reserved for local use */
109 /* Extension to implicit parameters. */
110 typedef [public] struct
112 GUID id; /* Extension identifier. */
113 uint32 size; /* Extension size. */
114 /*FIXME[size_is((size+7)&~7)] uint8 data[]; // Extension data. */
115 [size_is(size)] uint8 data[];
119 /* Array of extensions. */
122 uint32 size; /* Num extents. */
123 uint32 reserved; /* Must be zero. */
124 /*FIXME[size_is((size+1)&~1,), unique] ORPC_EXTENT **extent; // extents */
125 [size_is(size),unique] ORPC_EXTENT extent[];
129 /* implicit 'this' pointer which is the first [in] parameter on */
130 /* every ORPC call. */
131 typedef [public] struct
133 COMVERSION version; /* COM version number */
134 uint32 flags; /* ORPCF flags for presence of other data */
135 uint32 reserved1; /* set to zero */
136 CID cid; /* causality id of caller */
138 [unique] ORPC_EXTENT_ARRAY *extensions;
142 /* implicit 'that' pointer which is the first [out] parameter on */
143 /* every ORPC call. */
144 typedef [public] struct
146 uint32 flags; /* ORPCF flags for presence of other data */
148 [unique] ORPC_EXTENT_ARRAY *extensions;
152 /* DUALSTRINGARRAYS are the return type for arrays of network addresses, */
153 /* arrays of endpoints and arrays of both used in many ORPC interfaces */
154 typedef [public] struct
156 uint16 wTowerId; /* Cannot be zero. */
161 const uint16 COM_C_AUTHZ_NONE = 0xffff;
162 typedef [public] struct
164 uint16 wAuthnSvc; /* Cannot be zero. */
165 uint16 wAuthzSvc; /* Must not be zero. */
170 typedef [public] struct
172 uint16 wNumEntries; /* Number of entries in array. */
173 uint16 wSecurityOffset; /* Offset of security info. */
174 /* The array contains two parts, a set of STRINGBINDINGs */
175 /* and a set of SECURITYBINDINGs. Each set is terminated by an */
176 /* extra zero. The shortest array contains four zeros. */
177 [size_is(wNumEntries)] uint16 aStringArray[];
180 /* signature value for OBJREF (object reference, actually the */
181 /* marshaled form of a COM interface). */
182 const uint32 OBJREF_SIGNATURE = 0x574f454d; /* 'MEOW' */
184 /* flag values for OBJREF */
186 OBJREF_NULL = 0x0, /* NULL pointer */
187 OBJREF_STANDARD = 0x1, /* standard marshaled objref */
188 OBJREF_HANDLER = 0x2, /* handler marshaled objref */
189 OBJREF_CUSTOM = 0x4 /* custom marshaled objref */
192 /* Flag values for a STDOBJREF (standard part of an OBJREF). */
193 /* SORF_OXRES1 - SORF_OXRES8 are reserved for the object exporters */
194 /* use only, object importers must ignore them and must not enforce MBZ. */
196 SORF_NULL = 0x0000, /* convenient for initializing SORF */
197 SORF_OXRES1 = 0x0001, /* reserved for exporter */
198 SORF_OXRES2 = 0x0020, /* reserved for exporter */
199 SORF_OXRES3 = 0x0040, /* reserved for exporter */
200 SORF_OXRES4 = 0x0080, /* reserved for exporter */
201 SORF_OXRES5 = 0x0100, /* reserved for exporter */
202 SORF_OXRES6 = 0x0200, /* reserved for exporter */
203 SORF_OXRES7 = 0x0400, /* reserved for exporter */
204 SORF_OXRES8 = 0x0800, /* reserved for exporter */
205 SORF_NOPING = 0x1000 /* Pinging is not required */
208 /* standard object reference */
209 typedef [public] struct
211 uint32 flags; /* STDOBJREF flags (see above) */
212 uint32 cPublicRefs; /* count of references passed */
213 OXID oxid; /* oxid of server with this oid */
214 OID oid; /* oid of object with this ipid */
215 IPID ipid; /* ipid of Interface */
220 STDOBJREF std; /* standard objref */
221 [flag(NDR_REMAINING)] DATA_BLOB saResAddr; /* resolver address */
226 STDOBJREF std; /* standard objref */
227 GUID clsid; /* Clsid of handler code */
228 [flag(NDR_REMAINING)] DATA_BLOB saResAddr; /* resolver address */
233 GUID clsid; /* Clsid of unmarshaling code */
234 uint32 cbExtension; /* size of extension data */
235 uint32 size; /* size of data that follows */
236 [size_is(size)] uint8 pData[]; /* extension + class specific data */
243 typedef [nodiscriminant] union
245 [case(OBJREF_NULL)] u_null u_null;
246 [case(OBJREF_STANDARD)] u_standard u_standard;
247 [case(OBJREF_HANDLER)] u_handler u_handler;
248 [case(OBJREF_CUSTOM)] u_custom u_custom;
251 /* OBJREF is the format of a marshaled interface pointer. */
252 typedef [public] struct
255 uint32 flags; /* OBJREF flags (see above) */
256 GUID iid; /* interface identifier */
257 [switch_is(flags), switch_type(uint32)] OBJREF_Types u_objref;
260 /* wire representation of a marshalled interface pointer */
261 typedef [public] struct
264 [subcontext(4),align(4)] OBJREF obj;
271 uuid("00000000-0000-0000-C000-000000000046"),
272 helpstring("Base interface for all COM interfaces")
278 /* Returns the interface with the specified IID
279 if implemented by this object */
280 [local] WERROR IUnknown_QueryInterface([in] IID *riid,
281 [out,iid_is(riid)] MInterfacePointer *data);
285 [local] uint32 IUnknown_AddRef();
289 [local] uint32 IUnknown_Release();
295 uuid("00000001-0000-0000-C000-000000000046"),
296 pointer_default(unique)
297 ] interface IClassFactory : IUnknown
299 [local] WERROR CreateInstance(/*FIXME[in] IUnknown *pUnknown*/,
301 [out, iid_is(riid)] MInterfacePointer *ppv);
303 [call_as(CreateInstance)] WERROR RemoteCreateInstance();
305 /* Set lock to TRUE when you want to do a lock
306 and set it to FALSE when you want to unlock */
307 [local] WERROR LockServer([in] uint8 lock);
309 [call_as(LockServer)] WERROR RemoteLockServer();
312 /*//////////////////////////////////////////////////////////////// */
314 /* The remote version of IUnknown. This interface exists on every */
315 /* OXID (whether an OXID represents either a thread or a process is */
316 /* implementation specific). It is used by clients to query for new */
317 /* interfaces, get additional references (for marshaling), and release */
318 /* outstanding references. */
319 /* This interface is passed along during OXID resolution. */
322 uuid("00000131-0000-0000-C000-000000000046"),
324 helpstring("Remote version of IUnknown")
326 interface IRemUnknown : IUnknown
328 typedef [public] struct
330 WERROR hResult; /* result of call */
331 STDOBJREF std; /* data for returned interface */
335 [call_as(QueryInterface)] WERROR RemQueryInterface (
336 [in] IPID *ripid, /* interface to QI on */
337 [in] uint32 cRefs, /* count of AddRefs requested */
338 [in] uint16 cIids, /* count of IIDs that follow */
339 [in, size_is(cIids)] IID* iids, /*, // IIDs to QI for */
340 [out, size_is(cIids)] MInterfacePointer *ip
345 IPID ipid; /* ipid to AddRef/Release */
350 [call_as(AddRef)] WERROR RemAddRef (
351 [in] uint16 cInterfaceRefs,
352 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
353 [out, size_is(cInterfaceRefs)] WERROR* pResults
356 [call_as(Release)] WERROR RemRelease (
357 [in] uint16 cInterfaceRefs,
358 [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
363 uuid("00000140-0000-0000-c000-000000000046"),
365 ] interface IClassActivator : IUnknown
367 void GetClassObject([in] GUID clsid,
371 [out, iid_is(iid)] MInterfacePointer data);
375 uuid("00000136-0000-0000-c000-000000000046"),
377 ] interface ISCMLocalActivator : IClassActivator
379 WERROR ISCMLocalActivator_CreateInstance( );
382 /* Looks like this is the equivalent of .NET's
383 System.Activator class */
385 uuid("000001a0-0000-0000-c000-000000000046"),
388 interface ISystemActivator : IClassActivator
390 WERROR ISystemActivatorRemoteCreateInstance([in] HYPER_T unknown1, /* OXID ? */
391 [in] MInterfacePointer iface,
392 [in] HYPER_T unknown2,
393 [out] uint32 unknown3,
394 [out] MInterfacePointer iface);
399 /* Derived from IRemUnknown, this interface supports Remote Query interface */
400 /* for objects that supply additional data beyond the STDOBJREF in their */
401 /* marshaled interface packets. */
404 uuid("00000143-0000-0000-C000-000000000046")
407 interface IRemUnknown2 : IRemUnknown
409 [call_as(QueryInterface2)] WERROR RemQueryInterface2 (
412 [in, size_is(cIids)] IID *iids,
413 [out, size_is(cIids)] WERROR *phr,
414 [out, size_is(cIids)] MInterfacePointer *ppMIF
420 uuid("00000136-0000-0000-C000-000000000046")
421 ] interface ISCMActivator : IClassActivator
423 WERROR SCMActivator_CreateInstance();
428 uuid("00020400-0000-0000-C000-000000000046")
429 ] interface IDispatch : IUnknown
433 WERROR GetTypeInfoCount(
434 [out] uint16 *pctinfo);
444 [out] REF_ITypeInfo *ppTInfo);
448 WERROR GetIDsOfNames(
450 /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
453 [out,size_is(cNames)] DISPID *rgDispId);
472 [in] DISPID dispIdMember,
476 [out,in] DISPPARAMS *pDispParams,
477 [out] VARIANT *pVarResult,
478 [out] EXCEPINFO *pExcepInfo,
479 [out] uint16 *puArgErr);
485 uuid("00000003-0000-0000-C000-000000000046")
486 ] interface IMarshal : IUnknown
488 WERROR MarshalInterface();
489 WERROR UnMarshalInterface();
493 uuid(DB7C21F8-FE33-4C11-AEA5-CEB56F076FBB),
494 helpstring("CoffeeMachine Class")
495 ] coclass CoffeeMachine
498 uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
499 helpstring("ICoffeeMachine Interface"),
500 pointer_default(unique)
503 interface ICoffeeMachine : IUnknown
505 [helpstring("method MakeCoffee")] HRESULT MakeCoffee(BSTR *flavor);
511 uuid("0000000C-0000-0000-C000-000000000046"),
514 interface IStream : IUnknown
516 WERROR IStream_Read([in] uint32 num_requested,
517 [out,size_is(*num_read)] uint8 *data,
518 [out] uint32 *num_read);
520 WERROR IStream_Write([in,size_is(num_requested)] uint8 *data,
521 [in] uint32 num_requested,
522 [out] uint32 *num_written);