Problem compiling to be used by a VB 6.0 App

Problem compiling to be used by a VB 6.0 App

Post by Sean Murph » Wed, 22 Oct 2003 19:21:10

I have a VB.NET class called "TimeBookingNonTransactions"
that I want to use as classic COM from a VB 6.0
The project was previously created by someone
that is no longer with the company.
The application is set up to create a dll.

Originally, the application did not have COM Interop
selected. This option is now selected and I have
recompiled the dll. However, it is still not working.

I have been told that I need to create a ClassInterface.

In C#, it's:
[ClassInterface(ClassInterfaceType.AutoDual)] ,
this attribute is assigned to the class.

Would anyone know the syntax for the ?
I just need to get one interface to work, that I've copied

" Public Function GetUnderbookingReport(ByVal fromDate
As Date, ByVal EndDate As Date, Optional ByVal
User_Resource_ID As String = "") As Object"

The error message I get when trying to reference is CLSID
is not defined.

1. VB.NET, multiple entries into web based VB.NET app

2. dll late binding to a app

I'm trying to create a simple (server) dll, and then through
late binding access the public methods of the contained class from
another (client) app. I can do it through early binding. When i
try late binding it allows me to load the assembly, I can even see the
methods contained within through reflections, but it fails at the
point were I try to access the method opencomms or any other method of
this server class. The error message I get is:

An unhandled exception of type 'System.NullReferenceException'
occurred in microsoft.visualbasic.dll

Additional information: Object variable or With block variable not

this is the code in the client app

windows app calling this routine
option strinct off

Public Sub StartContainer()
Dim SampleAssembly As [Assembly]
Dim obj As Object

SampleAssembly = [Assembly].LoadFrom("C:\Protocol\obj\Debug

obj =


End Sub

ProtocolFile.vb complied as Protocol.dll

Public Class ProtocolDll

Public Sub OpenComms()
End Sub

End Class

Any ideas where I'm going wrong, I can't seem to find any useful
examples that will give me this anywhere.

thanks in advance


3. Using VB.NET object in VB 6.0 project

4. Error converting VB 6 APP to VB.NET APP

5. asp/ over app

6. Using externalEvent with - does not respond

7. Difficult Compile bug in VS.NET using VB.NET

8. connecting to SQL Server 2000 from a app using

9. Error running a ASP.NET app using VB.NET on domain controller HELP!!!

10. Dll from VB.NET to VB 6.0

11. Calling a VB.NET com+ component from a vb 6.0 com+ component

12. Calling methods in a VB.NET dll from VB 6.0

13. How can I use the same objects in VB 6.0 as in VB.NET?

14. VB.NET equiv to VB 6.0 "SetFocus()"

15. VB 6.0 or VB.NET winforms application and WebDav