1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23// XCallback_Impl.idl : IDL source for XCallback_Impl.dll
24//
25
26// This file will be processed by the MIDL tool to
27// produce the type library (XCallback_Impl.tlb) and marshalling code.
28
29import "oaidl.idl";
30import "ocidl.idl";
31	[
32		object,
33		uuid(180FF55F-6F5C-11D4-8330-005004526AB4),
34		dual,
35		helpstring("ICallback Interface"),
36		pointer_default(unique)
37	]
38	interface ICallback : IDispatch
39	{
40		[id(1), helpstring("method func1")] HRESULT func1();
41		[id(2), helpstring("method returnInterface")] HRESULT returnInterface([out, retval] IDispatch** ppdisp);
42		[id(3), helpstring("method outInterface")] HRESULT outInterface([out] IDispatch** ppdisp);
43		[id(4), helpstring("method outValuesMixed")] HRESULT outValuesMixed([in] long val, [out] long* pval, [in] BSTR string);
44		[id(5), helpstring("method outValuesAll")] HRESULT outValuesAll([out] IDispatch** ppdisp, [out] IDispatch** ppSimpleStruct, [out] long* aSimpleEnum,
45		[out] SAFEARRAY( VARIANT)* outSeq,
46		[out] VARIANT* varAny,
47		[out] VARIANT_BOOL * aBool,
48		   [out] short* aChar,
49		    [out] BSTR* aString ,
50			[out] float* aFloat,
51			[out] double* aDouble,
52			[out] unsigned char*  aByte,
53			[out] short* aShort,
54			[out]long* aLong);
55//		);
56		[id(6), helpstring("method outStruct")] HRESULT outStruct([out] IDispatch** outStruct);
57		[id(7), helpstring("method outEnum")] HRESULT outEnum([out] long* outEnum);
58		[id(8), helpstring("method outSeqAny")] HRESULT outSeqAny([out] SAFEARRAY( VARIANT)* outSeq);
59		[id(9), helpstring("method outAny")] HRESULT outAny([out] VARIANT* outAny);
60		[id(10), helpstring("method outBool")] HRESULT outBool([out]VARIANT_BOOL* outBool);
61		[id(11), helpstring("method outChar")] HRESULT outChar([out] short* outChar);
62		[id(12), helpstring("method outString")] HRESULT outString([out] BSTR * outString);
63		[id(13), helpstring("method outFloat")] HRESULT outFloat([out] float* outFloat);
64		[id(14), helpstring("method outDouble")] HRESULT outDouble([out] double* outDouble);
65		[id(16), helpstring("method outShort")] HRESULT outShort([out] short *outShort);
66		[id(17), helpstring("method outLong")] HRESULT outLong([out] long* outLong);
67		[id(20), helpstring("method outByte")] HRESULT outByte([out] unsigned char* outByte);
68		[id(21), helpstring("method inoutInterface")] HRESULT inoutInterface([in,out] IDispatch** ppdisp);
69		[id(22), helpstring("method inoutStruct")] HRESULT inoutStruct([in,out] IDispatch** inoutVal);
70		[id(23), helpstring("method inoutEnum")] HRESULT inoutEnum([in,out] long * inoutVal);
71		[id(24), helpstring("method inoutSeqAny")] HRESULT inoutSeqAny([in,out] SAFEARRAY(VARIANT)* pArray);
72		[id(25), helpstring("method inoutAny")] HRESULT inoutAny([in,out] VARIANT* inoutVal);
73		[id(26), helpstring("method inoutBool")] HRESULT inoutBool([in,out] VARIANT_BOOL * inoutVal);
74		[id(27), helpstring("method inoutChar")] HRESULT inoutChar([in,out] short* inoutVal);
75		[id(28), helpstring("method inoutString")] HRESULT inoutString([in,out] BSTR *inoutVal);
76		[id(29), helpstring("method inoutFloat")] HRESULT inoutFloat([in,out] float* inoutVal);
77		[id(30), helpstring("method inoutDouble")] HRESULT inoutDouble([in,out] double* inoutVal);
78		[id(31), helpstring("method inoutByte")] HRESULT inoutByte([in,out] unsigned char* inoutVal);
79		[id(32), helpstring("method inoutShort")] HRESULT inoutShort([in,out] short* inoutVal);
80		[id(33), helpstring("method inoutLong")] HRESULT inoutLong([in,out] long* inoutVal);
81		[id(34), helpstring("method inoutValueAll")] HRESULT inoutValuesAll(
82						 [in,out] IDispatch** aXSimple,
83						 [in,out] IDispatch** aStruct,
84						 [in,out] long* aEnum,
85						 [in,out]  SAFEARRAY( VARIANT)* aSeq,
86						 [in,out] VARIANT* aAny,
87						 [in,out] VARIANT_BOOL* aBool,
88						 [in,out] short* aChar,
89						 [in,out] BSTR* aString,
90						 [in,out] float* aFloat,
91						 [in,out] double* aDouble,
92						 [in,out] unsigned char* aByte,
93						 [in,out] short* aShort,
94						 [in,out] long* aLong);
95		[id(35), helpstring("method inValues")] HRESULT inValues([in]short aChar, [in] long aLong, [in] BSTR aString);
96		[id(36), helpstring("method outSeqByte")] HRESULT outSeqByte([out] SAFEARRAY(unsigned char)* outVal);
97		[id(37), helpstring("method inSeqByte")] HRESULT inSeqByte([in] SAFEARRAY(VARIANT) val);
98		[id(38), helpstring("method inSeqXEventListener")] HRESULT inSeqXEventListener([in] SAFEARRAY(VARIANT) listener,
99																		[in] SAFEARRAY(VARIANT) event);
100
101	};
102	[
103		object,
104		uuid(180FF564-6F5C-11D4-8330-005004526AB4),
105		dual,
106		helpstring("ISimple Interface"),
107		pointer_default(unique)
108	]
109	interface ISimple : IDispatch
110	{
111		[id(1), helpstring("method func")] HRESULT func( [in] BSTR message);
112		[id(2), helpstring("method func2")] HRESULT func2([in] BSTR message);
113		[id(3), helpstring("method func3")] HRESULT func3([in] BSTR message);
114		[propget, id(4), helpstring("property _implementedInterfaces")] HRESULT _implementedInterfaces([out, retval] SAFEARRAY(BSTR) *pVal);
115	};
116
117
118
119[
120	uuid(180FF553-6F5C-11D4-8330-005004526AB4),
121	version(1.0),
122	helpstring("XCallback_Impl 1.0 Type Library")
123]
124library XCALLBACK_IMPLLib
125{
126	importlib("stdole32.tlb");
127	importlib("stdole2.tlb");
128
129	[
130		uuid(180FF560-6F5C-11D4-8330-005004526AB4),
131		helpstring("Callback Class")
132	]
133	coclass Callback
134	{
135		[default] interface ICallback;
136	};
137	[
138		uuid(180FF565-6F5C-11D4-8330-005004526AB4),
139		helpstring("Simple Class")
140	]
141	coclass Simple
142	{
143		[default] interface ISimple;
144	};
145};
146
147
148