Kofax DM API Instrukcja Użytkownika Strona 51

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 528
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 50
AN OVERVIEW OF THE DM API 31
Early and Late Binding
PCDSQL
PCDTrusteeList
Early and Late Binding
You can create objects in the DM API using either early binding or late
binding. Examples shown in this document will sometimes use early
binding, and other times will use late binding. In custom applications
you implement, you can usually use either, but there are a few instances
where the text will indicate that one should be used in preference to the
other.
Early Binding With early binding you create an object in a single step when you first
dimension it. This may be the most appropriate way to create an object
if you are going to use it immediately.
Early binding uses the New keyword within the Dim statement when
the object is first dimensioned. For example:
Dim pDoc As New PCDClient.PCDPutDoc
The New operator must be used on Visual Basic objects that have
Private or PublicNotCreatable instancing properties.
Late Binding With late binding you first dimension the item you want to create, often
dimensioning it as a generic object. Later, when you are ready to use the
object, you use the
Set statement to instantiate the object in memory.
For example:
Dim pObj As Object
...
Set pObj = CreateObject(“PCDClient.PCDLookup”)
If your application uses the Microsoft Transaction Server, you must
create objects using late binding with the
CreateObject method. The
Transaction Server cannot see instances of externally created objects
that you generate with the
New operator.
Przeglądanie stron 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 527 528

Komentarze do niniejszej Instrukcji

Brak uwag