2 * Copyright 2003 Ove Kåven, TransGaming Technologies
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 /* see http://www.microsoft.com/msj/0398/dcom.htm */
20 /* and the official DCOM specification
21 * (there's a copy at http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm) */
26 uuid(99fcfe60-5260-101b-bbcb-00aa0021347a),
27 pointer_default(unique)
29 interface ObjectRpcBaseTypes
31 typedef unsigned hyper ID;
38 typedef REFGUID REFIPID;
40 const unsigned short COM_MINOR_VERSION_1 = 1;
41 const unsigned short COM_MINOR_VERSION_2 = 2;
43 const unsigned short COM_MAJOR_VERSION = 5;
44 const unsigned short COM_MINOR_VERSION = 3;
46 typedef struct tagCOMVERSION {
47 unsigned short MajorVersion;
48 unsigned short MinorVersion;
51 const unsigned long ORPCF_NULL = 0;
52 const unsigned long ORPCF_LOCAL = 1;
53 const unsigned long ORPCF_RESERVED1 = 2;
54 const unsigned long ORPCF_RESERVED2 = 4;
55 const unsigned long ORPCF_RESERVED3 = 8;
56 const unsigned long ORPCF_RESERVED4 = 16;
58 typedef struct tagORPC_EXTENT {
61 [size_is((size+7)&~7)] byte data[];
64 typedef struct tagORPC_EXTENT_ARRAY {
66 unsigned long reserved;
67 [size_is((size+1)&~1,), unique] ORPC_EXTENT **extent;
70 typedef struct tagORPCTHIS {
73 unsigned long reserved1;
75 [unique] ORPC_EXTENT_ARRAY *extensions;
78 typedef struct tagORPCTHAT {
80 [unique] ORPC_EXTENT_ARRAY *extensions;
83 const unsigned short NCADG_IP_UDP = 0x08;
84 const unsigned short NCACN_IP_TCP = 0x07;
85 const unsigned short NCADG_IPX = 0x0E;
86 const unsigned short NCACN_SPX = 0x0C;
87 const unsigned short NCACN_NB_NB = 0x12;
88 const unsigned short NCACN_NB_IPX = 0x0D;
89 const unsigned short NCACN_DNET_NSP = 0x04;
90 const unsigned short NCACN_HTTP = 0x1F;
92 typedef struct tagSTRINGBINDING {
93 unsigned short wTowerId;
94 [string] WCHAR aNetworkAddr[];
97 const unsigned short COM_C_AUTHZ_NONE = 0xffff;
99 typedef struct tagSECURITYBINDING {
100 unsigned short wAuthnSvc;
101 unsigned short wAuthzSvc;
102 [string] WCHAR aPrincName[];
105 typedef struct tagDUALSTRINGARRAY {
106 unsigned short wNumEntries;
107 unsigned short wSecurityOffset;
108 [size_is(wNumEntries)] unsigned short aStringArray[];
111 const unsigned long OBJREF_SIGNATURE = 0x574f454d; /* "MEOW" */
112 const unsigned long OBJREF_STANDARD = 0x1;
113 const unsigned long OBJREF_HANDLER = 0x2;
114 const unsigned long OBJREF_CUSTOM = 0x4;
115 const unsigned long SORF_OXRES1 = 0x1;
116 const unsigned long SORF_OXRES2 = 0x20;
117 const unsigned long SORF_OXRES3 = 0x40;
118 const unsigned long SORF_OXRES4 = 0x80;
119 const unsigned long SORF_OXRES5 = 0x100;
120 const unsigned long SORF_OXRES6 = 0x200;
121 const unsigned long SORF_OXRES7 = 0x400;
122 const unsigned long SORF_OXRES8 = 0x800;
123 const unsigned long SORF_NULL = 0x0;
124 const unsigned long SORF_NOPING = 0x1000;
126 typedef struct tagSTDOBJREF {
128 unsigned long cPublicRefs;
134 typedef struct tagOBJREF {
135 unsigned long signature;
138 [switch_is(flags)] union {
139 [case(OBJREF_STANDARD)] struct OR_STANDARD {
141 DUALSTRINGARRAY saResAddr;
143 [case(OBJREF_HANDLER)] struct OR_HANDLER {
146 DUALSTRINGARRAY saResAddr;
148 [case(OBJREF_CUSTOM)] struct OR_CUSTOM {
150 unsigned long cbExtension;
152 [size_is(size), ref] byte *pData;
157 typedef struct tagMInterfacePointer {
159 [size_is(ulCntData)] BYTE abData[];
162 typedef [unique] MInterfacePointer *PMInterfacePointer;
164 } /* interface ObjectRpcBaseTypes */
168 uuid(00000131-0000-0000-C000-000000000046)
170 interface IRemUnknown : IUnknown
172 typedef [unique] IRemUnknown *LPREMUNKNOWN;
174 typedef struct tagREMQIRESULT {
179 typedef struct tagREMINTERFACEREF {
181 unsigned long cPublicRefs;
182 unsigned long cPrivateRefs;
185 HRESULT RemQueryInterface(
187 [in] unsigned long cRefs,
188 [in] unsigned short cIids,
189 [in, size_is(cIids)] IID *iids,
190 [out, size_is(,cIids)] REMQIRESULT **ppQIResults);
193 [in] unsigned short cInterfaceRefs,
194 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs,
195 [out, size_is(cInterfaceRefs)] HRESULT *pResults);
198 [in] unsigned short cInterfaceRefs,
199 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs);
204 uuid(00000142-0000-0000-C000-000000000046)
206 interface IRemUnknown2 : IRemUnknown
208 typedef [unique] IRemUnknown2 *LPREMUNKNOWN2;
210 HRESULT RemQueryInterface2(
212 [in] unsigned short cIids,
213 [in, size_is(cIids)] IID *iids,
214 [out, size_is(cIids)] HRESULT *phr,
215 [out, size_is(cIids)] MInterfacePointer **ppMIF);
220 uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
221 pointer_default(unique)
223 interface IOXIDResolver
225 [idempotent] error_status_t ResolveOxid(
228 [in] unsigned short cRequestedProtseqs,
229 [in, ref, size_is(cRequestedProtseqs)] unsigned short arRequestedProtseqs[],
230 [out, ref] DUALSTRINGARRAY **ppdsaOxidBindings,
231 [out, ref] IPID *pipidRemUnknown,
232 [out, ref] DWORD *pAuthnHint);
234 [idempotent] error_status_t SimplePing(
238 [idempotent] error_status_t ComplexPing(
240 [in, out] SETID *pSetId,
241 [in] unsigned short SequenceNum,
242 [in] unsigned short cAddToSet,
243 [in] unsigned short cDelFromSet,
244 [in, unique, size_is(cAddToSet)] OID AddToSet[],
245 [in, unique, size_is(cDelFromSet)] OID DelFromSet[],
246 [out] unsigned short *pPingBackoffFactor);
248 [idempotent] error_status_t ServerAlive(
251 [idempotent] error_status_t ResolveOxid2(
254 [in] unsigned short cRequestedProtseqs,
255 [in, ref, size_is(cRequestedProtseqs)] unsigned short arRequestedProtseqs[],
256 [out, ref] DUALSTRINGARRAY **ppdsaOxidBindings,
257 [out, ref] IPID *pipidRemUnknown,
258 [out, ref] DWORD *pAuthnHint,
259 [out, ref] COMVERSION *pComVersion);
263 uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57),
264 pointer_default(unique)
266 interface IRemoteActivation
268 const unsigned long MODE_GET_CLASS_OBJECT = 0xffffffff;
270 HRESULT RemoteActivation(
272 [in] ORPCTHIS *ORPCthis,
273 [out] ORPCTHAT *ORPCthat,
275 [in, string, unique] WCHAR *pwszObjectName,
276 [in, unique] MInterfacePointer *pObjectStorage,
277 [in] DWORD ClientImpLevel,
279 [in] DWORD Interfaces,
280 [in, unique, size_is(Interfaces)] IID *pIIDs,
281 [in] unsigned short cRequestedProtseqs,
282 [in, size_is(cRequestedProtseqs)] unsigned short RequestedProtseqs[],
284 [out] DUALSTRINGARRAY **ppdsaOxidBindings,
285 [out] IPID *pipidRemUnknown,
286 [out] DWORD *pAuthnHint,
287 [out] COMVERSION *pServerVersion,
289 [out,size_is(Interfaces)] MInterfacePointer **ppInterfaceData,
290 [out,size_is(Interfaces)] HRESULT *pResults);