Solved

dynamic link library (DLL)

Posted on 1998-11-26
1
309 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

810 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