TwainControllerGetCapabilityValue Method (DeviceCapability, Boolean) |
Reads a Boolean capability value.
Namespace:
Atalasoft.Twain
Assembly:
Atalasoft.DotTwain (in Atalasoft.DotTwain.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax public TwainReturnCode GetCapabilityValue(
DeviceCapability capability,
out bool value
)
Public Function GetCapabilityValue (
capability As DeviceCapability,
<OutAttribute> ByRef value As Boolean
) As TwainReturnCode
Parameters
- capability
- Type: Atalasoft.TwainDeviceCapability
The capability to retrieve. - value
- Type: SystemBoolean
A Boolean that will be filled when the method returns.
Return Value
Type:
TwainReturnCode The code returned from the device. If this returns TWRC_FAILURE use GetConditionCode to
determine why the request failed.
Exceptions Exception | Condition |
---|
| Thrown if a connection to the device is not open. |
Examples GetCapabilityValue Method
Examples GetCapabilityValueCS (C#)
bool online = false;
TwainReturnCode ret = twain.GetCapabilityValue(DeviceCapability.CAP_DEVICEONLINE, out online);
int pixelType = 0;
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_PIXELTYPE, out pixelType);
RectangleF frame = RectangleF.Empty;
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_FRAMES, out frame);
float resX = 0;
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_XRESOLUTION, out resX);
string halftone = "";
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_HALFTONES, out halftone);
GetCapabilityValueVB (Visual Basic)
Dim online As Boolean = False
Dim ret As TwainReturnCode = twain.GetCapabilityValue(DeviceCapability.CAP_DEVICEONLINE, ByRef online)
Dim pixelType As Integer = 0
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_PIXELTYPE, ByRef pixelType)
Dim frame As RectangleF = RectangleF.Empty
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_FRAMES, ByRef frame)
Dim resX As Single = 0
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_XRESOLUTION, ByRef resX)
Dim halftone As String = ""
ret = twain.GetCapabilityValue(DeviceCapability.ICAP_HALFTONES, ByRef halftone)
See Also