Queries whether the Source supports a particular operation on the capability.
Namespace: Dynamsoft.DotNet.TWAINAssembly: DynamicDotNetTWAIN (in DynamicDotNetTWAIN.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax
| C# |
|---|
public bool CapIfSupported( TWQC enumMessageType ) |
| Visual Basic |
|---|
Public Function CapIfSupported ( _ enumMessageType As TWQC _ ) As Boolean |
Parameters
- enumMessageType
- Type: Dynamsoft.DotNet.TWAIN.Enums..::..TWQC
TWQC type: specifies the type of capability operation. Value Description TWQC_GET (1): If CapGet() is supported by the capability. TWQC_SET (2): If CapSet() is supported by the capability. TWQC_GETDEFAULT (4): If CapGetDefault() is supported by the capability. TWQC_GETCURRENT (8): If CapGetCurrent() is supported by the capability. TWQC_RESET (16): If CapReset() is supported by the capability.
Return Value
True indicates success. False indicates failure.
Remarks
The capability to query should be set in Capability property before calling CapIfSupported().
Exceptions
| Exception | Condition |
|---|---|
| Dynamsoft.DotNet.TWAIN..::..TwainException | When an error occurs and IfThrowException property is true, an exception will be thrown. When IfThrowException property is false, please check ErrorCode and ErrorString. |