Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export function from a dll

Status
Not open for further replies.

robvi

Programmer
Aug 16, 2002
11
FR
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 :public Function GoFct() As Integer

Someone has any idea ?
 
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 ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top