I work with VB6. I'd like to write a dll and export functions from it. It sounds easy but I don't arrive !
I generated a dll project (Dll ActiveX), the 1st function's line I want to export is ublic Function GoFct() As Integer
Just add your function to the class that opens up and compile it to a dll, then to use it set a reference to your dll (project...references).
Its really rather simple
He doesn't want to use a method from a class, he wants to EXPORT a function (I assume ). Something you cannot do within visual basic unless you hack the compiler. There actually is a program which enables you to do this within visual basic, but it's still a hack, so I don't know what to think about it. You could however achieve this with a small cheat. Create a global class in your dll and put all the exports in there linking to the functions you wish to call. You can simply reference the dll inside vb and you can use the function as if it is declared. It will create the class for you automaticly, without seeing it happen.
LuckyLuke is right. I want to export functions, like any classical dll. I know now that it's not able with VB6 and then I added a class. It works.
But now I cannot debug this ActiveX dll. VB told me that the dll isn't in Automation ! Any idea how I can do ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.