Link to home
Start Free TrialLog in
Avatar of raguram
raguram

asked on

Writing DLL using VB 5.0

I know the concept behind DLL's. But i have no idea of how to write a DLL. How to write a DLL using VB 5.0. Can anyone explain with a step by step example
Avatar of shchuka
shchuka

The "normal" way a DLL works is it contains functions and/or procedures to be executed when called from any windows program.  With VB you cannot write such DLL's without resorting to third party products.  There's one called VB-DLL, but I never tried it.

What you can create in VB is ActiveX DLL - that is an OLE automation server.  Moreover, I've tried using these ActiveX DLL's from languages other than VB - and I failed miserably. I will strongly recommend C or C++ for writing DLL's to be used with VB.

-Aleks.
I have written ActiveX DLL's in VB5 and I succed. The steps you need to go on are the following:
1. Yo need to define the functionality you want your Dll will provide.
2. You need to design the object model to implement that functionality (clases, properties and methods).
3. You need to create a new proyect in VB5 and set in the proyect properties window, the proyect type to "Activex DLL".
4. You need to create the clases with the properties and methods for each class and codify them.
5. Yo can now compile thas proyect and you will have your Dll.

To can find good information about the detail of creating activex DLL's in the Visual Basic Books OnLine in "Component Tools Guide", "Creating Activex Component", "Creating Activex DLL".

Good Luck. Sorry about my inglish.
Avatar of raguram

ASKER

If normal DLL's can't be created thru' VB then what does it mean that we can create  ActiveX DLL.  Whats the difference between the normal DLL's and ActiveX DLL ? Where will this be used ? Basically i need this since i am working on IBM DB2(database) and for creating stored procedures i need to create DLLs. I have no experience in VC++ and moreover the front end is VB 5.0.
Search for the "Thing Demo" in the on-line documentation. Print it out so you can make notes, then perform the exercise. This gives a good understanding of ActiveX Control creation. Don't worry about not understanding it at first, just follow the steps described...you will have a good overview when the demo is completed!
Good Luck!
-kf

ASKER CERTIFIED SOLUTION
Avatar of shchuka
shchuka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of raguram

ASKER

Can you give me URL where i can get the online documentation for writing ActiveX EXE,ActiveX DLL and ActiveX Controls.