7d95f3704c49c94587a87a07858b278d104ed1f4
[reactos.git] / reactos / lib / 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
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) */
22
23 import "unknwn.idl";
24
25 [
26 uuid(99fcfe60-5260-101b-bbcb-00aa0021347a),
27 pointer_default(unique)
28 ]
29 interface ObjectRpcBaseTypes
30 {
31 typedef unsigned hyper ID;
32 typedef ID MID;
33 typedef ID OXID;
34 typedef ID OID;
35 typedef ID SETID;
36 typedef GUID IPID;
37 typedef GUID CID;
38 typedef REFGUID REFIPID;
39
40 const unsigned short COM_MINOR_VERSION_1 = 1;
41 const unsigned short COM_MINOR_VERSION_2 = 2;
42
43 const unsigned short COM_MAJOR_VERSION = 5;
44 const unsigned short COM_MINOR_VERSION = 3;
45
46 typedef struct tagCOMVERSION {
47 unsigned short MajorVersion;
48 unsigned short MinorVersion;
49 } COMVERSION;
50
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;
57
58 typedef struct tagORPC_EXTENT {
59 GUID id;
60 unsigned long size;
61 [size_is((size+7)&~7)] byte data[];
62 } ORPC_EXTENT;
63
64 typedef struct tagORPC_EXTENT_ARRAY {
65 unsigned long size;
66 unsigned long reserved;
67 [size_is((size+1)&~1,), unique] ORPC_EXTENT **extent;
68 } ORPC_EXTENT_ARRAY;
69
70 typedef struct tagORPCTHIS {
71 COMVERSION version;
72 unsigned long flags;
73 unsigned long reserved1;
74 CID cid;
75 [unique] ORPC_EXTENT_ARRAY *extensions;
76 } ORPCTHIS;
77
78 typedef struct tagORPCTHAT {
79 unsigned long flags;
80 [unique] ORPC_EXTENT_ARRAY *extensions;
81 } ORPCTHAT;
82
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;
91
92 typedef struct tagSTRINGBINDING {
93 unsigned short wTowerId;
94 [string] WCHAR aNetworkAddr[];
95 } STRINGBINDING;
96
97 const unsigned short COM_C_AUTHZ_NONE = 0xffff;
98
99 typedef struct tagSECURITYBINDING {
100 unsigned short wAuthnSvc;
101 unsigned short wAuthzSvc;
102 [string] WCHAR aPrincName[];
103 } SECURITYBINDING;
104
105 typedef struct tagDUALSTRINGARRAY {
106 unsigned short wNumEntries;
107 unsigned short wSecurityOffset;
108 [size_is(wNumEntries)] unsigned short aStringArray[];
109 } DUALSTRINGARRAY;
110
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;
125
126 typedef struct tagSTDOBJREF {
127 unsigned long flags;
128 unsigned long cPublicRefs;
129 OXID oxid;
130 OID oid;
131 IPID ipid;
132 } STDOBJREF;
133
134 typedef struct tagOBJREF {
135 unsigned long signature;
136 unsigned long flags;
137 GUID iid;
138 [switch_is(flags)] union {
139 [case(OBJREF_STANDARD)] struct OR_STANDARD {
140 STDOBJREF std;
141 DUALSTRINGARRAY saResAddr;
142 } u_standard;
143 [case(OBJREF_HANDLER)] struct OR_HANDLER {
144 STDOBJREF std;
145 CLSID clsid;
146 DUALSTRINGARRAY saResAddr;
147 } u_handler;
148 [case(OBJREF_CUSTOM)] struct OR_CUSTOM {
149 CLSID clsid;
150 unsigned long cbExtension;
151 unsigned long size;
152 [size_is(size), ref] byte *pData;
153 } u_custom;
154 } u_objref;
155 } OBJREF;
156
157 typedef struct tagMInterfacePointer {
158 ULONG ulCntData;
159 [size_is(ulCntData)] BYTE abData[];
160 } MInterfacePointer;
161
162 typedef [unique] MInterfacePointer *PMInterfacePointer;
163
164 } /* interface ObjectRpcBaseTypes */
165
166 [
167 object,
168 uuid(00000131-0000-0000-C000-000000000046)
169 ]
170 interface IRemUnknown : IUnknown
171 {
172 typedef [unique] IRemUnknown *LPREMUNKNOWN;
173
174 typedef struct tagREMQIRESULT {
175 HRESULT hResult;
176 STDOBJREF std;
177 } REMQIRESULT;
178
179 typedef struct tagREMINTERFACEREF {
180 IPID ipid;
181 unsigned long cPublicRefs;
182 unsigned long cPrivateRefs;
183 } REMINTERFACEREF;
184
185 HRESULT RemQueryInterface(
186 [in] REFIPID ripid,
187 [in] unsigned long cRefs,
188 [in] unsigned short cIids,
189 [in, size_is(cIids)] IID *iids,
190 [out, size_is(,cIids)] REMQIRESULT **ppQIResults);
191
192 HRESULT RemAddRef(
193 [in] unsigned short cInterfaceRefs,
194 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs,
195 [out, size_is(cInterfaceRefs)] HRESULT *pResults);
196
197 HRESULT RemRelease(
198 [in] unsigned short cInterfaceRefs,
199 [in, size_is(cInterfaceRefs)] REMINTERFACEREF* InterfaceRefs);
200 }
201
202 [
203 object,
204 uuid(00000142-0000-0000-C000-000000000046)
205 ]
206 interface IRemUnknown2 : IRemUnknown
207 {
208 typedef [unique] IRemUnknown2 *LPREMUNKNOWN2;
209
210 HRESULT RemQueryInterface2(
211 [in] REFIPID ripid,
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);
216 }
217
218 cpp_quote("#if 0")
219 [
220 uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
221 pointer_default(unique)
222 ]
223 interface IOXIDResolver
224 {
225 [idempotent] error_status_t ResolveOxid(
226 [in] handle_t hRpc,
227 [in] OXID *pOxid,
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);
233
234 [idempotent] error_status_t SimplePing(
235 [in] handle_t hRpc,
236 [in] SETID *pSetId);
237
238 [idempotent] error_status_t ComplexPing(
239 [in] handle_t hRpc,
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);
247
248 [idempotent] error_status_t ServerAlive(
249 [in] handle_t hRpc);
250
251 [idempotent] error_status_t ResolveOxid2(
252 [in] handle_t hRpc,
253 [in] OXID *pOxid,
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);
260 }
261
262 [
263 uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57),
264 pointer_default(unique)
265 ]
266 interface IRemoteActivation
267 {
268 const unsigned long MODE_GET_CLASS_OBJECT = 0xffffffff;
269
270 HRESULT RemoteActivation(
271 [in] handle_t hRpc,
272 [in] ORPCTHIS *ORPCthis,
273 [out] ORPCTHAT *ORPCthat,
274 [in] GUID *Clsid,
275 [in, string, unique] WCHAR *pwszObjectName,
276 [in, unique] MInterfacePointer *pObjectStorage,
277 [in] DWORD ClientImpLevel,
278 [in] DWORD Mode,
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[],
283 [out] OXID *pOxid,
284 [out] DUALSTRINGARRAY **ppdsaOxidBindings,
285 [out] IPID *pipidRemUnknown,
286 [out] DWORD *pAuthnHint,
287 [out] COMVERSION *pServerVersion,
288 [out] HRESULT *phr,
289 [out,size_is(Interfaces)] MInterfacePointer **ppInterfaceData,
290 [out,size_is(Interfaces)] HRESULT *pResults);
291 }
292 cpp_quote("#endif")