Solved

dynamic link library (DLL)

Posted on 1998-11-26
1
306 Views
Last Modified: 2010-04-01
how do i create my own dynamic link library (DLL) in C , so that i can use it in my program which is written using Ms VB 5. If possible where can i get an example or tips about the title.
0
Comment
Question by:tag_net
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 10 total points
ID: 1178702
That's quite easy:
Declare each function that you want to use in VB as (e.g.)
extern "C" int ___declspec( dllexport) MyFunction ( int i);
In VB, use
Declare Function _MyFunction lib "mydll.dll" (inp As integer) As integer
(NOTE the '_' before MyFunction - most C linkers prepend the functions' names with it if you don't suppress this explicitly)

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

746 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

12 Experts available now in Live!

Get 1:1 Help Now