Is there anyway to export a function (not a class) in VB6?

前端 未结 1 621
情深已故
情深已故 2021-01-21 06:16

I want to create an ActiveX DLL from Visual Basic 6 from which I would like to call some public functions. I will call this DLL only from VB6. However, it seems that only classe

1条回答
  •  借酒劲吻你
    2021-01-21 06:48

    Yes, it's easy.

    1. Put all the utility routines in special classes in the DLL.
    2. Set the Instancing property of those classes as GlobalMultiUse.
    3. Build the DLL.
    4. In your client project (with a reference to the DLL) you will now be able to call the functions and subroutines as if they were in a module in that project. You won't need to create any objects.

    You can read more in the VB6 manual.

    0 讨论(0)
提交回复
热议问题