Resources Base
Table of contents

Development

Where Can I Get The WebTWAIN Instance(s)?

When Load is called, Dynamic Web TWAIN tries to create the WebTwain instances. Once it’s done, Dynamic Web TWAIN triggers the built-in callback Dynamsoft.DWT.OnWebTwainReady in which the method Dynamsoft.DWT.GetWebTwain can be used to get the handler(s) of the instance(s). For simplicity, the OnWebTwainReady callback points to a global function called Dynamsoft_OnReady . The following snippets are equivalent

Snippet one

Dynamsoft.DWT.OnWebTwainReady = function() {
    DWObject = Dynamsoft.DWT.GetWebTwain("dwtcontrolContainer");
}

Snippet two

Dynamsoft.DWT.RegisterEvent('OnWebTwainReady', Dynamsoft_OnReady);
function Dynamsoft_OnReady() {
    DWObject = Dynamsoft.DWT.GetWebTwain("dwtcontrolContainer");
}

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version
    • Version 17.0
    • Version 16.2
    • Version 16.1.1
    Change +
    © 2003–2021 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support