1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AxTestComponents.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 // AxTestComponents.idl : IDL source for AxTestComponents.dll
33 // This file will be processed by the MIDL tool to
34 // produce the type library (AxTestComponents.tlb) and marshalling code.
40 uuid(BFE10EBD
-8584-11D4
-8335-005004526AB4
),
42 helpstring("IBasic Interface"),
43 pointer_default(unique)
45 interface IBasic
: IDispatch
47 [id(82), helpstring("method inBool")] HRESULT inBool
([in]VARIANT_BOOL val
);
48 [id(1), helpstring("method inByte")] HRESULT inByte
([in] unsigned char val
);
49 [id(2), helpstring("method inShort")] HRESULT inShort
([in] short val
);
50 [id(3), helpstring("method inLong")] HRESULT inLong
([in] long val
);
51 [id(4), helpstring("method inString")] HRESULT inString
([in] BSTR val
);
52 [id(5), helpstring("method inFloat")] HRESULT inFloat
([in] float val
);
53 [id(6), helpstring("method inDouble")] HRESULT inDouble
([in] double val
);
54 [id(7), helpstring("method inVariant")] HRESULT inVariant
([in] VARIANT val
);
55 [id(8), helpstring("method inArray")] HRESULT inArray
([in] SAFEARRAY(VARIANT) val
);
56 [id(9), helpstring("method inObject")] HRESULT inObject
([in] IDispatch
* val
);
57 [id(83), helpstring("method inoutBool")] HRESULT inoutBool
([in,out]VARIANT_BOOL* val
);
58 [id(12), helpstring("method inoutByte")] HRESULT inoutByte
([in,out] unsigned char* val
);
59 [id(13), helpstring("method inoutShort")] HRESULT inoutShort
([in,out] short* val
);
60 [id(14), helpstring("method inoutLong")] HRESULT inoutLong
([in,out] long * val
);
61 [id(15), helpstring("method inoutString")] HRESULT inoutString
([in, out] BSTR* val
);
62 [id(16), helpstring("method inoutFloat")] HRESULT inoutFloat
([in,out] float * val
);
63 [id(17), helpstring("method inoutDouble")] HRESULT inoutDouble
([in,out] double * val
);
64 [id(18), helpstring("method inoutVariant")] HRESULT inoutVariant
([in,out] VARIANT * val
);
65 [id(19), helpstring("method inoutArray")] HRESULT inoutArray
([in,out] SAFEARRAY(VARIANT) * val
);
66 [id(20), helpstring("method inoutObject")] HRESULT inoutObject
([in,out] IDispatch
** val
);
67 [id(84), helpstring("method outBool")] HRESULT outBool
([out] VARIANT_BOOL* val
);
68 [id(23), helpstring("method outByte")] HRESULT outByte
([out] unsigned char* val
);
69 [id(24), helpstring("method outShort")] HRESULT outShort
([out] short* val
);
70 [id(25), helpstring("method outLong")] HRESULT outLong
([out] long* val
);
71 [id(26), helpstring("method outString")] HRESULT outString
([out] BSTR* val
);
72 [id(27), helpstring("method outFloat")] HRESULT outFloat
([out] float* val
);
73 [id(28), helpstring("method outDouble")] HRESULT outDouble
([out] double* val
);
74 [id(29), helpstring("method outVariant")] HRESULT outVariant
([out] VARIANT* val
);
75 [id(30), helpstring("method outArray")] HRESULT outArray
([out] SAFEARRAY(VARIANT) * val
);
76 [id(31), helpstring("method outObject")] HRESULT outObject
([out] IDispatch
** val
);
77 [propget, id(85), helpstring("property prpBool")] HRESULT prpBool
([out, retval] VARIANT_BOOL *pVal
);
78 [propput, id(85), helpstring("property prpBool")] HRESULT prpBool
([in] VARIANT_BOOL newVal
);
79 [propget, id(34), helpstring("property prpByte")] HRESULT prpByte
([out, retval] unsigned char *pVal
);
80 [propput, id(34), helpstring("property prpByte")] HRESULT prpByte
([in] unsigned char newVal
);
81 [propget, id(35), helpstring("property prpShort")] HRESULT prpShort
([out, retval] short *pVal
);
82 [propput, id(35), helpstring("property prpShort")] HRESULT prpShort
([in] short newVal
);
83 [propget, id(36), helpstring("property prpLong")] HRESULT prpLong
([out, retval] long *pVal
);
84 [propput, id(36), helpstring("property prpLong")] HRESULT prpLong
([in] long newVal
);
85 [propget, id(37), helpstring("property prpString")] HRESULT prpString
([out, retval] BSTR *pVal
);
86 [propput, id(37), helpstring("property prpString")] HRESULT prpString
([in] BSTR newVal
);
87 [propget, id(38), helpstring("property prpFloat")] HRESULT prpFloat
([out, retval] float *pVal
);
88 [propput, id(38), helpstring("property prpFloat")] HRESULT prpFloat
([in] float newVal
);
89 [propget, id(39), helpstring("property prpDouble")] HRESULT prpDouble
([out, retval] double *pVal
);
90 [propput, id(39), helpstring("property prpDouble")] HRESULT prpDouble
([in] double newVal
);
91 [propget, id(40), helpstring("property prpVariant")] HRESULT prpVariant
([out, retval] VARIANT *pVal
);
92 [propput, id(40), helpstring("property prpVariant")] HRESULT prpVariant
([in] VARIANT newVal
);
93 [propget, id(41), helpstring("property prpArray")] HRESULT prpArray
([out, retval]SAFEARRAY(VARIANT) *pVal
);
94 [propput, id(41), helpstring("property prpArray")] HRESULT prpArray
([in] SAFEARRAY(VARIANT) newVal
);
95 [propget, id(42), helpstring("property prpObject")] HRESULT prpObject
([out, retval] IDispatch
* *pVal
);
96 [propput, id(42), helpstring("property prpObject")] HRESULT prpObject
([in] IDispatch
* newVal
);
97 [id(43), helpstring("method mixed1")] HRESULT mixed1
(
98 [in, out] unsigned char* aChar
,
99 [in, out] float *aFloat
,
100 [in,out] VARIANT* inoutVar
);
101 [id(44), helpstring("method inSequenceLong")] HRESULT inSequenceLong
([in] SAFEARRAY(long) ar
);
102 [id(45), helpstring("method inSequenceByte")] HRESULT inSequenceByte
([in] SAFEARRAY(byte) ar
);
103 [id(46), helpstring("method inSequenceShort")] HRESULT inSequenceShort
([in] SAFEARRAY(short) ar
);
104 [id(47), helpstring("method inSequenceString")] HRESULT inSequenceString
([in] SAFEARRAY( BSTR) ar
);
105 [id(48), helpstring("method inSequenceFloat")] HRESULT inSequenceFloat
([in] SAFEARRAY(float) ar
);
106 [id(49), helpstring("method inSequenceDouble")] HRESULT inSequenceDouble
([in] SAFEARRAY(double) ar
);
107 [id(50), helpstring("method inSequenceObject")] HRESULT inSequenceObject
([in] SAFEARRAY(IDispatch
*) ar
);
108 [id(51), helpstring("method outSequenceByte")] HRESULT outSequenceByte
([out] SAFEARRAY(unsigned char)* val
);
109 [id(52), helpstring("method outSequenceShort")] HRESULT outSequenceShort
([out] SAFEARRAY(short)* val
);
110 [id(53), helpstring("method outSequenceLong")] HRESULT outSequenceLong
([out] SAFEARRAY(long )*val
);
111 [id(54), helpstring("method outSequenceString")] HRESULT outSequenceString
([out] SAFEARRAY(BSTR)* val
);
112 [id(55), helpstring("method outSequenceFloat")] HRESULT outSequenceFloat
([out] SAFEARRAY(float)* val
);
113 [id(56), helpstring("method outSequenceDouble")] HRESULT outSequenceDouble
([out] SAFEARRAY(double)* val
);
114 [id(57), helpstring("method outSequenceObject")] HRESULT outSequenceObject
([out] SAFEARRAY(IDispatch
*)* val
);
115 [id(58), helpstring("method inoutSequenceByte")] HRESULT inoutSequenceByte
([in,out] SAFEARRAY(unsigned char)* val
);
116 [id(59), helpstring("method inoutSequenceShort")] HRESULT inoutSequenceShort
([in,out] SAFEARRAY(short)* val
);
117 [id(60), helpstring("method inoutSequenceLong")] HRESULT inoutSequenceLong
([in,out] SAFEARRAY( long)*val
);
118 [id(61), helpstring("method inoutSequenceString")] HRESULT inoutSequenceString
([in,out] SAFEARRAY(BSTR)* val
);
119 [id(62), helpstring("method inoutSequenceFloat")] HRESULT inoutSequenceFloat
([in,out] SAFEARRAY(float)* val
);
120 [id(63), helpstring("method inoutSequenceDouble")] HRESULT inoutSequenceDouble
([in,out] SAFEARRAY(double)* val
);
121 [id(64), helpstring("method inoutSequenceObject")] HRESULT inoutSequenceObject
([in,out] SAFEARRAY(IDispatch
*)* val
);
122 [id(65), helpstring("method inMulDimArrayLong")] HRESULT inMulDimArrayLong
([in] SAFEARRAY(long) val
);
123 [id(66), helpstring("method inMulDimArrayVariant")] HRESULT inMulDimArrayVariant
([in] SAFEARRAY(VARIANT) val
);
124 [id(67), helpstring("method inMulDimArrayLong2")] HRESULT inMulDimArrayLong2
([in] SAFEARRAY(long) val
);
125 [id(68), helpstring("method inMulDimArrayVariant2")] HRESULT inMulDimArrayVariant2
([in] SAFEARRAY(VARIANT) val
);
126 [id(69), helpstring("method inMulDimArrayByte")] HRESULT inMulDimArrayByte
([in] SAFEARRAY(unsigned char) val
);
127 [id(70), helpstring("method inMulDimArrayByte2")] HRESULT inMulDimArrayByte2
([in] SAFEARRAY(unsigned char) val
);
128 [id(71), helpstring("method outMore")] HRESULT outMore
([out]long* val1
, [out]long* val2
);
130 [id(72), helpstring("method optional1")]
131 HRESULT optional1
([in] long val1
, [in, optional] VARIANT* val2
);
132 [id(73), helpstring("method optional2")]
133 HRESULT optional2
([out] long* val1
, [out, optional] VARIANT* val2
);
134 [id(74), helpstring("method optional3")]
135 HRESULT optional3
([in, optional] VARIANT* val1
, [in, optional] VARIANT* val2
);
136 [id(75), helpstring("method optional4")]
137 HRESULT optional4
([in, out, optional] VARIANT* val1
, [in, out, optional] VARIANT* val2
);
138 [id(76), helpstring("method optional5")]
139 HRESULT optional5
([out, optional] VARIANT* val1
, [out, optional] VARIANT* val2
);
140 //midl creates for val4 a BSTR "4" as default value in the TLB. The midl complains
141 //but the error message seems to be not for this case.
142 //in defaultvalue2 val4 has an VT_I4 in the TLB. This must be a bug!
143 [id(77), helpstring("method defaultvalue1")]
144 HRESULT defaultvalue1
([in, defaultvalue(1)] long val1
,
145 [in, defaultvalue(2)] double* val2
,
146 // [in, defaultvalue(3)] VARIANT val3, //ok
147 [in, defaultvalue(4)] VARIANT* val4
);
149 // bug im midl: when val3 and val4 are pointers then the generated header cretates
150 // for all params default values:
151 //HRESULT STDMETHODCALLTYPE defaultvalue2(
152 // /* [defaultvalue][in] */ long *val1 = 10,
153 // /* [defaultvalue][in] */ double *val2 = 3.14,
154 // /* [defaultvalue][in] */ VARIANT *val3 = 10,
155 // /* [defaultvalue][in] */ VARIANT *val4 = 100) = 0;
156 // And that does not compile.
157 //Therefore we must not include the midl generated header, instead use
158 // #import to create the interface header
159 [id(78), helpstring("method defaultvalue2")]
160 HRESULT defaultvalue2
([in, out, defaultvalue(1)]long* val1
,
161 [in, out, defaultvalue(2)] double* val2
,
162 // [in, out, defaultvalue(3)] VARIANT *val3,
163 [in, out, defaultvalue(4)] VARIANT *val4
);
165 [id(79), helpstring("method varargfunc1"),vararg]
166 HRESULT varargfunc1
([in] long val1
, [in] SAFEARRAY(VARIANT) val2
);
167 [id(80), helpstring("method varargfunc2")]
168 HRESULT varargfunc2
([out] long* val1
, [out] SAFEARRAY(VARIANT)* val2
);
171 [id(86), helpstring("method inSequenceByteDim2")] HRESULT inSequenceByteDim2
([in] SAFEARRAY(byte) val
);
172 [id(87), helpstring("method inCurrency")] HRESULT inCurrency
([in] CY val
);
173 [id(88), helpstring("method outCurrency")] HRESULT outCurrency
([out] CY
* val
);
174 [id(89), helpstring("method inoutCurrency")] HRESULT inoutCurrency
([in,out] CY
* val
);
175 [id(90), helpstring("method inDate")] HRESULT inDate
([in] DATE val
);
176 [id(91), helpstring("method outDate")] HRESULT outDate
([out] DATE
* val
);
177 [id(92), helpstring("method inoutDate")] HRESULT inoutDate
([in,out] DATE
* val
);
178 [propget, id(93), helpstring("property prpCY")] HRESULT prpCurrency
([out, retval] CY
* pVal
);
179 [propput, id(93), helpstring("property prpCY")] HRESULT prpCurrency
([in] CY newVal
);
180 [propget, id(94), helpstring("property prpDate")] HRESULT prpDate
([out, retval] DATE
* pVal
);
181 [propput, id(94), helpstring("property prpDate")] HRESULT prpDate
([in] DATE newVal
);
182 [id(95), helpstring("method inDecimal")] HRESULT inDecimal
([in] DECIMAL val
);
183 [id(96), helpstring("method outDecimal")] HRESULT outDecimal
([out] DECIMAL
* val
);
184 [id(97), helpstring("method inoutDecimal")] HRESULT inoutDecimal
([in,out] DECIMAL
* val
);
185 [propget, id(98), helpstring("property prpDecimal")] HRESULT prpDecimal
([out, retval] DECIMAL
* pVal
);
186 [propput, id(98), helpstring("property prpDecimal")] HRESULT prpDecimal
([in] DECIMAL newVal
);
187 [id(99), helpstring("method inSCode")] HRESULT inSCode
([in] SCODE val
);
188 [id(100), helpstring("method outScode")] HRESULT outScode
([out] SCODE
* val
);
189 [id(101), helpstring("method inoutSCode")] HRESULT inoutSCode
([in,out] SCODE
* val
);
190 [propget, id(102), helpstring("property prpSCode")] HRESULT prpSCode
([out, retval] SCODE
* pVal
);
191 [propput, id(102), helpstring("property prpSCode")] HRESULT prpSCode
([in] SCODE newVal
);
192 [id(103), helpstring("method inrefLong")] HRESULT inrefLong
([in] LONG* val
);
193 [id(104), helpstring("method inrefVARIANT")] HRESULT inrefVariant
([in] VARIANT* val
);
194 [id(105), helpstring("method inrefDecimal")] HRESULT inrefDecimal
(DECIMAL
* val
);
195 [propget, id(106), helpstring("property prpRefLong")] HRESULT prpRefLong
([out, retval] long* pVal
);
196 [propputref, id(106), helpstring("property prpRefLong")] HRESULT prpRefLong
([in] long* newVal
);
197 [propget, id(107), helpstring("property prprefVariant")] HRESULT prprefVariant
([out, retval] VARIANT* pVal
);
198 [propputref, id(107), helpstring("property prprefVariant")] HRESULT prprefVariant
([in] VARIANT* newVal
);
199 [propget, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal
([out, retval] DECIMAL
* pVal
);
200 [propputref, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal
([in] DECIMAL
* newVal
);
201 [id(109), helpstring("method optional6")] HRESULT optional6
([in,optional] VARIANT* val1
,
202 [in,optional] VARIANT * val2
, [in,optional] VARIANT* val3
, [in,optional] VARIANT* val4
);
203 [id(110), helpstring("method optional7")] HRESULT optional7
([out,optional] VARIANT* val1
,
204 [out,optional] VARIANT * val2
, [out,optional] VARIANT* val3
, [out,optional] VARIANT* val4
);
206 [propget, id(111), helpstring("property prpMultiArg1")] HRESULT prpMultiArg1
([in,out,optional] VARIANT* val1
, [in,out,optional] VARIANT* val2
, [out, optional, retval] VARIANT* pVal
);
207 [propput, id(111), helpstring("property prpMultiArg1")] HRESULT prpMultiArg1
([in,out,optional] VARIANT* val1
, [in,out,optional] VARIANT* val2
, [in] VARIANT* newVal
);
208 [propget, id(112), helpstring("property prpMultiArg2")] HRESULT prpMultiArg2
([in] VARIANT val1
, [out, retval] VARIANT* pVal
);
209 [propput, id(112), helpstring("property prpMultiArg2")] HRESULT prpMultiArg2
([in] VARIANT val1
, [in] VARIANT newVal
);
210 [id(113), helpstring("method prpMultiArg2GetValues")] HRESULT prpMultiArg2GetValues
([out] VARIANT* val1
, [out] VARIANT* valProperty
);
211 [propget, id(114), helpstring("property prpMultiArg3")] HRESULT prpMultiArg3
([in,out] LONG* val1
, [out, retval] LONG* pVal
);
212 [propput, id(114), helpstring("property prpMultiArg3")] HRESULT prpMultiArg3
([in,out] LONG* val1
, [in] LONG newVal
);
213 [id(115), helpstring("method inUnknown")] HRESULT inUnknown
([in] IUnknown
* val
);
214 [id(116), helpstring("method outUnknown")] HRESULT outUnknown
([out] IUnknown
** val
);
215 [id(117), helpstring("method inoutUnknown")] HRESULT inoutUnknown
([in,out] IUnknown
** val
);
216 [propget, id(118), helpstring("property prpUnknown")] HRESULT prpUnknown
([out, retval] IUnknown
** pVal
);
217 [propput, id(118), helpstring("property prpUnknown")] HRESULT prpUnknown
([in] IUnknown
* newVal
);
222 uuid(96E6105A
-A436
-48b3
-BFE7
-C9302D927CCF
),
224 helpstring("IFoo Interface"),
225 pointer_default(unique)
227 interface IFoo
: IUnknown
229 HRESULT Foo
([in] IUnknown
* val
);
233 uuid(BFE10EB1
-8584-11D4
-8335-005004526AB4
),
235 helpstring("AxTestComponents 1.0 Type Library")
237 library AXTESTCOMPONENTSLib
239 importlib
("stdole32.tlb");
240 importlib
("stdole2.tlb");
243 uuid(BFE10EBE
-8584-11D4
-8335-005004526AB4
),
244 helpstring("Basic Class")
248 [default] interface IBasic
;
252 uuid(14DE9D5D
-EB9D
-4091-8E1B
-A1B1672D8C1D
),
253 helpstring("Foo Class")
257 [default] interface IFoo
;