|
-
December 16th, 1999, 12:51 AM
#1
How to call COM components in VB client.
Hi,
I have a simple COMcomponent which implements the method Sum(), which is developed in VC++ environment.
I wanted to write a VB client for it. Can any body tell me how to call COM interfaces through VB .
Thanx
kiru
-
December 16th, 1999, 02:30 AM
#2
Re: How to call COM components in VB client.
go to Project/References menu in the VB Development Environment and add you COM component's Typelib (probably part of your COM DLL) to the references.
Then hit F2 to start the object browser.
You can see all objects and methods of that component.
Instantiate an object of your component:
dim x as new yourprogid
(or use: set x = createobject("yourprogid"))
call the method
dim lResult as long
lResult = x.Sum
-
December 16th, 1999, 03:01 AM
#3
Re: How to call COM components in VB client.
Thanx for replying.
Can U suggest me some books for VB with COM or some sites on net or articles in MSDN.
Once again Thanking U
kiru
-
December 16th, 1999, 03:03 AM
#4
Re: How to call COM components in VB client.
the best source that I know of is: MSDN and the online documentation that comes with VB.
You might also want to check out the MSPress site for some VB books.
-
December 16th, 1999, 06:00 PM
#5
Re: How to call COM components in VB client.
You don't have to buy any books tho, www.informit.com ...sign up and read almost anybook for FREE, including those on COM components
-
December 21st, 1999, 08:26 AM
#6
Re: How to call COM components in VB client.
HI,
I tried creating Com object through the CreateObject() function in VB. But it is givng an error "Activex component can't create object".
I tried same with VB script. It is working fine.
Can U tell me what is the problem in VB.
Thanx
kiran
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
|