?
Solved

dynamic link library (DLL)

Posted on 1998-11-26
1
Medium Priority
?
315 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
[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
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 20 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

777 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