| Herd Software Development
|=
DaVinci Graphics Library
|==
DaVinci Documentation Home Search Order


Leonardo: Function TWAINCallDS

Allowes TWAIN API calls to a TWAIN data source for use of specific scanner characteristics provided that knowledge on TWAIN API internal matters is available.

UINT LEONAPI TWAINCallDS(
HTWAINACCESS hta,
DWORD dwDG,
WORD wDAT,
WORD wMSG,
LPVOID pData);
hta Handle to TWAIN memory created by TWAINInitialize
dwDG Parameter in accordance with TWAIN API specification
wDAT Parameter in accordance with TWAIN API specification
wMSG Parameter in accordance with TWAIN API specification
pData Parameter in accordance with TWAIN API specification

Returned value:

In accordance with the TWAIN - specification.

If opening the data source did not succeed, TWRC_FAILURE is reported.

Comment

The data source becomes the call of the data source and therefore, manager necessarily opened the source also. An error can occur if opening the data source failed.

The TWAIN API

The data source needs to be opened to call it, the data source manager is necessarily also opened.

The use of this function presupposes the availability of supplementary information about the TWAIN-API. The specifications are available as freeware from http://www.twain.org. You need to at least include the file TWAIN.H in your application program.

Example

#include "twain.h"

void static MyFunction(HTWAINACCESS TwainAccessHandle)
{
   // Try to get the selected image frame
	 TW_IMAGELAYOUT twImageLayout;
     memset(&twImageLayout, 0, sizeof(twImageLayout));
     TWAINCallDS(
TwainAccessHandle,
DG_IMAGE,
DAT_IMAGELAYOUT,
MSG_GET,
&twImageLayout); }

Þ problems with TWAIN - implementations

Þ function TWAINAquireExt

Þ function TWAINSetResolution

Þ function TWAINSetRect

Þ function TWAINIsDSMOpen