SourceCount

Description

Returns how many sources are available on the local system. This is a read-only property.

Data type

<short>

Syntax

.SourceCount

Remarks

If SourceCount returns 0, it means there is no source available to use on the system.

When an error occurs, check ErrorCode or ErrorString for error information.

On Mac, we recommend the use of Mac's own image capture engine instead of TWAIN, please refer to the following example.

Example

if(count == 0 && Dynamsoft.Lib.env.bMac)
{
  DWObject.CloseSourceManager();
  DWObject.ImageCaptureDriverType = 3;
  DWObject.OpenSourceManager();
  count = DWObject.SourceCount;
}

See also

OpenSourceManager
SelectSource
SelectSourceByIndex

Is this page helpful?

Leave a Reply

Your email address will not be published.