locked
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

  • Hello,

    Best to ask in the following forum. The site has VB6, and C# forums. This forum is only for C#, not VB6 connecting to VB6.

    http://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, October 1, 2018 9:45 PM