visit Kofax web site

ACTIVESWLib::ISPScanner Interface Reference


Detailed Description

SignWare Dynamic Development toolkit, ActiveX wrapper for SPScannerInterface ISPScanner.

Representation of scanner device

Please read the scanner overview in ScannerOverview.


Public Member Functions

HRESULT Capture ([in] long lWithGui,[in] __int64 hwndParent,[out, retval] long *result)
 Capture one or more images from the selected device.
HRESULT Capture32 ([in] long lWithGui,[in] __int32 hwndParent,[out, retval] long *result)
 Capture one or more images from the selected device.
HRESULT CaptureInteractive ([in] __int64 hwndParent,[out, retval] long *result)
 Capture an images from a camera or a video device.
HRESULT CaptureInteractive32 ([in] __int32 hwndParent,[out, retval] long *result)
 Capture an images from a camera or a video device.
HRESULT CaptureInteractiveDone ([in] long iRes,[in] long iOption,[out, retval] long *result)
 Finalize a capture process that was started with CaptureInteractive.
HRESULT ClearImages ([out, retval] long *result)
 Clear all images that were captured in the last capture process.
HRESULT CreateScanner ([in] ISPPropertyMap *pMap,[in] __int64 hwndParent,[out, retval] long *result)
 Create a scanner device object.
HRESULT CreateScanner32 ([in] ISPPropertyMap *pMap,[in] __int32 hwndParent,[out, retval] long *result)
 Create a scanner device object.
HRESULT Dispose ([out, retval] long *result)
 Dospose and free the native resources of a SPScanner object.
HRESULT GetCapabilities ([out] ISPPropertyMap **ppMap,[out, retval] long *result)
 Query the Capabilities of the scanner device.
HRESULT GetImage ([in] long lImageIndex,[out] ISPImage **ppImage,[out, retval] long *result)
 Query an image that was captured in the last capture process.
HRESULT GetNumberImages ([out] long *plNumberImages,[out, retval] long *result)
 Query the number of images that were captured in the last capture process.
HRESULT GetSettings ([out] ISPPropertyMap **ppMap,[out, retval] long *result)
 Query the Settings of the scanner device.
HRESULT SetSettings ([in] ISPPropertyMap *pMap,[out, retval] long *result)
 Set the Settings of the scanner device.


Member Function Documentation

HRESULT ACTIVESWLib::ISPScanner::Capture [in] long  lWithGui,
[in] __int64  hwndParent,
[out, retval] long *  result
 

Capture one or more images from the selected device.

Parameters:
lWithGui [i] capture mode
  • true (1): popup the vendor capture GUI and pass the image based on the settings in the dialog
  • false (0): capture an image based on the local settings, see SPScannerSetSettings,
    GUI less operation is not supported for Video or Camera devices. The application may determine the device type using Property "DeviceType" in the Capabilities map, see SPScannerGetCapabilities
hwndParent [i] parent window handle, dialogs and messages will be modal to the parent window
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
This function is synchronous, however some drivers may process the message queue. The application must assure that it cannot exit while capture is called.

the captured images will be saved in the native pSPSCANNER_T object, call GetNumberImages and GetImage to retrieve images.

See also:
SPScannerCapture

HRESULT ACTIVESWLib::ISPScanner::Capture32 [in] long  lWithGui,
[in] __int32  hwndParent,
[out, retval] long *  result
 

Capture one or more images from the selected device.

Note:
This method is exclusively for 32-bit applications, it will return an error (SPX_PARAMERR) in a 64-bit process
Parameters:
lWithGui [i] capture mode
  • true (1): popup the vendor capture GUI and pass the image based on the settings in the dialog
  • false (0): capture an image based on the local settings, see SPScannerSetSettings,
    GUI less operation is not supported for Video or Camera devices. The application may determine the device type using Property "DeviceType" in the Capabilities map, see SPScannerGetCapabilities
hwndParent [i] parent window handle, dialogs and messages will be modal to the parent window
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
This function is synchronous, however some drivers may process the message queue. The application must assure that it cannot exit while capture is called.

the captured images will be saved in the native pSPSCANNER_T object, call GetNumberImages and GetImage to retrieve images.

See also:
SPScannerCapture

HRESULT ACTIVESWLib::ISPScanner::CaptureInteractive [in] __int64  hwndParent,
[out, retval] long *  result
 

Capture an images from a camera or a video device.

Parameters:
hwndParent [i] Handle to the window, the window will be used to display the video stream
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
This function behaves different depending on the device type:
  • Scanner not supported
  • Camera all images currently saved in the camera will be enumerated and thumbnails will be created in the images container when the method returns. call GetNumberImages and GetImage to enumerate the returned thumbnails.
  • Video a live video stream will be displayed in the passed window handle.
The function returns immediately. You must call CaptureInteractiveDone to complete the capture process.

The twain interface supports cameras and video devices only when using the vendor gui. The Twain implementation of CaptureInteractive will return SP_UNSUPPORTEDERR.

