





import "oaidl.idl";
import "ocidl.idl";

[
	object,
	uuid(56b5c13c-5870-4d88-bdb0-b9ad7536054a),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface ISystemInfo : IDispatch
{
	HRESULT GetConnectedScanners([out, retval]SAFEARRAY(BSTR)* ppResult);
	HRESULT GetInstalledScanners([out, retval]SAFEARRAY(BSTR)* ppResult);
	HRESULT DriverDescriptionToDriverName([in] BSTR driverDescription, [out, retval] BSTR* pResult);
};

[
	object,
	uuid(4d368124-ecfe-4998-914b-4777acf5be9f),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IIsisScanner : IDispatch
{
	[propget] HRESULT ConfigFilename([out, retval] BSTR * pPath);
	HRESULT ConfigureViaGui(LONG ParentHwnd);	
	HRESULT ScanToByteArrays(LONG ParentHwnd);
	HRESULT ScanToFiles(BSTR Directory);
	HRESULT ReleaseScanner();
	
};

[
	object,
	uuid(4246d815-0783-455c-aff3-a5a17407f665),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface IObjectFactory : IDispatch
{
	HRESULT CreateScanner([in] BSTR ScannerModel, [in] BSTR ConfigFilename, [out, retval] IIsisScanner** ppResult);
	HRESULT CreateSystemInfo([out, retval] ISystemInfo** ppResult);
	HRESULT CreateScannerByDriverDescription([in] BSTR DriverDescription, [in] BSTR ConfigFilename, [out, retval] IIsisScanner** ppResult);
	HRESULT CreateScannerByDriverName([in] BSTR DriverName, [in] BSTR ConfigFilename, [out, retval] IIsisScanner** ppResult);
};

[
	uuid(9d9dea8c-c7a9-4dcb-af86-a11c6d82b9c8),
	version(1.0),
]
library ComSurrogateScanningLib
{

	importlib("stdole2.tlb");
	[
		uuid(d40fb3b7-b51f-441e-b2c0-7f3a770733f5)
	]
	dispinterface _IScannerEvents
	{
		properties:
		methods:

			[id(1)] HRESULT DocumentScanned(
				[in]BSTR Filename1,
				[in]BSTR Filename2,
				[in]VARIANT_BOOL AreDeskewed,
				[out]VARIANT_BOOL* Cancel);
			[id(3)] HRESULT FeederEmpty();
			[id(4)] HRESULT BatchAborted();
			[id(5)] HRESULT ScanningError([in] LONG ErrorCode,[in]BSTR ErrorText);
			[id(6)] HRESULT NoScannerDetected();
			[id(7)] HRESULT DocumentScannedToByteArrays(
				[in]SAFEARRAY(BYTE) page1,
				[in]SAFEARRAY(BYTE) page2,
				[in]VARIANT_BOOL AreDeskewed,
				[in, out]VARIANT_BOOL* Cancel);
	};
	[
		uuid(746fd798-1979-49f9-b6d0-d69d8c5c2b69)
	]
	coclass IsisScanner
	{
		[default] interface IIsisScanner;
		[default, source] dispinterface _IScannerEvents;
	};
	[
		uuid(3120726d-956f-4fc8-b9d2-ca149cc6ddd5)
	]
	coclass SystemInfo
	{
		[default] interface ISystemInfo;
	};
	[
		uuid(7bde1643-e434-440c-aaed-c976f9549d52)
	]
	coclass ObjectFactory
	{
		[default] interface IObjectFactory;
	};
};

import "shobjidl.idl";
import "shobjidl.idl";
import "shobjidl.idl";
import "shobjidl.idl";
import "shobjidl.idl";

