I need to create a DLL library including functions that can be called by different applications. I already tested the functions in a separate VB6 execuatble application and they works OK. I also try to create a DLL folowing some advises posted in the web but no one works to me. Some idea, advise?

Hi,
After coding, Compile it to a Dll File.
Open a New VB project, and Add thru References,
Browse and add the “.dll” file.
If you add it through references, it will Register itself…
To Reference the Class:
Dim MyCl As New MyclsName
MyclsName is Class Name in the dll…
And “New” keyword has to be used…
To Call a Procedure:
MyCl.MyProcName

REgards
Veena

If I remember, it’s a 2 step process. After you compiled your dll you have to register it or install on each PC it will be used. In the step 2 you have to make a reference to this DLL in VB projects that are intended to use it
Leon

Boris, thank for continuing in this thread. It is set to Mode-6, but the test application return this error: “Can’t find DLL entry point Procedure_Name Name.DLL”. Seems that there is something incorrect in the DLL definition that does not allow the calling program to identify the entry point for each procedure in the DLL. Any idea?

Regarding:
It was easy to do, but how do you call oneof the embedded functions form other VB6 application ?
If you set the instancing property to Mode-6 (Global),
then you just call the function by the name you originally gave it.
Mode-6 makes the function available as if it were part of Visual Basic.
Success to you.

  • Ron

This is the error that I got after follow the article advise.
Run Time Error ‘453’ Can;t find DLL entry point (Function name) in (DLL name).
Any idea ?

This is one of the procedures that unsuscesfully I follow… that I refers in my inicial e-mail.

It was easy to do, but how do you call one of the embedded functions form other VB6 application ?

However, this is not a “standard DLL” and can not be called like a windows
DLL.

The link above is an artical on created standard windows DLL from VB.
Michael McCaffrey.

Make a new VB6 Project selecting the project type of “ActveX DLL”.
Then add a Class to the Project and set its instancing to Mode-6 which
will make all its
functions Globally Public.
Now just copy/paste those Functions you wrote into the class.
Finally compile the project and Voila! it will produce a .DLL.

  • Ron

Make a new VB6 Project selecting the project type of “ActveX DLL”.
Then add a Class to the Project and set its instancing to Mode-6 which
will make all its
functions Globally Public.
Now just copy/paste those Functions you wrote into the class.
Finally compile the project and Voila! it will produce a .DLL.

  • Ron