Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create COM object in VB.NET 1

Status
Not open for further replies.

FRoeCassNet

Programmer
Feb 8, 2002
147
0
0
US
I have an older system (written in C++) which uses business rules stored in COM objects. I've written business rules in the past with VB6, but recently upgraded to VB.NET. I can't figure out how to create a COM object from VB.NET. How do I create a COM object so that my older system can load it and use it?

Thanks.
 
Hi

The following may help

In vb.net use the following:

dim obj as object
obj = server.createobject("Myobject")

Regards

sadcow
 
This is the same problem I posted about, hwoever I figured out the answer. Create a New VB.net project of type Class Library. Remove the VB file created by the project wizard. Go to Project, Add Component and choose COM Class. Code the Class like a standard VB.net program. After compiling into a DLL, the compiler will output 2 files, theCOMObject.dll and TheCOMObject.tlb. The machines which you install the COM Object on must have the .net Framework installed. You will then be able to &quot;regasm TheCOMObject.dll /tlb:TheCOMObject.tlb&quot; which will allow access to the COM Object classes from a &quot;legacy&quot; (VB6<) app.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top