Click here to Skip to main content
15,884,628 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello friends,

I created a dll in VB6 and added as a reference in VB.Net project. It works fine, no problem.

But i deployed the dll in my local machine as service in com manager and i want to consume as a service in my VB.Net project.

I do not know how to do that.

I want to consume the service of the dll without adding as a reference in my .Net project.


Thanks in advance.
Posted

1 solution

Through googling, i found that we can create object in VB.net same way as VB6.

I deployed sample com in my local machine.

Then i called the com using the code
VB
addobj = CreateObject("SimpleCalculator.AddNumbers")


And i called the function in button click event as

VB
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       val1 = TextBox1.Text
       val2 = TextBox2.Text
       MsgBox(addobj.add(val1, val2))
   End Sub


Now it works fine.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900