7b828ddf1cb8d0cb1a06a2fe1ee4d9afb76eb9a3
[reactos.git] / reactos / dll / win32 / ole32 / dcom.idl
1 /*
2 * Copyright 2003 Ove Kåven, TransGaming Technologies
3 *
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.
8 *
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.
13 *
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
17 */
18
19 /* see the official DCOM specification
20 * (there's a copy at http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm) */
21
22 import "unknwn.idl";
23
24 #ifdef __WIDL__
25 [
26 threading(both),
27 uuid(00000320-0000-0000-c000-000000000046)
28 ]
29 coclass PSFactoryBuffer { interface IFactoryBuffer; }
30 #endif
31
32 [
33 uuid(99fcfe60-5260-101b-bbcb-00aa0021347a),
34 pointer_default(unique)
35 ]
36 interface ObjectRpcBaseTypes
37 {
38 typedef unsigned hyper ID;
39 typedef ID MID;
40 typedef ID OXID;
41 typedef ID OID;
42 typedef ID SETID;
43 typedef GUID IPID;
44 typedef GUID CID;
45 typedef REFGUID REFIPID;
46
47 const unsigned short COM_MINOR_VERSION_1 = 1;
48 const unsigned short COM_MINOR_VERSION_2 = 2;
49
50 const unsigned short COM_MAJOR_VERSION = 5;
51 const unsigned short COM_MINOR_VERSION = 3;
52
53 typedef struct tagCOMVERSION {
54 unsigned short MajorVersion;
55 unsigned short MinorVersion;
56 } COMVERSION;
57
58 const unsigned long ORPCF_NULL = 0;
59 const unsigned long ORPCF_LOCAL = 1;
60 const unsigned long ORPCF_RESERVED1 = 2;
61 const unsigned long ORPCF_RESERVED2 = 4;
62 const unsigned long ORPCF_RESERVED3 = 8;
63 const unsigned long ORPCF_RESERVED4 = 16;
64
65 typedef struct tagORPC_EXTENT {
66 GUID id;
67 unsigned long size;
68 [size_is((size+7)&~7)] byte data[];
69 } ORPC_EXTENT;
70
71 typedef struct tagORPC_EXTENT_ARRAY {
72 unsigned long size;
73 unsigned long reserved;
74 [size_is((size+1)&~1,), unique] ORPC_EXTENT **extent;
75 } ORPC_EXTENT_ARRAY;
76
77 typedef struct tagORPCTHIS {
78 COMVERSION version;
79 unsigned long flags;
80 unsigned long reserved1;
81 CID cid;
82 [unique] ORPC_EXTENT_ARRAY *extensions;
83 } ORPCTHIS;
84
85 typedef struct tagORPCTHAT {
86 unsigned long flags;
87 [unique] ORPC_EXTENT_ARRAY *extensions;
88 } ORPCTHAT;
89
90 const unsigned short NCADG_IP_UDP = 0x08;
91 const unsigned short NCACN_IP_TCP = 0x07;
92 const unsigned short NCADG_IPX = 0x0E;
93 const unsigned short NCACN_SPX = 0x0C;
94 const unsigned short NCACN_NB_NB = 0x12;
95 const unsigned short NCACN_NB_IPX = 0x0D;
96 const unsigned short NCACN_DNET_NSP = 0x04;
97 const unsigned short NCACN_HTTP = 0x1F;
98
99 typedef struct tagSTRINGBINDING {
100 unsigned short wTowerId;
101 [string] WCHAR aNetworkAddr[];
102 } STRINGBINDING;
103
104 const unsigned short COM_C_AUTHZ_NONE = 0xffff;
105
106 typedef struct tagSECURITYBINDING {
107 unsigned short wAuthnSvc;
108 unsigned short wAuthzSvc;
109 [string] WCHAR aPrincName[];
110 } SECURITYBINDING;
111
112 typedef struct tagDUALSTRINGARRAY {
113 unsigned short wNumEntries;
114 unsigned short wSecurityOffset;
115 [size_is(wNumEntries)] unsigned short aStringArray[];
116 } DUALSTRINGARRAY;
117
118 typedef struct tagOXID_INFO {
119 DWORD dwTid;
120 DWORD dwPid;
121 IPID ipidRemUnknown;
122 DWORD dwAuthnHint;
123 DUALSTRINGARRAY *psa;
124 } OXID_INFO;
125
126 const unsigned long OBJREF_SIGNATURE = 0x574f454d; /* "MEOW" */
127 const unsigned long OBJREF_STANDARD = 0x1;
128 const unsigned long OBJREF_HANDLER = 0x2;
129 const unsigned long OBJREF_CUSTOM = 0x4;
130 const unsigned long SORF_OXRES1 = 0x1;
131 const unsigned long SORF_OXRES2 = 0x20;
132 const unsigned long SORF_OXRES3 = 0x40;
133 const unsigned long SORF_OXRES4 = 0x80;
134 const unsigned long SORF_OXRES5 = 0x100;
135 const unsigned long SORF_OXRES6 = 0x200;
136 const unsigned long SORF_OXRES7 = 0x400;
137 const unsigned long SORF_OXRES8 = 0x800;
138 const unsigned long SORF_NULL = 0x0;
139 const unsigned long SORF_NOPING = 0x1000;
140
141 typedef struct tagSTDOBJREF {
142 unsigned long flags;
143 unsigned long cPublicRefs;
144 OXID oxid;
145 OID oid;
146 IPID ipid;
147 } STDOBJREF;
148
149 typedef struct tagOBJREF {
150 unsigned long signature;
151 unsigned long flags;
152 GUID iid;
153 [switch_is(flags)] union {
154 [case(OBJREF_STANDARD)] struct OR_STANDARD {
155 STDOBJREF std;
156 DUALSTRINGARRAY saResAddr;
157 } u_standard;
158 [case(OBJREF_HANDLER)] struct OR_HANDLER {
159 STDOBJREF std;
160 CLSID clsid;
161 DUALSTRINGARRAY saResAddr;
162 } u_handler;
163 [case(OBJREF_CUSTOM)] struct OR_CUSTOM {
164 CLSID clsid;
165 unsigned long cbExtension;
166 ULONG size;
167 [size_is(size), ref] byte *pData;
168 } u_custom;
169 } u_objref;
170 } OBJREF;
171
172 typedef struct tagMInterfacePointer {
173 ULONG ulCntData;
174 [size_is(ulCntData)] BYTE abData[];
175 } MInterfacePointer;
176
177 typedef [unique] MInterfacePointer *PMInterfacePointer;
178
179 } /* interface ObjectRpcBaseTypes */
180
181 [
182 object,
183 uuid(00000131-0000-0000-C000-000000000046)
184 ]
185 interface IRemUnknown : IUnknown
186 {
187 typedef [unique] IRemUnknown *LPREMUNKNOWN;
188
189 typedef struct tagREMQIRESULT {
190 HRESULT hResult;
191 STDOBJREF std;
192 } REMQIRESULT;
193
194 typedef struct tagREMINTERFACEREF {
195 IPID ipid;
196 unsigned long cPublicRefs;
197 unsigned long cPrivateRefs;
198 } REMINTERFACEREF;
199
200 HRESULT RemQueryInterface(
201 [in] REFIPID ripid,
202 [in] ULONG cRefs,
203 [in] unsigned short cIids,
204 [in, size_is(cIids)] IID *iids,
205 [out, size_is(,cIids)] REMQIRESULT **ppQIResults);
206
207 HRESULT RemAddRef(
208 [in] unsigned short cInterfaceRefs,
209 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs,
210 [out, size_is(cInterfaceRefs)] HRESULT *pResults);
211
212 HRESULT RemRelease(
213 [in] unsigned short cInterfaceRefs,
214 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs);
215 }
216
217 [
218 object,
219 uuid(00000142-0000-0000-C000-000000000046)
220 ]
221 interface IRemUnknown2 : IRemUnknown
222 {
223 typedef [unique] IRemUnknown2 *LPREMUNKNOWN2;
224
225 HRESULT RemQueryInterface2(
226 [in] REFIPID ripid,
227 [in] unsigned short cIids,
228 [in, size_is(cIids)] IID *iids,
229 [out, size_is(cIids)] HRESULT *phr,
230 [out, size_is(cIids)] MInterfacePointer **ppMIF);
231 }
232
233 [
234 uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
235 pointer_default(unique)
236 ]
237 interface IOXIDResolver
238 {
239 [idempotent] error_status_t ResolveOxid(
240 [in] handle_t hRpc,
241 [in] OXID *pOxid,
242 [in] unsigned short cRequestedProtseqs,
243 [in, ref, size_is(cRequestedProtseqs)] unsigned short arRequestedProtseqs[],
244 [out, ref] DUALSTRINGARRAY **ppdsaOxidBindings,
245 [out, ref] IPID *pipidRemUnknown,
246 [out, ref] DWORD *pAuthnHint);
247
248 [idempotent] error_status_t SimplePing(
249 [in] handle_t hRpc,
250 [in] SETID *pSetId);
251
252 [idempotent] error_status_t ComplexPing(
253 [in] handle_t hRpc,
254 [in, out] SETID *pSetId,
255 [in] unsigned short SequenceNum,
256 [in] unsigned short cAddToSet,
257 [in] unsigned short cDelFromSet,
258 [in, unique, size_is(cAddToSet)] OID AddToSet[],
259 [in, unique, size_is(cDelFromSet)] OID DelFromSet[],
260 [out] unsigned short *pPingBackoffFactor);
261
262 [idempotent] error_status_t ServerAlive(
263 [in] handle_t hRpc);
264
265 [idempotent] error_status_t ResolveOxid2(
266 [in] handle_t hRpc,
267 [in] OXID *pOxid,
268 [in] unsigned short cRequestedProtseqs,
269 [in, ref, size_is(cRequestedProtseqs)] unsigned short arRequestedProtseqs[],
270 [out, ref] DUALSTRINGARRAY **ppdsaOxidBindings,
271 [out, ref] IPID *pipidRemUnknown,
272 [out, ref] DWORD *pAuthnHint,
273 [out, ref] COMVERSION *pComVersion);
274 }
275
276 [
277 uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57),
278 pointer_default(unique)
279 ]
280 interface IRemoteActivation
281 {
282 const unsigned long MODE_GET_CLASS_OBJECT = 0xffffffff;
283
284 HRESULT RemoteActivation(
285 [in] handle_t hRpc,
286 [in] ORPCTHIS *ORPCthis,
287 [out] ORPCTHAT *ORPCthat,
288 [in] GUID *Clsid,
289 [in, string, unique] WCHAR *pwszObjectName,
290 [in, unique] MInterfacePointer *pObjectStorage,
291 [in] DWORD ClientImpLevel,
292 [in] DWORD Mode,
293 [in] DWORD Interfaces,
294 [in, unique, size_is(Interfaces)] IID *pIIDs,
295 [in] unsigned short cRequestedProtseqs,
296 [in, size_is(cRequestedProtseqs)] unsigned short RequestedProtseqs[],
297 [out] OXID *pOxid,
298 [out] DUALSTRINGARRAY **ppdsaOxidBindings,
299 [out] IPID *pipidRemUnknown,
300 [out] DWORD *pAuthnHint,
301 [out] COMVERSION *pServerVersion,
302 [out] HRESULT *phr,
303 [out,size_is(Interfaces)] MInterfacePointer **ppInterfaceData,
304 [out,size_is(Interfaces)] HRESULT *pResults);
305 }