Results 1 to 2 of 2

Thread: DCOM & Early binding

  1. #1

    Thread Starter
    Hyperactive Member Dorothy's Avatar
    Join Date
    Feb 2001
    Posts
    310

    Question DCOM & Early binding

    How can I early bind a Acx EXE in DCOM?

    I dont wish to use

    Set t=CreateObject("PClass")

    I wish to use it as:

    Dim a as New PClass
    a.method1()...

    Help me out?

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    All you have to do is set a reference to the components type library. After you do this, you can early bind your object variable to your desired interface. Also, it is not the CreateObject function that determines whether or not you are using, early binding, late binding, dispatch binding, etc., it is determined by your declarative statement: For example:

    Code:
        ' This is an example of using late binding
        Dim objServer As Object
    
        ' This is an example of early binding
        Dim objServer As MyServerClass
    Hence, in the first example, vb is not able to determine the type of object that you want to use, where in the second example, you are explicity saying that you want to bind your object variable to the MyServerClass object. Hope this makes sense to you..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width