Solved

Writing DLL using VB 5.0

Posted on 1998-10-08
6
378 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:raguram
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 2

Expert Comment

by:shchuka
ID: 1438809
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.
0
 

Expert Comment

by:analiafri
ID: 1438810
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.
0
 

Author Comment

by:raguram
ID: 1438811
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:kfrick
ID: 1438812
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

0
 
LVL 2

Accepted Solution

by:
shchuka earned 50 total points
ID: 1438813
"Normal" DLL simply contains a bunch of functions and or procedures; you can call any of them to do some computations/whatever and return result.  These are the ones that you are using by doing
    declare function whatever lib "whatever" (whatever) as whatever
You cannot create these ones with VB without third party tools (they do exist, I saw some of them).

ActiveX DLL, which you can't create with VB, doesn't have separate functions/procedures - instead it contains an Object.  This objects will have properties and methods. Once you have this DLL, you can create an instance of this object, then you can access its properties and execute methods.  You would normally use
   CreateObject()
function to instantiate an object contained in ActiveX DLL.  Analiafri explained reasonably well the steps needed to create an ActiveX DLL.  Note though that ActiveX DLL can't do much more than a VB application can.  If you decided to use DLL's because you can't do something in VB, then ActiveX DLL may not of much help at all.

Hope, this clarifies things,
-Aleks.
0
 

Author Comment

by:raguram
ID: 1438814
Can you give me URL where i can get the online documentation for writing ActiveX EXE,ActiveX DLL and ActiveX Controls.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
to transfer string from C lanaguage to VBA 4 85
Visual Studio 2005 text editor 10 55
pop out of webbrowser1 control vba6 5 51
2 Global Vars, 1 List Box 4 33
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question