Visual Studio 2017 C# DLL to VB6 (COM) application RRS feed

  • Question

  • New to C#

    i am converting a older VB6 dll to C# dll and am trying to reference the C# dll in the VB6 project. I have checked the compile options for COm and created a interface in the C# dll, but when I try and create a new object of the C# dll I can see all the methods and propertied , but get a error message on VB6 "Object reference not set to an instance of an object"

    i have a global module In vb6:

    Global tgTemp As HmsTGen.cHmsTGen
    Global tg As HmsTGen.IHmsTGen

    under VB6 Sub_Main:

    If tg Is Nothing Then
        Set tgTemp = New HmsTGen.cHmsTGen
        Set tg = tgTemp
    End If

    What am I missing.?

    Thank You for any help

    Monday, October 1, 2018 9:27 PM

All replies