r6620: the type 23 schannel bind uses a workstation name, not an account name
[samba.git] / source / librpc / idl / dcom.idl
1 #include "idl_types.h"
2
3 /**
4   DCOM interfaces
5   http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
6  */
7
8 #define OLESTR unistr
9
10 [
11         uuid("18f70770-8e64-11cf-9af1-0020af6e72f4"),
12         pointer_default(unique),
13         version(0.0)
14 ] interface dcom_Unknown
15 {
16         void UseProtSeq();
17         void GetCustomProtseqInfo();
18         void UpdateResolverBindings();
19 }
20
21 [
22         object,
23         uuid("00000000-0000-0000-C000-000000000046"),
24         pointer_default(unique),
25         helpstring("Base interface for all COM interfaces")
26 ]
27 interface IUnknown
28 {
29         /*****************/
30         /* Function 0x00 */
31         /* Returns the interface with the specified IID 
32            if implemented by this object */
33         [local] WERROR QueryInterface([in] GUID *iid,
34            [out,iid_is(riid),ref] IUnknown **data);
35
36         /*****************/
37         /* Function 0x01 */
38         [local] uint32 AddRef();
39
40         /*****************/
41         /* Function 0x02 */
42         [local] uint32 Release();
43 }
44
45
46 [
47         object,
48         uuid("00000001-0000-0000-C000-000000000046"),
49         pointer_default(unique)
50 ] interface IClassFactory : IUnknown
51 {
52         [local] WERROR CreateInstance([in] MInterfacePointer *pUnknown, 
53                                [in] GUID *iid,
54                                [out, iid_is(riid)] MInterfacePointer *ppv);
55
56         [call_as(CreateInstance)] WERROR RemoteCreateInstance();
57
58         /* Set lock to TRUE when you want to do a lock
59         and set it to FALSE when you want to unlock */
60         [local] WERROR LockServer([in] uint8 lock);
61
62         [call_as(LockServer)] WERROR RemoteLockServer();
63 }
64
65 /* The remote version of IUnknown. This interface exists on every */
66 /* OXID (whether an OXID represents either a thread or a process is */
67 /* implementation specific). It is used by clients to query for new */
68 /* interfaces, get additional references (for marshaling), and release */
69 /* outstanding references. */
70 /* This interface is passed along during OXID resolution. */
71 /* */
72 [
73         uuid("00000131-0000-0000-C000-000000000046"),
74         object,
75         pointer_default(unique),
76         helpstring("Remote version of IUnknown")
77 ]
78 interface IRemUnknown : IUnknown
79 {
80         typedef [public] struct 
81         {
82                 WERROR hResult; /* result of call */
83                 STDOBJREF std; /* data for returned interface */
84         }
85         REMQIRESULT;
86
87         [call_as(QueryInterface)] WERROR RemQueryInterface (
88                 [in] GUID *ripid, /* interface to QI on */
89                 [in] uint32 cRefs, /* count of AddRefs requested */
90                 [in] uint16 cIids, /* count of IIDs that follow */
91                 [in, size_is(cIids)] GUID *iids[], /* IIDs to QI for */
92                 [out, size_is(cIids)] MInterfacePointer *ip[]
93                 );
94
95         typedef struct 
96         {
97                 GUID ipid; /* ipid to AddRef/Release */
98                 uint32 cPublicRefs;
99                 uint32 cPrivateRefs;
100         } REMINTERFACEREF;
101
102         [call_as(AddRef)] WERROR RemAddRef (
103                  [in] uint16 cInterfaceRefs,
104                  [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
105                  [out, size_is(cInterfaceRefs)] WERROR *pResults[]
106                 );
107
108         [call_as(Release)] WERROR RemRelease (
109                  [in] uint16 cInterfaceRefs,
110                  [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
111                 );
112 }
113
114 [
115         uuid("00000140-0000-0000-c000-000000000046"),
116         pointer_default(unique),
117         object
118 ] interface IClassActivator : IUnknown
119 {
120         void GetClassObject([in] GUID clsid, 
121                                 [in] uint32 context,
122                                                 [in] uint32 locale,
123                                                 [in] GUID iid,
124                                                 [out, iid_is(iid)] MInterfacePointer data);
125 }
126
127 [
128         uuid("00000136-0000-0000-c000-000000000046"),
129         pointer_default(unique),
130         object
131 ] interface ISCMLocalActivator : IClassActivator
132 {
133         WERROR ISCMLocalActivator_CreateInstance( );
134 }
135
136 [
137         pointer_default(unique),
138         uuid("c6f3ee72-ce7e-11d1-b71e-00c04fc3111a")
139 ] interface IMachineLocalActivator 
140 {
141         WERROR IMachineLocalActivator_foo();
142 }
143
144 [
145         pointer_default(unique),
146         uuid("e60c73e6-88f9-11cf-9af1-0020af6e72f4")
147 ] interface ILocalObjectExporter
148 {
149         WERROR ILocalObjectExporter_Foo();
150 }
151
152 /* Looks like this is the equivalent of .NET's 
153    System.Activator class */
154 [
155         uuid("000001a0-0000-0000-c000-000000000046"),
156         pointer_default(unique),
157         object
158 ]
159         interface ISystemActivator : IClassActivator
160 {
161         WERROR ISystemActivatorRemoteCreateInstance([in] hyper unknown1,  /* OXID ? */
162                                                                                           [in] MInterfacePointer iface1,
163                                                                                           [in] hyper unknown2,
164                                                                                           [out] uint32 unknown3, 
165                                                                                           [out] MInterfacePointer iface2);
166 }
167
168
169
170 /* Derived from IRemUnknown, this interface supports Remote Query interface */
171 /* for objects that supply additional data beyond the STDOBJREF in their */
172 /* marshaled interface packets. */
173 [
174         object,
175         pointer_default(unique),
176         uuid("00000143-0000-0000-C000-000000000046")
177 ]
178
179 interface IRemUnknown2 : IRemUnknown
180 {
181         [call_as(QueryInterface2)] WERROR RemQueryInterface2 (
182                  [in] GUID *ripid,
183                  [in] uint16 cIids,
184                  [in, size_is(cIids)] GUID *iids[],
185                  [out, size_is(cIids)] WERROR *phr[],
186                  [out, size_is(cIids)] MInterfacePointer *ppMIF[]
187                 );
188 }
189
190 [
191 object,
192         pointer_default(unique),
193         uuid("00000136-0000-0000-C000-000000000046")
194         ] interface ISCMActivator : IClassActivator
195 {
196         WERROR SCMActivator_CreateInstance();
197 }
198
199 [
200         object,
201         pointer_default(unique),
202         uuid("00020400-0000-0000-C000-000000000046")
203         ] interface IDispatch : IUnknown
204 {
205         /*****************/
206         /* Function 0x03 */
207         WERROR GetTypeInfoCount(
208                         [out] uint16 *pctinfo);
209
210         typedef struct {
211         } REF_ITypeInfo;
212
213         /*****************/
214         /* Function 0x04 */
215         WERROR GetTypeInfo (
216                         [in] uint16 iTInfo,
217                         [in] uint32 lcid,
218                         [out] REF_ITypeInfo *ppTInfo);
219
220         /*****************/
221         /* Function 0x05 */
222         WERROR GetIDsOfNames(
223                         [in] GUID *riid,
224                         /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
225                         [in] uint16 cNames,
226                         [in] uint32 lcid,
227                         [out,size_is(cNames)] uint32 *rgDispId[]);
228
229         typedef struct {
230                 uint16 vartype;
231                 uint16 FIXME;
232         } VARIANT;
233
234         typedef struct {
235                 uint16 FIXME;
236         } DISPPARAMS;
237
238         /* Exception ? */
239         typedef struct {
240                 uint16 FIXME;
241         } EXCEPINFO;
242
243         /*****************/
244         /* Function 0x06 */
245         WERROR Invoke(
246                         [in] uint32 dispIdMember,
247                         [in] GUID *riid,
248                         [in] uint32 lcid,
249                         [in] uint16 wFlags,
250                         [out,in] DISPPARAMS *pDispParams,
251                         [out] VARIANT *pVarResult,
252                         [out] EXCEPINFO *pExcepInfo,
253                         [out] uint16 *puArgErr);
254 }
255
256 [
257         object,
258         local,
259         uuid("00000003-0000-0000-C000-000000000046")
260 ] interface IMarshal : IUnknown
261 {
262         WERROR MarshalInterface();
263         WERROR UnMarshalInterface();
264 }
265
266 [
267         uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
268         helpstring("ICoffeeMachine Interface"),
269         pointer_default(unique),
270         object
271 ] interface ICoffeeMachine : IUnknown
272 {
273         [helpstring("method MakeCoffee")] WERROR MakeCoffee([in] unistr *flavor);
274 }
275
276 [
277         uuid("db7c21f8-fe33-4c11-aea5-ceb56f076fbb"),
278         helpstring("coffeemachine class")
279 ] coclass coffeemachine
280 {
281         interface icoffeemachine;
282 }
283
284 [
285         object,
286         pointer_default(unique),
287         uuid("0000000C-0000-0000-C000-000000000046"),
288         helpstring("Stream")
289 ]
290 interface IStream : IUnknown
291 {
292         WERROR Read(
293                                 [out, size_is(num_requested), length_is(num_read)] uint8 pv[],
294                                 [in] uint32 num_requested, 
295                                 [in] uint32 *num_readx,
296                                 [out] uint32 num_read
297                                 );
298
299         WERROR Write(
300                                 [in,size_is(num_requested)] uint8 *data[],
301                                  [in] uint32 num_requested,
302                                  [out] uint32 num_written);
303 }
304
305 [
306         uuid("5e9ddec7-5767-11cf-beab-00aa006c3606"),
307         progid("Samba.Simple"),
308         helpstring("simple class"),
309         internal
310 ] coclass simple 
311 {
312         interface IStream;
313 }