This should work VB.NET Sub Test() Dim objdoWork As doWork.clsdoWork objdoWork = New doWork.clsdoWork() End Sub OR
Sub Test() Dim objdoWork As doWork.clsdoWork objdoWork = New doWork.clsdoWorkClass() End Sub Either one will work. If you are getting an error saying "Declaration expected" it could be that you are trying to New the class outside of a method. Ron Jacobs Program Manager XML Enterprise Services Team Microsoft Corporation http://www.gotdotnet.com/team/rojacobs -----Original Message----- From: Kenneth Benoit [mailto:kenneth_benoit@;HOTMAIL.COM] Sent: Friday, November 08, 2002 10:23 AM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Can't instantiate a COM+ component from VB.NET I am having a problem trying to instantiate a VB6 COM+ component from a VB.NET dll. I have already converted the COM+ type definitions into equivalent common language runtime assembly definitions using tlbimp.exe. When I reference the newly generated VB6 dll from C# I see 2 interfaces and the class listed (i.e. _clsdoWork, clsdoWork & clsdoWorkClass). But when I do the same exact reference from within VB.NET I only see the interface clsdoWork but no class definition. C# code doWork.clsdoWork objDoWork = null; objDoWork = new doWork.clsdoWorkClass(); VB.NET Dim objdoWork As doWork.clsdoWork objdoWork = New ????????????????? Any help with this would be greatly appreciated. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
