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 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 typedef struct tagOXID_INFO
{
116 DUALSTRINGARRAY
*psa
;
119 const unsigned long OBJREF_SIGNATURE
= 0x574f454d; /* "MEOW" */
120 const unsigned long OBJREF_STANDARD
= 0x1;
121 const unsigned long OBJREF_HANDLER
= 0x2;
122 const unsigned long OBJREF_CUSTOM
= 0x4;
123 const unsigned long SORF_OXRES1
= 0x1;
124 const unsigned long SORF_OXRES2
= 0x20;
125 const unsigned long SORF_OXRES3
= 0x40;
126 const unsigned long SORF_OXRES4
= 0x80;
127 const unsigned long SORF_OXRES5
= 0x100;
128 const unsigned long SORF_OXRES6
= 0x200;
129 const unsigned long SORF_OXRES7
= 0x400;
130 const unsigned long SORF_OXRES8
= 0x800;
131 const unsigned long SORF_NULL
= 0x0;
132 const unsigned long SORF_NOPING
= 0x1000;
134 typedef struct tagSTDOBJREF
{
136 unsigned long cPublicRefs
;
142 typedef struct tagOBJREF
{
143 unsigned long signature
;
146 [switch_is(flags
)] union {
147 [case(OBJREF_STANDARD
)] struct OR_STANDARD
{
149 DUALSTRINGARRAY saResAddr
;
151 [case(OBJREF_HANDLER
)] struct OR_HANDLER
{
154 DUALSTRINGARRAY saResAddr
;
156 [case(OBJREF_CUSTOM
)] struct OR_CUSTOM
{
158 unsigned long cbExtension
;
160 [size_is(size
), ref] byte *pData
;
165 typedef struct tagMInterfacePointer
{
167 [size_is(ulCntData
)] BYTE abData
[];
170 typedef [unique] MInterfacePointer
*PMInterfacePointer
;
172 } /* interface ObjectRpcBaseTypes */
176 uuid(00000131-0000-0000-C000
-000000000046)
178 interface IRemUnknown
: IUnknown
180 typedef [unique] IRemUnknown
*LPREMUNKNOWN
;
182 typedef struct tagREMQIRESULT
{
187 typedef struct tagREMINTERFACEREF
{
189 unsigned long cPublicRefs
;
190 unsigned long cPrivateRefs
;
193 HRESULT RemQueryInterface
(
196 [in] unsigned short cIids
,
197 [in, size_is(cIids
)] IID
*iids
,
198 [out, size_is(,cIids
)] REMQIRESULT
**ppQIResults
);
201 [in] unsigned short cInterfaceRefs
,
202 [in, size_is(cInterfaceRefs
)] REMINTERFACEREF
* InterfaceRefs
,
203 [out, size_is(cInterfaceRefs
)] HRESULT *pResults
);
206 [in] unsigned short cInterfaceRefs
,
207 [in, size_is(cInterfaceRefs
)] REMINTERFACEREF
* InterfaceRefs
);
212 uuid(00000142-0000-0000-C000
-000000000046)
214 interface IRemUnknown2
: IRemUnknown
216 typedef [unique] IRemUnknown2
*LPREMUNKNOWN2
;
218 HRESULT RemQueryInterface2
(
220 [in] unsigned short cIids
,
221 [in, size_is(cIids
)] IID
*iids
,
222 [out, size_is(cIids
)] HRESULT *phr
,
223 [out, size_is(cIids
)] MInterfacePointer
**ppMIF
);
227 uuid(99fcfec4
-5260-101b
-bbcb
-00aa0021347a
),
228 pointer_default(unique)
230 interface IOXIDResolver
232 [idempotent
] error_status_t ResolveOxid
(
235 [in] unsigned short cRequestedProtseqs
,
236 [in, ref, size_is(cRequestedProtseqs
)] unsigned short arRequestedProtseqs
[],
237 [out, ref] DUALSTRINGARRAY
**ppdsaOxidBindings
,
238 [out, ref] IPID
*pipidRemUnknown
,
239 [out, ref] DWORD
*pAuthnHint
);
241 [idempotent
] error_status_t SimplePing
(
245 [idempotent
] error_status_t ComplexPing
(
247 [in, out] SETID
*pSetId
,
248 [in] unsigned short SequenceNum
,
249 [in] unsigned short cAddToSet
,
250 [in] unsigned short cDelFromSet
,
251 [in, unique, size_is(cAddToSet
)] OID AddToSet
[],
252 [in, unique, size_is(cDelFromSet
)] OID DelFromSet
[],
253 [out] unsigned short *pPingBackoffFactor
);
255 [idempotent
] error_status_t ServerAlive
(
258 [idempotent
] error_status_t ResolveOxid2
(
261 [in] unsigned short cRequestedProtseqs
,
262 [in, ref, size_is(cRequestedProtseqs
)] unsigned short arRequestedProtseqs
[],
263 [out, ref] DUALSTRINGARRAY
**ppdsaOxidBindings
,
264 [out, ref] IPID
*pipidRemUnknown
,
265 [out, ref] DWORD
*pAuthnHint
,
266 [out, ref] COMVERSION
*pComVersion
);
270 uuid(4d9f4ab8
-7d1c
-11cf
-861e-0020af6e7c57
),
271 pointer_default(unique)
273 interface IRemoteActivation
275 const unsigned long MODE_GET_CLASS_OBJECT
= 0xffffffff;
277 HRESULT RemoteActivation
(
279 [in] ORPCTHIS
*ORPCthis
,
280 [out] ORPCTHAT
*ORPCthat
,
282 [in, string, unique] WCHAR
*pwszObjectName
,
283 [in, unique] MInterfacePointer
*pObjectStorage
,
284 [in] DWORD ClientImpLevel
,
286 [in] DWORD Interfaces
,
287 [in, unique, size_is(Interfaces
)] IID
*pIIDs
,
288 [in] unsigned short cRequestedProtseqs
,
289 [in, size_is(cRequestedProtseqs
)] unsigned short RequestedProtseqs
[],
291 [out] DUALSTRINGARRAY
**ppdsaOxidBindings
,
292 [out] IPID
*pipidRemUnknown
,
293 [out] DWORD
*pAuthnHint
,
294 [out] COMVERSION
*pServerVersion
,
296 [out,size_is(Interfaces
)] MInterfacePointer
**ppInterfaceData
,
297 [out,size_is(Interfaces
)] HRESULT *pResults
);