HasOption

Description

Determines whether the device supports a specific option.

Applies to

Camera objects

Syntax

Boolean objectname.HasOption ( Opt )

Argument

Description

objectname

The name of the camera object that you want to inquire about.

Opt

A value of the CameraOption enumerated variable that specifies the name of the option that you want to want to inquire about. For a list of options, see GetOption.

Returns

Integer. Returns 1 for success, and one of the following negative values if an error occurs:

Usage

Use the HasOption function to determine whether the camera device supports a specific option. You can call GetOption to return the option’s value in a reference variable.

Examples

Example 1

The following statements determine whether the device supports the CamOptWhiteBalance option and, if it does, use the GetOption function to return the value:

boolean lb_query
integer li_return
lb_query = g_myCam.HasOption(CamOptWhiteBalance)
if lb_query = true then
   li_return = g_myCam.GetOption(CamOptWhiteBalance)
end if

See also