TwainOpenSource(Int32,String) Method
Opens the source with the given name.
If another source is open, closes it and attempts to open the specified source.
First this method for each scanning process or to set the TWAIN state to 4 (TWAIN_SOURCE_OPEN) when
the TWAIN state is 3 (TWAIN_SM_OPEN) or 2 (TWAIN_SM_LOADED) or 1 (TWAIN_PRESESSION).
public bool TwainOpenSource(
int HANDLE,
string
)
public function TwainOpenSource(
HANDLE: Integer;
: String
): Boolean;
public function TwainOpenSource(
HANDLE : int,
: String
) : boolean;
public: bool TwainOpenSource(
int HANDLE,
string*
)
public:
bool TwainOpenSource(
int HANDLE,
String^
)
'Declaration
Public Overloads Function TwainOpenSource( _
ByVal HANDLE As Integer, _
ByVal As String _
) As Boolean
Parameters
- HANDLE
- A Window Handle IE: Me.Handle. In most applications you can use nothing
but on Citrix and WTS, this must be a top-level window or a child of a top
level window.
- SourceName
- The name of the source to open.
Return Value
True if success, else False -> Use TwainGetLastResultCode() and TwainGetLastConditionCode()
methods for diagnosing the error.