// comtest.idl : IDL source for comtest.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (comtest.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
	[
		object,
		uuid(3A10ADB0-DAF8-4D98-9DB5-35F609776CC6),
		dual,
		helpstring("ITwapiTest Interface"),
		pointer_default(unique)
	]
	interface ITwapiTest : IDispatch
	{
		[propget, id(1), helpstring("property ShortProperty")] HRESULT ShortProperty([out, retval] short *pVal);
		[propput, id(1), helpstring("property ShortProperty")] HRESULT ShortProperty([in] short newVal);
		[propget, id(2), helpstring("property LongProperty")] HRESULT LongProperty([out, retval] long *pVal);
		[propput, id(2), helpstring("property LongProperty")] HRESULT LongProperty([in] long newVal);
		[propget, id(3), helpstring("property FloatProperty")] HRESULT FloatProperty([out, retval] float *pVal);
		[propput, id(3), helpstring("property FloatProperty")] HRESULT FloatProperty([in] float newVal);
		[propget, id(4), helpstring("property DoubleProperty")] HRESULT DoubleProperty([out, retval] double *pVal);
		[propput, id(4), helpstring("property DoubleProperty")] HRESULT DoubleProperty([in] double newVal);
		[propget, id(5), helpstring("property CurrencyProperty")] HRESULT CurrencyProperty([out, retval] CURRENCY *pVal);
		[propput, id(5), helpstring("property CurrencyProperty")] HRESULT CurrencyProperty([in] CURRENCY newVal);
		[propget, id(7), helpstring("property DateProperty")] HRESULT DateProperty([out, retval] DATE *pVal);
		[propput, id(7), helpstring("property DateProperty")] HRESULT DateProperty([in] DATE newVal);
		[propget, id(8), helpstring("property BstrProperty")] HRESULT BstrProperty([out, retval] BSTR *pVal);
		[propput, id(8), helpstring("property BstrProperty")] HRESULT BstrProperty([in] BSTR newVal);
		[propget, id(9), helpstring("property BoolProperty")] HRESULT BoolProperty([out, retval] VARIANT_BOOL *pVal);
		[propput, id(9), helpstring("property BoolProperty")] HRESULT BoolProperty([in] VARIANT_BOOL newVal);
		[propget, id(10), helpstring("property IDispatchProperty")] HRESULT IDispatchProperty([out, retval] IDispatch* *pVal);
		[propput, id(10), helpstring("property IDispatchProperty")] HRESULT IDispatchProperty([in] IDispatch* newVal);
		[propget, id(11), helpstring("property ScodeProperty")] HRESULT ScodeProperty([out, retval] SCODE *pVal);
		[propput, id(11), helpstring("property ScodeProperty")] HRESULT ScodeProperty([in] SCODE newVal);
		[propget, id(12), helpstring("property VariantProperty")] HRESULT VariantProperty([out, retval] VARIANT *pVal);
		[propput, id(12), helpstring("property VariantProperty")] HRESULT VariantProperty([in] VARIANT newVal);
		[propget, id(13), helpstring("property IUnknownProperty")] HRESULT IUnknownProperty([out, retval] IUnknown* *pVal);
		[propput, id(13), helpstring("property IUnknownProperty")] HRESULT IUnknownProperty([in] IUnknown* newVal);
		[id(14), helpstring("method ThrowException")] HRESULT ThrowException([in] BSTR desc);
		[id(15), helpstring("method GetIntSA")] HRESULT GetIntSA([out, retval] VARIANT *varP);
		[id(16), helpstring("method GetUI1SA")] HRESULT GetUI1SA([out, retval] VARIANT *varP);
		[propget, id(17), helpstring("property SAProperty")] HRESULT IntSAProperty([out, retval] SAFEARRAY(int) *saP);
		[propput, id(17), helpstring("property SAProperty")] HRESULT IntSAProperty([in] SAFEARRAY(int) sa);
		[id(18), helpstring("method GetVariantType")] HRESULT GetVariantType([out, retval] int *pVal);
		[id(19), helpstring("method GetApplicationNames")] HRESULT GetApplicationNames([in, out] VARIANT *varPP);
		[id(20), helpstring("method OpenDoc6")]         HRESULT OpenDoc6(

                        [in] BSTR FileName, 

                        [in] long Type, 

                        [in] long Options, 

                        [in] BSTR Configuration, 

                        [in, out] long* Errors, 

                        [in, out] long* Warnings, 

                        [out, retval] IDispatch** Retval);
		[id(21), helpstring("method JMPSetDataVector")] HRESULT JMPSetDataVector([in] VARIANT vec, [out, retval] int *pVT);
		[propget, id(22), helpstring("property UI2Property")] HRESULT UI2Property([out, retval] unsigned short *pVal);
		[propput, id(22), helpstring("property UI2Property")] HRESULT UI2Property([in] unsigned short newVal);
		[propget, id(23), helpstring("property UI1Property")] HRESULT UI1Property([out, retval] unsigned char *pVal);
		[propput, id(23), helpstring("property UI1Property")] HRESULT UI1Property([in] unsigned char newVal);
            /* NOTE: WE DO NOT HAVE TEST FOR VT_I1 because VC cannot handle
               signed chars due to MIDL/C incompatibility */
	};

[
	uuid(CE5D782A-8F01-41EA-873A-7E255263F0BE),
	version(1.0),
	helpstring("comtest 1.0 Type Library")
]
library COMTESTLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(310FEA61-BC62-4944-84BE-D9DB986701DC),
		helpstring("TwapiTest Class")
	]
	coclass TwapiTest
	{
		[default] interface ITwapiTest;
	};
};
