summaryrefslogtreecommitdiff
path: root/librpc/idl/dcom.idl
blob: e53d7b8f81147029156272cef81cac6dda50b6f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
/**
  DCOM interfaces
  http://www.ietf.org/internet-drafts/draft-brown-dcom-v1-spec-04.txt
 */

import "misc.idl";

[
	uuid("18f70770-8e64-11cf-9af1-0020af6e72f4"),
	pointer_default(unique),
	version(0.0)
] interface dcom_Unknown
{
	void UseProtSeq();
	void GetCustomProtseqInfo();
	void UpdateResolverBindings();
}

[
	object,
	uuid("00000000-0000-0000-C000-000000000046"),
	pointer_default(unique),
	helpstring("Base interface for all COM interfaces")
]
interface IUnknown
{
	/*****************/
	/* Function 0x00 */
	/* Returns the interface with the specified IID
	   if implemented by this object */
	[local] WERROR QueryInterface(
		[in,unique] GUID *iid,
		[out,iid_is(riid)] IUnknown **data
		);

	/*****************/
	/* Function 0x01 */
	[local] uint32 AddRef();

	/*****************/
	/* Function 0x02 */
	[local] uint32 Release();
}


[
	object,
	uuid("00000001-0000-0000-C000-000000000046"),
	pointer_default(unique)
] interface IClassFactory : IUnknown
{
	[local] WERROR CreateInstance(
		[in,unique] MInterfacePointer *pUnknown,
		[in,unique] GUID *iid,
		[out, iid_is(riid),unique] MInterfacePointer *ppv
		);

	[call_as(CreateInstance)] WERROR RemoteCreateInstance();

	/* Set lock to TRUE when you want to do a lock
	and set it to FALSE when you want to unlock */
	[local] WERROR LockServer(
		[in] uint8 lock
		);

	[call_as(LockServer)] WERROR RemoteLockServer();
}

/* The remote version of IUnknown. This interface exists on every */
/* OXID (whether an OXID represents either a thread or a process is */
/* implementation specific). It is used by clients to query for new */
/* interfaces, get additional references (for marshaling), and release */
/* outstanding references. */
/* This interface is passed along during OXID resolution. */
/* */
[
	uuid("00000131-0000-0000-C000-000000000046"),
	object,
	pointer_default(unique),
	helpstring("Remote version of IUnknown")
]
interface IRemUnknown : IUnknown
{
	typedef [public] struct
	{
		WERROR hResult; /* result of call */
		STDOBJREF std; /* data for returned interface */
	}
	REMQIRESULT;

	[call_as(QueryInterface)] WERROR RemQueryInterface (
		[in,unique] GUID *ripid, /* interface to QI on */
		[in] uint32 cRefs, /* count of AddRefs requested */
		[in] uint16 cIids, /* count of IIDs that follow */
		[in, unique, size_is(cIids)] GUID *iids, /* IIDs to QI for */
		[out, size_is(cIids), unique] MInterfacePointer *ip
		);

	typedef struct
	{
		GUID ipid; /* ipid to AddRef/Release */
		uint32 cPublicRefs;
		uint32 cPrivateRefs;
	} REMINTERFACEREF;

