Solved

Create DLL with VB5

Posted on 1998-08-24
5
217 Views
Last Modified: 2011-09-20
How an I create a NORMAL (not ActiveX) DLL with VB5.0 EE?

I want: (IF POSSIBLE)

Declare MyFun lib "xxx.dll" (x as xxx) as xxx
in the declaration part of my module

and
xxx = MyFun(x)

to be the only lines of code I need to write to get the function working.
0
Comment
Question by:polygon
  • 2
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
waty earned 200 total points
ID: 1430657
It is not possible to create a "classic" DLL under VB5.

You could create an OLE 2 Server exporting classes, and within those classes, showing your functions.

I will find a sample and post it for you.
0
 
LVL 14

Expert Comment

by:waty
ID: 1430658
NB : I have a sample, you can find it on my web site :
  http://www.geocities.com/ResearchTriangle/6311/ 

Download the Gradient TitleBar. It is a complete VB Source code implementing gradient in the titlebar.

It is in fact an Active DLL exporting a class (class_TitleBar).
In the sample, we add a reference to this Active DLL, and in code, we create a variable of this class :
   Private m_cT As New class_TitleBar

After that, you can call functions inside :
   m_cT.Picture = picLogo
   m_cT.GradientForm Me
   m_cT.RefreshTitleBar

You can call this DLL from every langage supporting OLE2 (Delphi, Office, Powerbuilder...). One restriction is that you need to install the Runtime DLL of VB5
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1430659
It is not possible with VB (waty's example is an activex dll).
However, there is an application that will allow you to write true dlls using a BASIC syntax.  Check out PB/DLL from power basic (www.powerbasic.com)
0
 
LVL 6

Expert Comment

by:anthonyc
ID: 1430660
EWWW Stay away, FAR AWAY, from Powerbasic.  It's unstable, and produces DLLs that are unstable.
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1430661
I would except the GFA Basic no longer exists (in the US, at any rate).
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now