L_WiaStartVideoPreview

#include "ltwia.h"

L_LTWIA_API L_INT EXT_FUNCTION L_WiaStartVideoPreview(hSession, hWndParent, bStretchToFitParent)

HWIASESSION hSession;

/* handle to an existing WIA session */

HWND hWndParent;

/* specifies the window in which to display the streaming video */

L_BOOL bStretchToFitParent;

/* specifies whether the video display is stretched to fit the parent window */

Starts the video preview inside the window specified through the hWndParent parameter.

Parameter

Description

hSession

Handle to an existing WIA session. This handle is obtained by calling the L_WiaInitSession function.

hWndParent

Handle to the window or control where you wish you start the video stream preview.

bStretchToFitParent

Specifies whether the video display is stretched to fit the parent window.  Possible values are:

 

Value

Meaning

 

TRUE

Stretch the video preview to fit the parent window.

 

FALSE

Video is displayed in a supported resolution smaller than the parent window.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This feature is available in version 16 or higher.

This function will start the video stream preview in the window or the control specified through the hWndParent parameter.

This function will internally set the image directory of the captured still images to the device's default path unless you called the L_WiaSetPropertyString function using the WIA_DPV_IMAGES_DIRECTORY property ID and the directory path you wish to use before calling the L_WiaStartVideoPreview function.

Required DLLs and Libraries

LTWIA

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Since WIA does not support video devices in Windows Server 2003, Windows Vista or later, then this function will only work with Windows XP or earlier operating systems.

See Also

Functions:

L_WiaResizeVideoPreview, L_WiaEndVideoPreview, L_WiaAcquireImageFromVideo, L_WiaIsVideoPreviewAvailable, L_WiaInitSession, L_WiaEndSession.

Topics:

Working with Video Devices

 

WIA Functionality: Property Functions

Example

For an example, refer to L_WiaIsVideoPreviewAvailable.