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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 /* see the official DCOM specification
20 * (there's a copy at http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm) */
25 uuid(99fcfe60-5260-101b-bbcb-00aa0021347a),
26 pointer_default(unique)
28 interface ObjectRpcBaseTypes
30 typedef unsigned hyper ID;
37 typedef REFGUID REFIPID;
39 const unsigned short COM_MINOR_VERSION_1 = 1;
40 const unsigned short COM_MINOR_VERSION_2 = 2;
42 const unsigned short COM_MAJOR_VERSION = 5;
43 const unsigned short COM_MINOR_VERSION = 3;
45 typedef struct tagCOMVERSION {
46 unsigned short MajorVersion;
47 unsigned short MinorVersion;
50 const unsigned long ORPCF_NULL = 0;
51 const unsigned long ORPCF_LOCAL = 1;
52 const unsigned long ORPCF_RESERVED1 = 2;
53 const unsigned long ORPCF_RESERVED2 = 4;
54 const unsigned long ORPCF_RESERVED3 = 8;
55 const unsigned long ORPCF_RESERVED4 = 16;
57 typedef struct tagORPC_EXTENT {
60 [size_is((size+7)&~7)] byte data[];
63 typedef struct tagORPC_EXTENT_ARRAY {
65 unsigned long reserved;
66 [size_is((size+1)&~1,), unique] ORPC_EXTENT **extent;
69 typedef struct tagORPCTHIS {
72 unsigned long reserved1;
74 [unique] ORPC_EXTENT_ARRAY *extensions;
77 typedef struct tagORPCTHAT {
79 [unique] ORPC_EXTENT_ARRAY *extensions;
82 const unsigned short NCADG_IP_UDP = 0x08;
83 const unsigned short NCACN_IP_TCP = 0x07;
84 const unsigned short NCADG_IPX = 0x0E;
85 const unsigned short NCACN_SPX = 0x0C;
86 const unsigned short NCACN_NB_NB = 0x12;
87 const unsigned short NCACN_NB_IPX = 0x0D;
88 const unsigned short NCACN_DNET_NSP = 0x04;
89 const unsigned short NCACN_HTTP = 0x1F;
91 typedef struct tagSTRINGBINDING {
92 unsigned short wTowerId;
93 [string] WCHAR aNetworkAddr[];
96 const unsigned short COM_C_AUTHZ_NONE = 0xffff;
98 typedef struct tagSECURITYBINDING {
99 unsigned short wAuthnSvc;
100 unsigned short wAuthzSvc;
101 [string] WCHAR aPrincName[];
104 typedef struct tagDUALSTRINGARRAY {
105 unsigned short wNumEntries;
106 unsigned short wSecurityOffset;
107 [size_is(wNumEntries)] unsigned short aStringArray[];
110 typedef struct tagOXID_INFO {
115 DUALSTRINGARRAY *psa;
118 const unsigned long OBJREF_SIGNATURE = 0x574f454d; /* "MEOW" */
119 const unsigned long OBJREF_STANDARD = 0x1;
120 const unsigned long OBJREF_HANDLER = 0x2;
121 const unsigned long OBJREF_CUSTOM = 0x4;
122 const unsigned long SORF_OXRES1 = 0x1;
123 const unsigned long SORF_OXRES2 = 0x20;
124 const unsigned long SORF_OXRES3 = 0x40;
125 const unsigned long SORF_OXRES4 = 0x80;
126 const unsigned long SORF_OXRES5 = 0x100;
127 const unsigned long SORF_OXRES6 = 0x200;
128 const unsigned long SORF_OXRES7 = 0x400;
129 const unsigned long SORF_OXRES8 = 0x800;
130 const unsigned long SORF_NULL = 0x0;
131 const unsigned long SORF_NOPING = 0x1000;
133 typedef struct tagSTDOBJREF {
135 unsigned long cPublicRefs;
141 typedef struct tagOBJREF {
142 unsigned long signature;
145 [switch_is(flags)] union {
146 [case(OBJREF_STANDARD)] struct OR_STANDARD {
148 DUALSTRINGARRAY saResAddr;
150 [case(OBJREF_HANDLER)] struct OR_HANDLER {
153 DUALSTRINGARRAY saResAddr;
155 [case(OBJREF_CUSTOM)] struct OR_CUSTOM {
157 unsigned long cbExtension;
159 [size_is(size), ref] byte *pData;
164 typedef struct tagMInterfacePointer {
166 [size_is(ulCntData)] BYTE abData[];
169 typedef [unique] MInterfacePointer *PMInterfacePointer;
171 } /* interface ObjectRpcBaseTypes */
175 uuid(00000131-0000-0000-C000-000000000046)
177 interface IRemUnknown : IUnknown
179 typedef [unique] IRemUnknown *LPREMUNKNOWN;
181 typedef struct tagREMQIRESULT {
186 typedef struct tagREMINTERFACEREF {
188 unsigned long cPublicRefs;
189 unsigned long cPrivateRefs;
192 HRESULT RemQueryInterface(
195 [in] unsigned short cIids,
196 [in, size_is(cIids)] IID *iids,
197 [out, size_is(,cIids)] REMQIRESULT **ppQIResults);
200 [in] unsigned short cInterfaceRefs,
201 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs,
202 [out, size_is(cInterfaceRefs)] HRESULT *pResults);
205 [in] unsigned short cInterfaceRefs,
206 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs);
211 uuid(00000142-0000-0000-C000-000000000046)
213 interface IRemUnknown2 : IRemUnknown
215 typedef [unique] IRemUnknown2 *LPREMUNKNOWN2;
217 HRESULT RemQueryInterface2(
219 [in] unsigned short cIids,
220 [in, size_is(cIids)] IID *iids,
221 [out, size_is(cIids)] HRESULT *phr,
222 [out, size_is(cIids)] MInterfacePointer **ppMIF);
226 uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
227 pointer_default(unique)
229 interface IOXIDResolver
231 [idempotent] error_status_t ResolveOxid(
234 [in] unsigned short cRequestedProtseqs,
235 [in, ref, size_is(cRequestedProtseqs)] unsigned short arRequestedProtseqs[],
236 [out, ref] DUALSTRINGARRAY **ppdsaOxidBindings,
237 [out, ref] IPID *pipidRemUnknown,
238 [out, ref] DWORD *pAuthnHint);
240 [idempotent] error_status_t SimplePing(
244 [idempotent] error_status_t ComplexPing(
246 [in, out] SETID *pSetId,
247 [in] unsigned short SequenceNum,
248 [in] unsigned short cAddToSet,
249 [in] unsigned short cDelFromSet,
250 [in, unique, size_is(cAddToSet)] OID AddToSet[],
251 [in, unique, size_is(cDelFromSet)] OID DelFromSet[],
252 [out] unsigned short *pPingBackoffFactor);
254 [idempotent] error_status_t ServerAlive(
257 [idempotent] error_status_t ResolveOxid2(
260 [in] unsigned short cRequestedProtseqs,
261 [in, ref, size_is(cRequestedProtseqs)] unsigned short arRequestedProtseqs[],
262 [out, ref] DUALSTRINGARRAY **ppdsaOxidBindings,
263 [out, ref] IPID *pipidRemUnknown,
264 [out, ref] DWORD *pAuthnHint,
265 [out, ref] COMVERSION *pComVersion);
269 uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57),
270 pointer_default(unique)
272 interface IRemoteActivation
274 const unsigned long MODE_GET_CLASS_OBJECT = 0xffffffff;
276 HRESULT RemoteActivation(
278 [in] ORPCTHIS *ORPCthis,
279 [out] ORPCTHAT *ORPCthat,
281 [in, string, unique] WCHAR *pwszObjectName,
282 [in, unique] MInterfacePointer *pObjectStorage,
283 [in] DWORD ClientImpLevel,
285 [in] DWORD Interfaces,
286 [in, unique, size_is(Interfaces)] IID *pIIDs,
287 [in] unsigned short cRequestedProtseqs,
288 [in, size_is(cRequestedProtseqs)] unsigned short RequestedProtseqs[],
290 [out] DUALSTRINGARRAY **ppdsaOxidBindings,
291 [out] IPID *pipidRemUnknown,
292 [out] DWORD *pAuthnHint,
293 [out] COMVERSION *pServerVersion,
295 [out,size_is(Interfaces)] MInterfacePointer **ppInterfaceData,
296 [out,size_is(Interfaces)] HRESULT *pResults);