The WIA2 interface does not support video cameras, the WIA2 implementation of CaptureInteractive will return SP_UNSUPPORTEDERR if the device is a video camera.

See also:
SPScannerCaptureInteractive, CaaptureInteractiveDone

HRESULT ACTIVESWLib::ISPScanner::CaptureInteractive32 [in] __int32  hwndParent,
[out, retval] long *  result
 

Capture an images from a camera or a video device.

Note:
This method is exclusively for 32-bit applications, it will return an error (SPX_PARAMERR) in a 64-bit process
Parameters:
hwndParent [i] Handle to the window, the window will be used to display the video stream
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
This function behaves different depending on the device type:
  • Scanner not supported
  • Camera all images currently saved in the camera will be enumerated and thumbnails will be created in the images container when the method returns. call GetNumberImages and GetImage to enumerate the returned thumbnails.
  • Video a live video stream will be displayed in the passed window handle.
The function returns immediately. You must call CaptureInteractiveDone to complete the capture process.

The twain interface supports cameras and video devices only when using the vendor gui. The Twain implementation of CaptureInteractive will return SP_UNSUPPORTEDERR.

The WIA2 interface does not support video cameras, the WIA2 implementation of CaptureInteractive will return SP_UNSUPPORTEDERR if the device is a video camera.

See also:
SPScannerCaptureInteractive, CaaptureInteractiveDone

HRESULT ACTIVESWLib::ISPScanner::CaptureInteractiveDone [in] long  iRes,
[in] long  iOption,
[out, retval] long *  result
 

Finalize a capture process that was started with CaptureInteractive.

Parameters:
iRes [i] pass SP_NOERR to query the image, SP_CANCELERR to abort the capture process without image transfer
iOption [i] optional parameter, depends on the device
  • Scanner: iOption ignored, pass 0
  • Camera: iOption equals the zero based index of the requested image
  • Video camera: iOption is ignored, pass 0
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
See also:
CaptureInteractive, SPScannerCaptureInteractiveDone

HRESULT ACTIVESWLib::ISPScanner::ClearImages [out, retval] long *  result  ) 
 

Clear all images that were captured in the last capture process.

Parameters:
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPScannerClearImages

HRESULT ACTIVESWLib::ISPScanner::CreateScanner [in] ISPPropertyMap pMap,
[in] __int64  hwndParent,
[out, retval] long *  result
 

Create a scanner device object.

Parameters:
pMap [i] the property map that describes the device
hwndParent [i] Parent window handle
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result

HRESULT ACTIVESWLib::ISPScanner::CreateScanner32 [in] ISPPropertyMap pMap,
[in] __int32  hwndParent,
[out, retval] long *  result
 

Create a scanner device object.

Note:
This method is exclusively for 32-bit applications, it will return an error (SPX_PARAMERR) in a 64-bit process
Parameters:
pMap [i] the property map that describes the device
hwndParent [i] Parent window handle
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result

HRESULT ACTIVESWLib::ISPScanner::Dispose [out, retval] long *  result  ) 
 

Dospose and free the native resources of a SPScanner object.

Parameters:
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
Some Languages use builtin garbage collection to free resources when they are no longer referenced, however it is typically not known when the garbage collecter free an object. Method Dispose enables the application to free the resources, and to unlock the hardware (driver).
See also:
SPScannerFree

HRESULT ACTIVESWLib::ISPScanner::GetCapabilities [out] ISPPropertyMap **  ppMap,
[out, retval] long *  result
 

Query the Capabilities of the scanner device.

Parameters:
ppMap [o] pointer to a ISPPropertyMap which will be filled with the Capabilities container
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPScannerGetCapabilities

HRESULT ACTIVESWLib::ISPScanner::GetImage [in] long  lImageIndex,
[out] ISPImage **  ppImage,
[out, retval] long *  result
 

Query an image that was captured in the last capture process.

Parameters:
lImageIndex [i] zero based index of the requested image
ppImage [o] pointer to a ISPImage object that will be filled with the captured image
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPScannerGetImage

HRESULT ACTIVESWLib::ISPScanner::GetNumberImages [out] long *  plNumberImages,
[out, retval] long *  result
 

Query the number of images that were captured in the last capture process.

Parameters:
plNumberImages [o] pointer to a long that will be filled with the number of images
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPScannerGetNumberImages

HRESULT ACTIVESWLib::ISPScanner::GetSettings [out] ISPPropertyMap **  ppMap,
[out, retval] long *  result
 

Query the Settings of the scanner device.

Parameters:
ppMap [o] pointer to a ISPPropertyMap which will be filled with the Settings container
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPScannerGetSettings

HRESULT ACTIVESWLib::ISPScanner::SetSettings [in] ISPPropertyMap pMap,
[out, retval] long *  result
 

Set the Settings of the scanner device.

Parameters:
pMap [i] pointer to a ISPPropertyMap which is filled with the Settings container
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPScannerGetSettings


The documentation for this interface was generated from the following file: