You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > TWAIN Features > TwainGetCapCurrentString Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.TwainGetCapCurrentString Method

Returns as string, the current value of a TWAIN capability.

C#
public Boolean TwainGetCapCurrentString(
    TwainCapabilities Cap, 
    ref String CurrentValue
);
Visual Basic
Public Function TwainGetCapCurrentString(
    ByVal Cap As TwainCapabilities, 
    ByRef CurrentValue As String
) As Boolean
Parameters
Parameters 
Description 
Cap 
A TWAIN capability  
CurrentValue 
Output parameter. Current value of the selected TWAIN capability.  
Returns

True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() functions for diagnosing the error.

Before using this function check that the TWAIN state is >= 4 (TWAIN_SOURCE_OPEN) 

To get the TWAIN state, use the TwainGetState() function. 

 

This function can be used to retrieve the following types of capabilities: TWTY_STR32, TWTY_STR64, TWTY_STR128, TWTY_STR255 . 

You can determine the type of each TWAIN capability using the TwainGetCapItemType function or looking the twain references from http://www.twain.org

Gets the current halftone pattern used by the default source

Dim CurrentCapValue As String=""
 
oGdPictureImaging.TwainOpenDefaultSource(Me.Handle)
 
oGdPictureImaging.TwainGetCapCurrentString(TwainCapabilities.ICAP_HALFTONES, CurrentCapValue)
MsgBox "The current halftone pattern used: " + CurrentCapValue
 
oGdPictureImaging.TwainCloseSource()
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.