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