	[call_as(AddRef)] WERROR RemAddRef (
		[in] uint16 cInterfaceRefs,
		[in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
		[out, size_is(cInterfaceRefs), unique] WERROR *pResults
		);

	[call_as(Release)] WERROR RemRelease (
		[in] uint16 cInterfaceRefs,
		[in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
		);
}

[
	uuid("00000140-0000-0000-c000-000000000046"),
	object
] interface IClassActivator : IUnknown
{
	void GetClassObject(
		[in] GUID clsid,
		[in] uint32 context,
		[in] uint32 locale,
		[in] GUID iid,
		[out, iid_is(iid)] MInterfacePointer *data
		);
}

[
	uuid("00000136-0000-0000-c000-000000000046"),
	pointer_default(unique),
	object
] interface ISCMLocalActivator : IClassActivator
{
	WERROR ISCMLocalActivator_CreateInstance( );
}

[
	pointer_default(unique),
	uuid("c6f3ee72-ce7e-11d1-b71e-00c04fc3111a")
] interface IMachineLocalActivator
{
	WERROR IMachineLocalActivator_foo();
}

[
	pointer_default(unique),
	uuid("e60c73e6-88f9-11cf-9af1-0020af6e72f4")
] interface ILocalObjectExporter
{
	WERROR ILocalObjectExporter_Foo();
}

/* Looks like this is the equivalent of .NET's
   System.Activator class */
[
	uuid("000001a0-0000-0000-c000-000000000046"),
	object
]
	interface ISystemActivator : IClassActivator
{
	WERROR ISystemActivatorRemoteCreateInstance(
		[in] hyper unknown1,  /* OXID ? */
		[in] MInterfacePointer iface1,
		[in] hyper unknown2,
		[out] uint32 *unknown3,
		[out] MInterfacePointer *iface2
		);
}



/* Derived from IRemUnknown, this interface supports Remote Query interface */
/* for objects that supply additional data beyond the STDOBJREF in their */
/* marshaled interface packets. */
[
	object,
	pointer_default(unique),
	uuid("00000143-0000-0000-C000-000000000046")
]

interface IRemUnknown2 : IRemUnknown
{
	[call_as(QueryInterface2)] WERROR RemQueryInterface2 (
		[in, unique] GUID *ripid,
		[in] uint16 cIids,
		[in, size_is(cIids), unique] GUID *iids,
		[out, size_is(cIids), unique] WERROR *phr,
		[out, size_is(cIids), unique] MInterfacePointer *ppMIF
		);
}

[
	object,
	pointer_default(unique),
	uuid("00020400-0000-0000-C000-000000000046")
] interface IDispatch : IUnknown
{
	/*****************/
	/* Function 0x03 */
	WERROR GetTypeInfoCount(
		[out, unique] uint16 *pctinfo
		);

	typedef struct {
	} REF_ITypeInfo;

	/*****************/
	/* Function 0x04 */
	WERROR GetTypeInfo (
		[in] uint16 iTInfo,
		[in] uint32 lcid,
		[out, unique] REF_ITypeInfo *ppTInfo
		);

	/*****************/
	/* Function 0x05 */
	WERROR GetIDsOfNames(
		[in, unique] GUID *riid,
		/*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
		[in] uint16 cNames,
		[in] uint32 lcid,
		[out,size_is(cNames), unique] uint32 *rgDispId
		);

	typedef struct {
		uint16 vartype;
		uint16 FIXME;
	} VARIANT;

	typedef struct {
		uint16 FIXME;
	} DISPPARAMS;

	/* Exception ? */
	typedef struct {
		uint16 FIXME;
	} EXCEPINFO;

	/*****************/
	/* Function 0x06 */
	WERROR Invoke(
		[in] uint32 dispIdMember,
		[in, unique] GUID *riid,
		[in] uint32 lcid,
		[in] uint16 wFlags,
		[out,in, unique] DISPPARAMS *pDispParams,
		[out, unique] VARIANT *pVarResult,
		[out, unique] EXCEPINFO *pExcepInfo,
		[out, unique] uint16 *puArgErr
		);
}

[
	object,
	local,
	uuid("00000003-0000-0000-C000-000000000046")
] interface IMarshal : IUnknown
{
	WERROR MarshalInterface();
	WERROR UnMarshalInterface();
}

[
	uuid("DA23F6DB-6F45-466C-9EED-0B65286F2D78"),
	helpstring("ICoffeeMachine Interface"),
	pointer_default(unique),
	object
] interface ICoffeeMachine : IUnknown
{
	WERROR MakeCoffee([in,string,charset(UTF16)] uint16 *flavor);
}

[
	uuid("db7c21f8-fe33-4c11-aea5-ceb56f076fbb"),
	helpstring("coffeemachine class")
] coclass coffeemachine
{
	interface icoffeemachine;
}

[
	object,
	uuid("0000000C-0000-0000-C000-000000000046"),
	helpstring("Stream")
]
interface IStream : IUnknown
{
	WERROR Read(
		[out, size_is(num_requested), length_is(*num_read)] uint8 pv[],
		[in] uint32 num_requested,
		[in, unique] uint32 *num_readx,
		[out] uint32 *num_read
		);

	WERROR Write(
		[in,size_is(num_requested),unique] uint8 *data,
		[in] uint32 num_requested,
		[out] uint32 *num_written
		 );
}

[
	uuid("5e9ddec7-5767-11cf-beab-00aa006c3606"),
	progid("Samba.Simple"),
	helpstring("simple class"),
	internal
] coclass simple
{
	interface IStream;
}