|
-
Jan 18th, 2002, 01:19 AM
#1
Thread Starter
Hyperactive Member
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?
-
Jan 18th, 2002, 10:34 PM
#2
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|