oleaut32/tests: Add tmarshal test.
[wine] / dlls / oleaut32 / tests / tmarshal.idl
1 /*
2  * Copyright (C) 2005 Robert Shearman
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
20 #include "tmarshal_dispids.h"
21 import "ocidl.idl";
22
23 [
24   uuid(d96d8a3e-78b6-4c8d-8f27-059db959be8a),
25   version(1.0),
26   helpstring("Test Typelib")
27 ]
28 library TestTypelib
29 {
30     importlib("stdole2.tlb");
31
32     typedef enum tagSTATE
33     {
34         STATE_UNWIDGETIFIED = 1,
35         STATE_WIDGETIFIED
36     } STATE;
37
38     coclass ApplicationObject2;
39
40     [
41         odl,
42         uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586),
43         oleautomation,
44         dual
45     ]
46     interface IWidget : IDispatch
47     {
48         [propput, id(DISPID_TM_NAME)]
49         HRESULT Name([in] BSTR name);
50         [propget, id(DISPID_TM_NAME)]
51         HRESULT Name([out, retval] BSTR *name);
52
53         [id(DISPID_TM_DOSOMETHING)]
54         HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt);
55
56         [propget, id(DISPID_TM_STATE)]
57         HRESULT State([out, retval] STATE *state);
58         [propput, id(DISPID_TM_STATE)]
59         HRESULT State([in] STATE state);
60
61         [id(DISPID_TM_MAP)]
62         HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue);
63
64         [id(DISPID_TM_SETOLECOLOR)]
65         HRESULT SetOleColor([in] OLE_COLOR val);
66
67         [id(DISPID_TM_GETOLECOLOR)]
68         HRESULT GetOleColor([out, retval] OLE_COLOR *pVal);
69
70         [propget, id(DISPID_TM_CLONE)]
71         HRESULT Clone([out, retval] IWidget **ppVal);
72
73         [propget, id(DISPID_TM_CLONEDISPATCH)]
74         HRESULT CloneDispatch([out, retval] IDispatch **ppVal);
75
76         [propget, id(DISPID_TM_CLONECOCLASS)]
77         HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal);
78
79         [id(DISPID_VALUE)]
80         HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval);
81
82         [id(DISPID_TM_ARRAY)]
83         HRESULT Array([in] SAFEARRAY(BSTR) values);
84
85         [id(DISPID_TM_VARARRAYPTR)]
86         HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
87
88         [id(DISPID_TM_VARIANT)]
89         void Variant([in] VARIANT var);
90
91         [id(DISPID_TM_ERROR)]
92         HRESULT Error();
93     }
94
95     [
96         odl,
97         uuid(a028db05-30f0-4b93-b17a-41c72f831d84),
98         dual,
99         oleautomation
100     ]
101     interface IKindaEnumWidget : IUnknown
102     {
103         HRESULT Next(
104                      [out] IWidget **widget);
105
106         HRESULT Count(
107                       [out] unsigned long *count);
108
109         HRESULT Reset();
110
111         HRESULT Clone(
112                       [out] IKindaEnumWidget **ppenum);
113     }
114
115     [
116         odl,
117         uuid(a028db06-30f0-4b93-b17a-41c72f831d84),
118     ]
119     interface INonOleAutomation : IUnknown
120     {
121         [id(DISPID_NOA_BSTRRET)]
122         BSTR BstrRet();
123     }
124
125
126     [
127         dllname("comm.drv"),
128         uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9),
129     ]
130     module BadModule
131     {
132         [
133             entry("Foo"),
134         ]
135         HRESULT BadModuleFoo();
136     };
137
138     [
139         dllname("oleaut32.dll"),
140         uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9),
141     ]
142     module BadEntry
143     {
144         [
145             entry("Foo"),
146         ]
147         HRESULT BadEntryFoo();
148     };
149
150     [
151         uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
152         appobject,
153     ]
154     coclass ApplicationObject2
155     {
156         interface IWidget;
157         [source] interface IWidget;
158     };
159 };